summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--configure.ac6
-rw-r--r--man/amdgpu.man25
-rw-r--r--src/amdgpu_dri2.c3
-rw-r--r--src/amdgpu_drv.h7
-rw-r--r--src/amdgpu_glamor.c21
-rw-r--r--src/amdgpu_kms.c8
-rw-r--r--src/amdgpu_pixmap.c2
-rw-r--r--src/amdgpu_present.c23
-rw-r--r--src/amdgpu_video.c195
-rw-r--r--src/compat-api.h3
-rw-r--r--src/drmmode_display.c12
-rw-r--r--src/simple_list.h10
13 files changed, 220 insertions, 101 deletions
diff --git a/README.md b/README.md
index ac9454e..083432d 100644
--- a/README.md
+++ b/README.md
@@ -4,15 +4,11 @@ xf86-video-amdgpu - Xorg driver for AMD Radeon GPUs using the amdgpu kernel driv
Questions regarding this software should be directed at the
[amd-gfx mailing list](https://lists.freedesktop.org/mailman/listinfo/amd-gfx).
-Please
-[submit bug reports](https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/AMDgpu)
-to the Xorg bugzilla.
-
The
[main development code repository](https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu)
can be found at FreeDesktop Gitlab.
-Please use merge requests for patch submission.
+Please submit bug reports there and use merge requests for patch submission.
See the X.org wiki for
[further patch submission instructions](https://www.x.org/wiki/Development/Documentation/SubmittingPatches)
diff --git a/configure.ac b/configure.ac
index 9957f59..3172b39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,8 +23,8 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-amdgpu],
- [21.0.0],
- [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/AMDgpu],
+ [22.0.0],
+ [https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/issues],
[xf86-video-amdgpu])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -34,7 +34,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR(.)
# Initialize Automake
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_INIT_AUTOMAKE([foreign dist-xz])
AC_SYS_LARGEFILE
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
diff --git a/man/amdgpu.man b/man/amdgpu.man
index 36193e0..54b5bd4 100644
--- a/man/amdgpu.man
+++ b/man/amdgpu.man
@@ -90,6 +90,21 @@ when an suitable application is flipping via the Present extension.
The default is
.B off.
.TP
+.BI "Option \*qAsyncFlipSecondaries\*q \*q" boolean \*q
+Use async flips for secondary video outputs on multi-display setups. If a screen
+has multiple displays attached and DRI3 page flipping is used, then only one of
+the displays will have its page flip synchronized to vblank for tear-free
+presentation. This is the display that is used for presentation timing and
+timestamping, usually the one covering the biggest pixel area of the screen.
+All other displays ("Secondaries") will not synchronize their flips. This may
+cause some tearing on these displays, but it prevents a permanent or periodic
+slowdown or irritating judder of animations if not all video outputs are running
+synchronized with each other and with the same refresh rate. There is no perfect
+solution apart from perfectly synchronized outputs, but this option may give
+preferrable results if the displays in a multi-display setup mirror or clone
+each other. The default is
+.B off.
+.TP
.BI "Option \*qAccelMethod\*q \*q" string \*q
Setting this option to
.B none
@@ -125,7 +140,7 @@ https://www.x.org/wiki/radeon
.IP " 2." 4
Overview about amdgpu development code:
.RS 4
-https://cgit.freedesktop.org/xorg/driver/xf86-video-amdgpu/
+https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu
.RE
.IP " 3." 4
Mailing list:
@@ -138,14 +153,14 @@ IRC channel:
#radeon on irc.freenode.net
.RE
.IP " 5." 4
-Query the bugtracker for amdgpu bugs:
+The bugtracker for amdgpu bugs:
.RS 4
-https://bugs.freedesktop.org/query.cgi?product=xorg&component=Driver/AMDgpu
+https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/issues
.RE
.IP " 6." 4
-Submit bugs & patches:
+Submit merge requests:
.RS 4
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/AMDgpu
+https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/merge_requests
.RE
.SH AUTHORS
diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index a77e4e3..bfc14f3 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -417,8 +417,7 @@ static
xf86CrtcPtr amdgpu_dri2_drawable_crtc(DrawablePtr pDraw)
{
ScreenPtr pScreen = pDraw->pScreen;
- ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
- xf86CrtcPtr crtc = amdgpu_pick_best_crtc(pScrn, TRUE,
+ xf86CrtcPtr crtc = amdgpu_pick_best_crtc(pScreen,
pDraw->x, pDraw->x + pDraw->width,
pDraw->y, pDraw->y + pDraw->height);
diff --git a/src/amdgpu_drv.h b/src/amdgpu_drv.h
index e2e162e..2952b7b 100644
--- a/src/amdgpu_drv.h
+++ b/src/amdgpu_drv.h
@@ -165,6 +165,7 @@ typedef enum {
OPTION_TEAR_FREE,
OPTION_DELETE_DP12,
OPTION_VARIABLE_REFRESH,
+ OPTION_ASYNC_FLIP_SECONDARIES,
} AMDGPUOpts;
static inline ScreenPtr
@@ -306,6 +307,8 @@ typedef struct {
/* kms pageflipping */
WindowPtr flip_window;
Bool allowPageFlip;
+ Bool can_async_flip;
+ Bool async_flip_secondaries;
/* cursor size */
int cursor_w;
@@ -369,9 +372,9 @@ extern void amdgpu_sync_close(ScreenPtr screen);
/* amdgpu_video.c */
extern void AMDGPUInitVideo(ScreenPtr pScreen);
extern void AMDGPUResetVideo(ScrnInfoPtr pScrn);
-extern xf86CrtcPtr amdgpu_pick_best_crtc(ScrnInfoPtr pScrn,
- Bool consider_disabled,
+extern xf86CrtcPtr amdgpu_pick_best_crtc(ScreenPtr pScreen,
int x1, int x2, int y1, int y2);
+extern RRCrtcPtr amdgpu_randr_crtc_covering_drawable(DrawablePtr pDraw);
extern AMDGPUEntPtr AMDGPUEntPriv(ScrnInfoPtr pScrn);
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index fb7a46b..f867392 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -209,6 +209,15 @@ amdgpu_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
if (!format)
return NULL;
+ if (usage != CREATE_PIXMAP_USAGE_BACKING_PIXMAP &&
+ usage != CREATE_PIXMAP_USAGE_SHARED &&
+ !info->shadow_primary &&
+ w >= scrn->virtualX &&
+ w <= scrn->displayWidth &&
+ h == scrn->virtualY &&
+ format->bitsPerPixel == scrn->bitsPerPixel)
+ usage |= AMDGPU_CREATE_PIXMAP_SCANOUT;
+
if (!(usage & AMDGPU_CREATE_PIXMAP_SCANOUT) &&
!AMDGPU_CREATE_PIXMAP_SHARED(usage)) {
if (info->shadow_primary) {
@@ -218,15 +227,9 @@ amdgpu_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
usage |= AMDGPU_CREATE_PIXMAP_LINEAR |
AMDGPU_CREATE_PIXMAP_GTT;
} else if (usage != CREATE_PIXMAP_USAGE_BACKING_PIXMAP) {
- if (w < scrn->virtualX || w > scrn->displayWidth ||
- h != scrn->virtualY ||
- format->bitsPerPixel != scrn->bitsPerPixel) {
- pixmap = glamor_create_pixmap(screen, w, h, depth, usage);
- if (pixmap)
- return pixmap;
- } else {
- usage |= AMDGPU_CREATE_PIXMAP_SCANOUT;
- }
+ pixmap = glamor_create_pixmap(screen, w, h, depth, usage);
+ if (pixmap)
+ return pixmap;
}
}
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 8997759..6d65c81 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -87,6 +87,7 @@ const OptionInfoRec AMDGPUOptions_KMS[] = {
{OPTION_TEAR_FREE, "TearFree", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_DELETE_DP12, "DeleteUnusedDP12Displays", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_VARIABLE_REFRESH, "VariableRefresh", OPTV_BOOLEAN, {0}, FALSE },
+ {OPTION_ASYNC_FLIP_SECONDARIES, "AsyncFlipSecondaries", OPTV_BOOLEAN, {0}, FALSE},
{-1, NULL, OPTV_NONE, {0}, FALSE}
};
@@ -1637,6 +1638,13 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, from, "VariableRefresh: %sabled\n",
info->vrr_support ? "en" : "dis");
+
+ info->async_flip_secondaries = FALSE;
+ from = xf86GetOptValBool(info->Options, OPTION_ASYNC_FLIP_SECONDARIES,
+ &info->async_flip_secondaries) ? X_CONFIG : X_DEFAULT;
+
+ xf86DrvMsg(pScrn->scrnIndex, from, "AsyncFlipSecondaries: %sabled\n",
+ info->async_flip_secondaries ? "en" : "dis");
}
}
diff --git a/src/amdgpu_pixmap.c b/src/amdgpu_pixmap.c
index c5e80ad..18bdf4a 100644
--- a/src/amdgpu_pixmap.c
+++ b/src/amdgpu_pixmap.c
@@ -38,7 +38,7 @@ amdgpu_pixmap_create(ScreenPtr screen, int w, int h, int depth, unsigned usage)
PixmapPtr pixmap;
AMDGPUInfoPtr info;
- /* only DRI2 pixmap is suppported */
+ /* only DRI2 pixmap is supported */
if (!(usage & AMDGPU_CREATE_PIXMAP_DRI2))
return fbCreatePixmap(screen, w, h, depth, usage);
diff --git a/src/amdgpu_present.c b/src/amdgpu_present.c
index cc3d113..ca905d1 100644
--- a/src/amdgpu_present.c
+++ b/src/amdgpu_present.c
@@ -58,21 +58,7 @@ struct amdgpu_present_vblank_event {
static RRCrtcPtr
amdgpu_present_get_crtc(WindowPtr window)
{
- ScreenPtr screen = window->drawable.pScreen;
- ScrnInfoPtr pScrn = xf86ScreenToScrn(screen);
- xf86CrtcPtr crtc;
- RRCrtcPtr randr_crtc = NULL;
-
- crtc = amdgpu_pick_best_crtc(pScrn, FALSE,
- window->drawable.x,
- window->drawable.x + window->drawable.width,
- window->drawable.y,
- window->drawable.y + window->drawable.height);
-
- if (crtc)
- randr_crtc = crtc->randr_crtc;
-
- return randr_crtc;
+ return amdgpu_randr_crtc_covering_drawable(&window->drawable);
}
static int
@@ -496,8 +482,13 @@ amdgpu_present_has_async_flip(ScreenPtr screen)
Bool
amdgpu_present_screen_init(ScreenPtr screen)
{
- if (amdgpu_present_has_async_flip(screen))
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
+ AMDGPUInfoPtr info = AMDGPUPTR(scrn);
+
+ if (amdgpu_present_has_async_flip(screen)) {
amdgpu_present_screen_info.capabilities |= PresentCapabilityAsync;
+ info->can_async_flip = TRUE;
+ }
if (!present_screen_init(screen, &amdgpu_present_screen_info)) {
xf86DrvMsg(xf86ScreenToScrn(screen)->scrnIndex, X_WARNING,
diff --git a/src/amdgpu_video.c b/src/amdgpu_video.c
index 94ae170..9cf8ea1 100644
--- a/src/amdgpu_video.c
+++ b/src/amdgpu_video.c
@@ -39,89 +39,180 @@ static void amdgpu_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b)
{
dest->x1 = a->x1 > b->x1 ? a->x1 : b->x1;
dest->x2 = a->x2 < b->x2 ? a->x2 : b->x2;
+ if (dest->x1 >= dest->x2) {
+ dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0;
+ return;
+ }
+
dest->y1 = a->y1 > b->y1 ? a->y1 : b->y1;
dest->y2 = a->y2 < b->y2 ? a->y2 : b->y2;
-
- if (dest->x1 >= dest->x2 || dest->y1 >= dest->y2)
+ if (dest->y1 >= dest->y2)
dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0;
}
-static void amdgpu_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box)
+static int amdgpu_box_area(BoxPtr box)
{
- if (crtc->enabled) {
+ return (int)(box->x2 - box->x1) * (int)(box->y2 - box->y1);
+}
+
+Bool
+amdgpu_crtc_is_enabled(xf86CrtcPtr crtc)
+{
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+
+ return crtc->enabled && drmmode_crtc->dpms_mode == DPMSModeOn;
+}
+
+static void amdgpu_crtc_box(RRCrtcPtr crtc, BoxPtr crtc_box)
+{
+ if (crtc->mode) {
crtc_box->x1 = crtc->x;
- crtc_box->x2 =
- crtc->x + xf86ModeWidth(&crtc->mode, crtc->rotation);
crtc_box->y1 = crtc->y;
- crtc_box->y2 =
- crtc->y + xf86ModeHeight(&crtc->mode, crtc->rotation);
+ switch (crtc->rotation) {
+ case RR_Rotate_0:
+ case RR_Rotate_180:
+ default:
+ crtc_box->x2 = crtc->x + crtc->mode->mode.width;
+ crtc_box->y2 = crtc->y + crtc->mode->mode.height;
+ break;
+ case RR_Rotate_90:
+ case RR_Rotate_270:
+ crtc_box->x2 = crtc->x + crtc->mode->mode.height;
+ crtc_box->y2 = crtc->y + crtc->mode->mode.width;
+ break;
+ }
} else
crtc_box->x1 = crtc_box->x2 = crtc_box->y1 = crtc_box->y2 = 0;
}
-static int amdgpu_box_area(BoxPtr box)
+static Bool amdgpu_crtc_on(RRCrtcPtr crtc, Bool crtc_is_xf86_hint)
{
- return (int)(box->x2 - box->x1) * (int)(box->y2 - box->y1);
+ if (!crtc) {
+ return FALSE;
+ }
+ if (crtc_is_xf86_hint && crtc->devPrivate) {
+ return amdgpu_crtc_is_enabled(crtc->devPrivate);
+ } else {
+ return !!crtc->mode;
+ }
}
-Bool amdgpu_crtc_is_enabled(xf86CrtcPtr crtc)
+/*
+ * Return the crtc covering 'box'. If two crtcs cover a portion of
+ * 'box', then prefer the crtc with greater coverage.
+ */
+static RRCrtcPtr
+amdgpu_crtc_covering_box(ScreenPtr pScreen, BoxPtr box, Bool screen_is_xf86_hint)
{
- drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
- return drmmode_crtc->dpms_mode == DPMSModeOn;
+ rrScrPrivPtr pScrPriv;
+ RRCrtcPtr crtc, best_crtc, primary_crtc;
+ int coverage, best_coverage;
+ int c;
+ BoxRec crtc_box, cover_box;
+ RROutputPtr primary_output;
+
+ best_crtc = NULL;
+ best_coverage = 0;
+ primary_crtc = NULL;
+ primary_output = NULL;
+
+ if (!dixPrivateKeyRegistered(rrPrivKey))
+ return NULL;
+
+ pScrPriv = rrGetScrPriv(pScreen);
+
+ if (!pScrPriv)
+ return NULL;
+
+ primary_output = RRFirstOutput(pScreen);
+ if (primary_output && primary_output->crtc)
+ primary_crtc = primary_output->crtc->devPrivate;
+
+ for (c = 0; c < pScrPriv->numCrtcs; c++) {
+ crtc = pScrPriv->crtcs[c];
+
+ /* If the CRTC is off, treat it as not covering */
+ if (!amdgpu_crtc_on(crtc, screen_is_xf86_hint))
+ continue;
+
+ amdgpu_crtc_box(crtc, &crtc_box);
+ amdgpu_box_intersect(&cover_box, &crtc_box, box);
+ coverage = amdgpu_box_area(&cover_box);
+ if (coverage > best_coverage ||
+ (crtc == primary_crtc && coverage == best_coverage)) {
+ best_crtc = crtc;
+ best_coverage = coverage;
+ }
+ }
+
+ return best_crtc;
+}
+
+#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
+static RRCrtcPtr
+amdgpu_crtc_covering_box_on_secondary(ScreenPtr pScreen, BoxPtr box)
+{
+ if (!pScreen->isGPU) {
+ ScreenPtr secondary;
+ RRCrtcPtr crtc = NULL;
+
+ xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) {
+ if (!secondary->is_output_secondary)
+ continue;
+
+ crtc = amdgpu_crtc_covering_box(secondary, box, FALSE);
+ if (crtc)
+ return crtc;
+ }
+ }
+
+ return NULL;
+}
+#endif
+
+RRCrtcPtr
+amdgpu_randr_crtc_covering_drawable(DrawablePtr pDraw)
+{
+ ScreenPtr pScreen = pDraw->pScreen;
+ RRCrtcPtr crtc = NULL;
+ BoxRec box;
+
+ box.x1 = pDraw->x;
+ box.y1 = pDraw->y;
+ box.x2 = box.x1 + pDraw->width;
+ box.y2 = box.y1 + pDraw->height;
+
+ crtc = amdgpu_crtc_covering_box(pScreen, &box, TRUE);
+#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
+ if (!crtc) {
+ crtc = amdgpu_crtc_covering_box_on_secondary(pScreen, &box);
+ }
+#endif
+ return crtc;
}
xf86CrtcPtr
-amdgpu_pick_best_crtc(ScrnInfoPtr pScrn, Bool consider_disabled,
+amdgpu_pick_best_crtc(ScreenPtr pScreen,
int x1, int x2, int y1, int y2)
{
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- int coverage, best_coverage, c, cd;
- BoxRec box, crtc_box, cover_box;
- RROutputPtr primary_output = NULL;
- xf86CrtcPtr best_crtc = NULL, primary_crtc = NULL;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
if (!pScrn->vtSema)
return NULL;
+ RRCrtcPtr crtc = NULL;
+ BoxRec box;
+
box.x1 = x1;
box.x2 = x2;
box.y1 = y1;
box.y2 = y2;
- best_coverage = 0;
- /* Prefer the CRTC of the primary output */
- if (dixPrivateKeyRegistered(rrPrivKey))
- {
- primary_output = RRFirstOutput(pScrn->pScreen);
+ crtc = amdgpu_crtc_covering_box(pScreen, &box, TRUE);
+ if (crtc) {
+ return crtc->devPrivate;
}
- if (primary_output && primary_output->crtc)
- primary_crtc = primary_output->crtc->devPrivate;
-
- /* first consider only enabled CRTCs
- * then on second pass consider disabled ones
- */
- for (cd = 0; cd < (consider_disabled ? 2 : 1); cd++) {
- for (c = 0; c < xf86_config->num_crtc; c++) {
- xf86CrtcPtr crtc = xf86_config->crtc[c];
-
- if (!cd && !amdgpu_crtc_is_enabled(crtc))
- continue;
-
- amdgpu_crtc_box(crtc, &crtc_box);
- amdgpu_box_intersect(&cover_box, &crtc_box, &box);
- coverage = amdgpu_box_area(&cover_box);
- if (coverage > best_coverage ||
- (coverage == best_coverage &&
- crtc == primary_crtc)) {
- best_crtc = crtc;
- best_coverage = coverage;
- }
- }
- if (best_crtc)
- break;
- }
-
- return best_crtc;
+ return NULL;
}
void AMDGPUInitVideo(ScreenPtr pScreen)
diff --git a/src/compat-api.h b/src/compat-api.h
index aca3b07..d60050d 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -42,6 +42,9 @@
#define current_primary current_master
#define primary_pixmap master_pixmap
#define secondary_dst slave_dst
+#define secondary_list slave_list
+#define secondary_head slave_head
+#define is_output_secondary is_output_slave
#endif
#endif
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index b6cdde7..5b73fce 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -3970,17 +3970,27 @@ Bool amdgpu_do_pageflip(ScrnInfoPtr scrn, ClientPtr client,
uint32_t target_msc)
{
AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(scrn);
+ AMDGPUInfoPtr info = AMDGPUPTR(scrn);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CrtcPtr crtc = NULL;
drmmode_crtc_private_ptr drmmode_crtc = config->crtc[0]->driver_private;
int crtc_id;
uint32_t flip_flags = flip_sync == FLIP_ASYNC ? DRM_MODE_PAGE_FLIP_ASYNC : 0;
+ uint32_t sec_flip_flags = flip_flags;
drmmode_flipdata_ptr flipdata;
Bool handle_deferred = FALSE;
uintptr_t drm_queue_seq = 0;
struct drmmode_fb *fb;
int i = 0;
+ /*
+ * Flip secondary non-ref_crtc crtc's async if possible and requested
+ * by xorg.conf option "AsyncFlipSecondaries". Otherwise follow the lead
+ * of flip_sync.
+ */
+ if (info->can_async_flip && info->async_flip_secondaries)
+ sec_flip_flags |= DRM_MODE_PAGE_FLIP_ASYNC;
+
flipdata = calloc(1, sizeof(*flipdata) + drmmode_crtc->drmmode->count_crtcs *
sizeof(flipdata->fb[0]));
if (!flipdata) {
@@ -4081,7 +4091,7 @@ Bool amdgpu_do_pageflip(ScrnInfoPtr scrn, ClientPtr client,
if (drmmode_page_flip_target_relative(pAMDGPUEnt,
drmmode_crtc,
flipdata->fb[crtc_id]->handle,
- flip_flags,
+ sec_flip_flags,
drm_queue_seq, 0) != 0)
goto flip_error;
}
diff --git a/src/simple_list.h b/src/simple_list.h
index 94a8af4..d569cff 100644
--- a/src/simple_list.h
+++ b/src/simple_list.h
@@ -2,7 +2,7 @@
* \file simple_list.h
* Simple macros for type-safe, intrusive lists.
*
- * Intended to work with a list sentinal which is created as an empty
+ * Intended to work with a list sentinel which is created as an empty
* list. Insert & delete are O(1).
*
* \author
@@ -107,12 +107,12 @@ do { \
/**
* Make a empty list empty.
*
- * \param sentinal list (sentinal element).
+ * \param sentinel list (sentinel element).
*/
-#define make_empty_list(sentinal) \
+#define make_empty_list(sentinel) \
do { \
- (sentinal)->next = sentinal; \
- (sentinal)->prev = sentinal; \
+ (sentinel)->next = sentinel; \
+ (sentinel)->prev = sentinel; \
} while (0)
/**