Skip to contentSkip to conversation

use xf86NameCmp() instead of xf86nameCompare()

PATCH In review Enrico Weigelt, metux IT consult 4 participants 28 messages Mar 4, 2025 – Apr 9, 2025 1 message not in the archive Arm/Amlogic Meson SoC support

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/16 meson.build: fix missing Xv dependencies

libXv needs be be explicitly linked, otherwise getting error:

FAILED: xvmc/libIntelXvMC.so.1.0.0
cc -o xvmc/libIntelXvMC.so.1.0.0 xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc_dump.c.o xvmc/libIntelXvMC.so.1.0.0.p/i915_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/i965_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/xvmc_vld.c.o xvmc/libIntelXvMC.so.1.0.0.p/intel_batchbuffer.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libIntelXvMC.so.1 -pthread /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXvMC.so /usr/lib/x86_64-linux-gnu/libX11-xcb.so /usr/lib/x86_64-linux-gnu/libxcb.so /usr/lib/x86_64-linux-gnu/libxcb-util.so /usr/lib/x86_64-linux-gnu/libxcb-dri2.so /usr/lib/x86_64-linux-gnu/libdrm_intel.so /usr/lib/x86_64-linux-gnu/libdrm.so -Wl,--end-group /usr/bin/ld: xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o: in function `XvMCCreateSurface':
/home/nekrad/src/xorg/drivers/xf86-video-intel/_build/../xvmc/intel_xvmc.c:432: undefined reference to `XvCreateImage'
/usr/bin/ld: xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o: in function `XvMCPutSurface':
/home/nekrad/src/xorg/drivers/xf86-video-intel/_build/../xvmc/intel_xvmc.c:666: undefined reference to `XvPutImage'
collect2: error: ld returned 1 exit status

---
 src/legacy/i810/xvmc/meson.build | 1 +
 xvmc/meson.build                 | 1 +
 2 files changed, 2 insertions(+)
src/legacy/i810/xvmc/meson.build +1 -0
index cd05f3ef..3505f15b 100644
@@ -4,6 +4,7 @@ shared_library('I810XvMC',
 	       sources : 'I810XvMC.c',
 	       dependencies : [
 		 dependency('x11', required : true),
+		 dependency('xv', required : true),
 		 dependency('xvmc', required : true),
 		 dependency('xorg-server', required : true),
 		 dependency('libdrm', required : true),
xvmc/meson.build +1 -0
index 0ecc51e5..eeba2b66 100644
@@ -14,6 +14,7 @@ shared_library('IntelXvMC',
 	       dependencies : [
 		 dependency('threads', required : true),
 		 dependency('x11', required : true),
+		 dependency('xv', required : true),
 		 dependency('xvmc', required : true),
 		 dependency('xorg-server', required : true),
 		 dependency('x11-xcb', required : true),

--
2.39.5

#2 lore raw

Re: [PATCH 01/16] meson.build: fix missing Xv dependencies

Quoted 11 lines · metux IT consult

libXv needs be be explicitly linked, otherwise getting error:

FAILED: xvmc/libIntelXvMC.so.1.0.0
cc -o xvmc/libIntelXvMC.so.1.0.0 xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc_dump.c.o xvmc/libIntelXvMC.so.1.0.0.p/i915_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/i965_xvmc.c.o xvmc/libIntelXvMC.so.1.0.0.p/xvmc_vld.c.o xvmc/libIntelXvMC.so.1.0.0.p/intel_batchbuffer.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libIntelXvMC.so.1 -pthread /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXvMC.so /usr/lib/x86_64-linux-gnu/libX11-xcb.so /usr/lib/x86_64-linux-gnu/libxcb.so /usr/lib/x86_64-linux-gnu/libxcb-util.so /usr/lib/x86_64-linux-gnu/libxcb-dri2.so /usr/lib/x86_64-linux-gnu/libdrm_intel.so /usr/lib/x86_64-linux-gnu/libdrm.so -Wl,--end-group /usr/bin/ld: xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o: in function `XvMCCreateSurface':
/home/nekrad/src/xorg/drivers/xf86-video-intel/_build/../xvmc/intel_xvmc.c:432: undefined reference to `XvCreateImage'
/usr/bin/ld: xvmc/libIntelXvMC.so.1.0.0.p/intel_xvmc.c.o: in function `XvMCPutSurface':
/home/nekrad/src/xorg/drivers/xf86-video-intel/_build/../xvmc/intel_xvmc.c:666: undefined reference to `XvPutImage'
collect2: error: ld returned 1 exit status

This one was already fixed with
commit e6a4c4740c15 ("meson: Add dependency on xv")

Quoted 31 lines
---
 src/legacy/i810/xvmc/meson.build | 1 +
 xvmc/meson.build                 | 1 +
 2 files changed, 2 insertions(+)
src/legacy/i810/xvmc/meson.build +1 -0
index cd05f3ef..3505f15b 100644
@@ -4,6 +4,7 @@ shared_library('I810XvMC',
 	       sources : 'I810XvMC.c',
 	       dependencies : [
 		 dependency('x11', required : true),
+		 dependency('xv', required : true),
 		 dependency('xvmc', required : true),
 		 dependency('xorg-server', required : true),
 		 dependency('libdrm', required : true),
xvmc/meson.build +1 -1
index 0ecc51e5..eeba2b66 100644
@@ -14,6 +14,7 @@ shared_library('IntelXvMC',
 	       dependencies : [
 		 dependency('threads', required : true),
 		 dependency('x11', required : true),
+		 dependency('xv', required : true),
 		 dependency('xvmc', required : true),
 		 dependency('xorg-server', required : true),
 		 dependency('x11-xcb', required : true),
--

2.39.5

Signature · 2 lines
Ville Syrjälä
Intel
#3 lore raw

PATCH 2/16 sna: stop using obsolete type aliases

In reply to a message not in the archive

The Xserver has been moved to using pixman for all matrix operations, back in 2008, but left some #define's so drivers still compile. Since 1.5 decades have passed now, it's time to fix remaining drivers still using the old name, so we can drop these #define's from the Xserver includes.

---
 src/sna/sna_display.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
src/sna/sna_display.c +4 -4
index d4fa7b0b..d33a88af 100644
@@ -208,7 +208,7 @@ struct sna_crtc {
 	bool hwcursor;
 	bool flip_pending;
 
-	struct pict_f_transform cursor_to_fb, fb_to_cursor;
+	struct pixman_f_transform cursor_to_fb, fb_to_cursor;
 
 	RegionRec crtc_damage;
 	uint16_t shadow_bo_width, shadow_bo_height;
@@ -2383,7 +2383,7 @@ static bool use_shadow(struct sna *sna, xf86CrtcPtr crtc)
 {
 	RRTransformPtr transform;
 	PictTransform crtc_to_fb;
-	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
 	unsigned pitch_limit;
 	BoxRec b;
 
@@ -2853,7 +2853,7 @@ affine_is_pixel_exact(const struct pixman_f_transform *t)
 static void sna_crtc_randr(xf86CrtcPtr crtc)
 {
 	struct sna_crtc *sna_crtc = to_sna_crtc(crtc);
-	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
 	PictTransform crtc_to_fb;
 	PictFilterPtr filter;
 	xFixed *params;
@@ -6674,7 +6674,7 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y)
 		if (crtc->transform_in_use) {
 			int xhot = sna->cursor.ref->bits->xhot;
 			int yhot = sna->cursor.ref->bits->yhot;
-			struct pict_f_vector v, hot;
+			struct pixman_f_vector v, hot;
 
 			v.v[0] = x + xhot + .5;
 			v.v[1] = y + yhot + .5;

--
2.39.5

#4 lore raw

Re: [PATCH 02/16] sna: stop using obsolete type aliases

Quoted 4 lines · metux IT consult

The Xserver has been moved to using pixman for all matrix operations, back in 2008, but left some #define's so drivers still compile. Since 1.5 decades have passed now, it's time to fix remaining drivers still using the old name, so we can drop these #define's from the Xserver includes.

Can you list the relevant xserver commit(s) here?

Quoted 48 lines
---
 src/sna/sna_display.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
src/sna/sna_display.c +4 -5
index d4fa7b0b..d33a88af 100644
@@ -208,7 +208,7 @@ struct sna_crtc {
 	bool hwcursor;
 	bool flip_pending;
 
-	struct pict_f_transform cursor_to_fb, fb_to_cursor;
+	struct pixman_f_transform cursor_to_fb, fb_to_cursor;
 
 	RegionRec crtc_damage;
 	uint16_t shadow_bo_width, shadow_bo_height;
@@ -2383,7 +2383,7 @@ static bool use_shadow(struct sna *sna, xf86CrtcPtr crtc)
 {
 	RRTransformPtr transform;
 	PictTransform crtc_to_fb;
-	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
 	unsigned pitch_limit;
 	BoxRec b;
 
@@ -2853,7 +2853,7 @@ affine_is_pixel_exact(const struct pixman_f_transform *t)
 static void sna_crtc_randr(xf86CrtcPtr crtc)
 {
 	struct sna_crtc *sna_crtc = to_sna_crtc(crtc);
-	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
 	PictTransform crtc_to_fb;
 	PictFilterPtr filter;
 	xFixed *params;
@@ -6674,7 +6674,7 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y)
 		if (crtc->transform_in_use) {
 			int xhot = sna->cursor.ref->bits->xhot;
 			int yhot = sna->cursor.ref->bits->yhot;
-			struct pict_f_vector v, hot;
+			struct pixman_f_vector v, hot;
 
 			v.v[0] = x + xhot + .5;
 			v.v[1] = y + yhot + .5;
--

2.39.5

Signature · 2 lines
Ville Syrjälä
Intel
#5 lore raw

Re: [PATCH 02/16] sna: stop using obsolete type aliases

Quoted 7 lines · Ville Syrjälä
Quoted 4 lines · metux IT consult

The Xserver has been moved to using pixman for all matrix operations, back in 2008, but left some #define's so drivers still compile. Since 1.5 decades have passed now, it's time to fix remaining drivers still using the old name, so we can drop these #define's from the Xserver includes.

Can you list the relevant xserver commit(s) here?

10a803186567308ceaed5760d092edd508bb157c

Quoted 45 lines
Quoted 45 lines
---
  src/sna/sna_display.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
src/sna/sna_display.c +4 -4
index d4fa7b0b..d33a88af 100644
@@ -208,7 +208,7 @@ struct sna_crtc {
  	bool hwcursor;
  	bool flip_pending;
 
-	struct pict_f_transform cursor_to_fb, fb_to_cursor;
+	struct pixman_f_transform cursor_to_fb, fb_to_cursor;
 
  	RegionRec crtc_damage;
  	uint16_t shadow_bo_width, shadow_bo_height;
@@ -2383,7 +2383,7 @@ static bool use_shadow(struct sna *sna, xf86CrtcPtr crtc)
  {
  	RRTransformPtr transform;
  	PictTransform crtc_to_fb;
-	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
  	unsigned pitch_limit;
  	BoxRec b;
 
@@ -2853,7 +2853,7 @@ affine_is_pixel_exact(const struct pixman_f_transform *t)
  static void sna_crtc_randr(xf86CrtcPtr crtc)
  {
  	struct sna_crtc *sna_crtc = to_sna_crtc(crtc);
-	struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
+	struct pixman_f_transform f_crtc_to_fb, f_fb_to_crtc;
  	PictTransform crtc_to_fb;
  	PictFilterPtr filter;
  	xFixed *params;
@@ -6674,7 +6674,7 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y)
  		if (crtc->transform_in_use) {
  			int xhot = sna->cursor.ref->bits->xhot;
  			int yhot = sna->cursor.ref->bits->yhot;
-			struct pict_f_vector v, hot;
+			struct pixman_f_vector v, hot;
 
Quoted 5 lines
Quoted 4 lines
src/sna/sna_display.c +0 -1
  			v.v[0] = x + xhot + .5;
  			v.v[1] = y + yhot + .5;
--

2.39.5

--
---
All racism is bad. All lives matter.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
[email protected] -- +49-151-27565287

#6 lore raw

PATCH 3/16 tools: fix FTBS on FreeBSD

In reply to a message not in the archive

ETIME seems to be missing, so just alias it to ETIMEDOUT It's just used by internal functions of the tools.

---
 tools/virtual.c | 5 +++++
 1 file changed, 5 insertions(+)
tools/virtual.c +5 -0
index 010a3aab..9a4dde8e 100644
@@ -69,6 +69,11 @@
 #include <fcntl.h>
 #include <assert.h>
 
+// for FreeBSD
+#ifndef ETIME
+#define ETIME ETIMEDOUT
+#endif
+
 #define FORCE_FULL_REDRAW 0
 #define FORCE_16BIT_XFER 0
 

--
2.39.5

#7 lore raw

PATCH 4/16 backlight: use system() instead of System()

In reply to a message not in the archive

The Xserver's System() function is a special wrapper for calling a program (xkbcomp) as an unprivileged user, when the Xserver is running as suid-root. (which today only needed on a few platforms, eg. Solaris). Therefore it's not suited for being called by arbitrary drivers.

In this specific context it doesn't even much sense, since it's just used for checking whether pkexec command is present at all (and just should be used), while the actual exec'ing of the helper is done directly by fork() and exec() syscalls.

Thus we can safely use standard system() call instead - clearing the road for dropping System() from Xserver's public/driver API.

---
 src/backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/backlight.c +1 -1
index fcbb279f..f416f2a4 100644
@@ -366,7 +366,7 @@ static int __backlight_helper_init(struct backlight *b, char *iface)
 		return 0;
 
 	if ((st.st_mode & (S_IFREG | S_ISUID | S_IXUSR)) != (S_IFREG | S_ISUID | S_IXUSR)) {
-		if (System("pkexec --version"))
+		if (system("pkexec --version"))
 			return 0;
 
 		use_pkexec = 1;

--
2.39.5

#8 lore raw

Re: [PATCH 04/16] backlight: use system() instead of System()

Quoted 23 lines · metux IT consult

The Xserver's System() function is a special wrapper for calling a program (xkbcomp) as an unprivileged user, when the Xserver is running as suid-root. (which today only needed on a few platforms, eg. Solaris). Therefore it's not suited for being called by arbitrary drivers.

In this specific context it doesn't even much sense, since it's just used for checking whether pkexec command is present at all (and just should be used), while the actual exec'ing of the helper is done directly by fork() and exec() syscalls.

Thus we can safely use standard system() call instead - clearing the road for dropping System() from Xserver's public/driver API.

---
 src/backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/backlight.c +0 -0
index fcbb279f..f416f2a4 100644

src/backlight.c static int __backlight_helper_init(struct backlight *b, char *iface) · line 369

Quoted 5 lines
src/backlight.c +1 -1
@@ -366,7 +366,7 @@ static int __backlight_helper_init(struct backlight *b, char *iface)
 		return 0;
 
 	if ((st.st_mode & (S_IFREG | S_ISUID | S_IXUSR)) != (S_IFREG | S_ISUID | S_IXUSR)) {
-		if (System("pkexec --version"))
+		if (system("pkexec --version"))

The exact opposite was done by Hans in commit 27a9dc4ce8fa ("backlight:
Use System instead of system when checking for pkexec"). The commit msg isn't super helpful but I assume it was just to avoid running random stuff as root.

I guess one option would be to hand roll the whole fork()+drop_privs+exec() for this early pkexec check as well.

Quoted 5 lines
src/backlight.c +0 -1
 			return 0;
 
 		use_pkexec = 1;
--

2.39.5

Signature · 2 lines
Ville Syrjälä
Intel
#9 lore raw

PATCH 5/16 sna: use GCPtr instead of GC *

In reply to a message not in the archive

Xserver includes have explicit pointer types for quite all kind of structs (at least those used by drivers), which are used all over the Xserver. Thus it's much cleaner to use those everywhere.

This commit also clears the road to fix a horrible nightmare of hacks just needed to circumvent naming clashes between Xserver and Xlib (affecting all DDXes that are painting on another Xserver): we can simply rename Xserver's own "GC" type to "GCRec" (the usual naming convention here) and so no trouble with Xlib's "GC" type anymore. Once this has landed, we're free to do that without breaking this driver.

---
 src/sna/sna_accel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/sna/sna_accel.c +2 -2
index 89b82afa..90a61ab3 100644
@@ -14300,7 +14300,7 @@ static void
 sna_poly_fill_rect_stippled_n_box__imm(struct sna *sna,
 				       struct kgem_bo *bo,
 				       uint32_t br00, uint32_t br13,
-				       const GC *gc,
+				       const GCPtr gc,
 				       const BoxRec *box,
 				       const DDXPointRec *origin)
 {
@@ -14412,7 +14412,7 @@ sna_poly_fill_rect_stippled_n_box(struct sna *sna,
 				  struct kgem_bo *bo,
 				  struct kgem_bo **tile,
 				  uint32_t br00, uint32_t br13,
-				  const GC *gc,
+				  const GCPtr gc,
 				  const BoxRec *box,
 				  const DDXPointRec *origin)
 {

--
2.39.5

#10 lore raw

Re: [PATCH 05/16] sna: use GCPtr instead of GC *

Quoted 21 lines · metux IT consult

Xserver includes have explicit pointer types for quite all kind of structs (at least those used by drivers), which are used all over the Xserver. Thus it's much cleaner to use those everywhere.

This commit also clears the road to fix a horrible nightmare of hacks just needed to circumvent naming clashes between Xserver and Xlib (affecting all DDXes that are painting on another Xserver): we can simply rename Xserver's own "GC" type to "GCRec" (the usual naming convention here) and so no trouble with Xlib's "GC" type anymore. Once this has landed, we're free to do that without breaking this driver.

---
 src/sna/sna_accel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/sna/sna_accel.c +0 -0
index 89b82afa..90a61ab3 100644

src/sna/sna_accel.c static void · line 14303

Quoted 5 lines
src/sna/sna_accel.c +1 -1
@@ -14300,7 +14300,7 @@ static void
 sna_poly_fill_rect_stippled_n_box__imm(struct sna *sna,
 				       struct kgem_bo *bo,
 				       uint32_t br00, uint32_t br13,
-				       const GC *gc,
+				       const GCPtr gc,

These two are not the same. One is a non-const pointer to a const GC, the other is a const pointer to a non-const GC.

Quoted 14 lines
src/sna/sna_accel.c +1 -2
 				       const BoxRec *box,
 				       const DDXPointRec *origin)
 {
@@ -14412,7 +14412,7 @@ sna_poly_fill_rect_stippled_n_box(struct sna *sna,
 				  struct kgem_bo *bo,
 				  struct kgem_bo **tile,
 				  uint32_t br00, uint32_t br13,
-				  const GC *gc,
+				  const GCPtr gc,
 				  const BoxRec *box,
 				  const DDXPointRec *origin)
 {
--

2.39.5

Signature · 2 lines
Ville Syrjälä
Intel
#11 lore raw

Re: [PATCH 05/16] sna: use GCPtr instead of GC *

Quoted 7 lines · Ville Syrjälä

Review

Quoted 4 lines

struct kgem_bo *bo, uint32_t br00, uint32_t br13,

(quoted diff) +1 -1
-				       const GC *gc,
+				       const GCPtr gc,

These two are not the same. One is a non-const pointer to a const GC, the other is a const pointer to a non-const GC.

Feel free to change it as you wish - we just need to change to GCPtr in order to rename GC to GCRec, in order to get rid of some really ugly hacks in Xnest (because Xlib also an entirely different type named "GC")

https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1393

Quoted 16 lines
Quoted 14 lines
  				       const BoxRec *box,
  				       const DDXPointRec *origin)
  {
src/sna/sna_accel.c +1 -2
@@ -14412,7 +14412,7 @@ sna_poly_fill_rect_stippled_n_box(struct sna *sna,
  				  struct kgem_bo *bo,
  				  struct kgem_bo **tile,
  				  uint32_t br00, uint32_t br13,
-				  const GC *gc,
+				  const GCPtr gc,
  				  const BoxRec *box,
  				  const DDXPointRec *origin)
  {
--
Quoted 1 line

2.39.5

--
---
All racism is bad. All lives matter.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
[email protected] -- +49-151-27565287

#12 lore raw

PATCH 6/16 gitlab CI: common scripts for driver builds

In reply to a message not in the archive

Adding a bunch of common scripts for building xorg drivers on different platforms (for now Debian and FreeBSD) against different server versions.

Also designed to be executed locally (eg. within a VM), so one doesn't always have to employ f.d.o gitlab.

For now, these are synced manually across various driver repos, until we've found a viable solution for a central place.

---
 .gitlab-ci/common/README.md                   |  20 ++
 .gitlab-ci/common/build-driver.sh             |  61 +++++
 .gitlab-ci/common/build-xserver.sh            |  71 ++++++
 .gitlab-ci/common/debian/image-install.sh     |  91 ++++++++
 .gitlab-ci/common/freebsd/FreeBSD.conf        |   8 +
 .gitlab-ci/common/freebsd/image-install.sh    |  59 +++++
 .../common/freebsd/libdrm-2.4.116.patch       | 109 +++++++++
 .gitlab-ci/common/xorg-driver.yml             | 216 ++++++++++++++++++
 8 files changed, 635 insertions(+)
 create mode 100644 .gitlab-ci/common/README.md
 create mode 100755 .gitlab-ci/common/build-driver.sh
 create mode 100755 .gitlab-ci/common/build-xserver.sh
 create mode 100755 .gitlab-ci/common/debian/image-install.sh
 create mode 100644 .gitlab-ci/common/freebsd/FreeBSD.conf
 create mode 100755 .gitlab-ci/common/freebsd/image-install.sh
 create mode 100644 .gitlab-ci/common/freebsd/libdrm-2.4.116.patch
 create mode 100644 .gitlab-ci/common/xorg-driver.yml
.gitlab-ci/common/README.md new file +20 -0
new file mode 100644
index 00000000..1f2dbd87
@@ -0,0 +1,20 @@
+common CI stuff - supposed to be synced across all drivers
+
+moving this to a dedicated CI component is left for a later exercise.
+
+Some scripts can also be used locally, eg. in a VM:
+
+Prepare the image:
+
+    .gitlab-ci/common/debian/image-install.sh
+    .gitlab-ci/common/freebsd/image-install.sh
+
+Build the xserver + driver:
+
+    .gitlab-ci/common/build-driver.sh debian <xserver git ref>
+    .gitlab-ci/common/build-driver.sh freebsd <xserver git ref>
+
+Build just the xserver:
+
+    .gitlab-ci/common/build-xserver.sh debian <xserver git ref>
+    .gitlab-ci/common/build-xserver.sh freebsd <xserver git ref>
.gitlab-ci/common/build-driver.sh new file +61 -0

61 lines not on this page · raw message

.gitlab-ci/common/build-xserver.sh new file +71 -0

71 lines not on this page · raw message

.gitlab-ci/common/debian/image-install.sh new file +91 -0

91 lines not on this page · raw message

.gitlab-ci/common/freebsd/FreeBSD.conf new file +8 -0
new file mode 100644
index 00000000..50a9bce1
@@ -0,0 +1,8 @@
+# using the latest branch
+FreeBSD: {
+  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
+  mirror_type: "srv",
+  signature_type: "fingerprints",
+  fingerprints: "/usr/share/keys/pkg",
+  enabled: yes
+}
.gitlab-ci/common/freebsd/image-install.sh new file +59 -0

59 lines not on this page · raw message

.gitlab-ci/common/freebsd/libdrm-2.4.116.patch new file +109 -0

109 lines not on this page · raw message

.gitlab-ci/common/xorg-driver.yml new file +216 -0

216 lines not on this page · raw message

--
2.39.5

#13 lore raw

PATCH 7/16 gitlab CI: add pipeline for building against various Xserver releases

In reply to a message not in the archive

Adding a gitlab pipeline building this driver against Xserver major releases since 1.18, including current master branch, on Debian as well as FreeBSD.

---
 .gitlab-ci.yml | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 .gitlab-ci.yml
.gitlab-ci.yml new file +5 -0
new file mode 100644
index 00000000..5521ff67
@@ -0,0 +1,5 @@
+variables:
+    FDO_UPSTREAM_REPO:  'xorg/driver/xf86-video-intel'
+
+include:
+    - local:    '.gitlab-ci/common/xorg-driver.yml'

--
2.39.5

#14 lore raw

PATCH 8/16 stop using obsolete xf86BlockSIGIO() and xf86UnblockSIGIO()

In reply to a message not in the archive

These are just wrappers for calling input_lock()/input_unlock() and marked deprecated for quite a while now.

---
 src/sna/sna_display.c  | 5 +++--
 src/uxa/intel_driver.c | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)
src/sna/sna_display.c +3 -2
index d33a88af..d4adf34f 100644
@@ -1161,11 +1161,12 @@ static inline void sigio_unblock(int was_blocked)
 #include <xf86_OSproc.h>
 static inline int sigio_block(void)
 {
-	return xf86BlockSIGIO();
+	input_lock();
+	return 0;
 }
 static inline void sigio_unblock(int was_blocked)
 {
-	xf86UnblockSIGIO(was_blocked);
+	input_unlock();
 }
 #endif
 
src/uxa/intel_driver.c +2 -2
index 9c3fe85f..79105b89 100644
@@ -641,10 +641,10 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
         intel_flush(intel);
 	if (!intel->has_prime_vmap_flush) {
 		drm_intel_bo *bo = intel_uxa_get_pixmap_bo(PixmapDirtyPrimary(dirty));
-		was_blocked = xf86BlockSIGIO();
+		input_lock();
 		drm_intel_bo_map(bo, FALSE);
 		drm_intel_bo_unmap(bo);
-		xf86UnblockSIGIO(was_blocked);
+		input_unlock();
 	}
 
 	DamageRegionProcessPending(&PixmapDirtyDst(dirty)->drawable);

--
2.39.5

#15 lore raw

Re: [PATCH 08/16] stop using obsolete xf86BlockSIGIO() and xf86UnblockSIGIO()

Quoted 2 lines · metux IT consult

These are just wrappers for calling input_lock()/input_unlock() and marked deprecated for quite a while now.

Listing the relevant xserver commit(s) would be nice here too.

Quoted 45 lines
---
 src/sna/sna_display.c  | 5 +++--
 src/uxa/intel_driver.c | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)
src/sna/sna_display.c +3 -2
index d33a88af..d4adf34f 100644
@@ -1161,11 +1161,12 @@ static inline void sigio_unblock(int was_blocked)
 #include <xf86_OSproc.h>
 static inline int sigio_block(void)
 {
-	return xf86BlockSIGIO();
+	input_lock();
+	return 0;
 }
 static inline void sigio_unblock(int was_blocked)
 {
-	xf86UnblockSIGIO(was_blocked);
+	input_unlock();
 }
 #endif
 
src/uxa/intel_driver.c +2 -3
index 9c3fe85f..79105b89 100644
@@ -641,10 +641,10 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty)
         intel_flush(intel);
 	if (!intel->has_prime_vmap_flush) {
 		drm_intel_bo *bo = intel_uxa_get_pixmap_bo(PixmapDirtyPrimary(dirty));
-		was_blocked = xf86BlockSIGIO();
+		input_lock();
 		drm_intel_bo_map(bo, FALSE);
 		drm_intel_bo_unmap(bo);
-		xf86UnblockSIGIO(was_blocked);
+		input_unlock();
 	}
 
 	DamageRegionProcessPending(&PixmapDirtyDst(dirty)->drawable);
--

2.39.5

Signature · 2 lines
Ville Syrjälä
Intel
#16 lore raw

PATCH 9/16 uxa: stop calling deprecated xf86_reload_cursors()

In reply to a message not in the archive

the function has become a no-op, it's former duties are done automatically.

---
 src/uxa/intel_display.c | 3 ---
 1 file changed, 3 deletions(-)
src/uxa/intel_display.c +0 -3
index 409cbbcf..2a544779 100644
@@ -394,9 +394,6 @@ intel_crtc_apply(xf86CrtcPtr crtc)
 		}
 	}
 
-	if (scrn->pScreen)
-		xf86_reload_cursors(scrn->pScreen);
-
 done:
 	free(output_ids);
 	return ret;

--
2.39.5

#17 lore raw

Re: [PATCH 09/16] uxa: stop calling deprecated xf86_reload_cursors()

Quoted 1 line · metux IT consult

the function has become a no-op, it's former duties are done automatically.

s/the function/xf86_reload_cursors()/

Could use xserver commit references as well.

Quoted 22 lines
---
 src/uxa/intel_display.c | 3 ---
 1 file changed, 3 deletions(-)
src/uxa/intel_display.c +0 -4
index 409cbbcf..2a544779 100644
@@ -394,9 +394,6 @@ intel_crtc_apply(xf86CrtcPtr crtc)
 		}
 	}
 
-	if (scrn->pScreen)
-		xf86_reload_cursors(scrn->pScreen);
-
 done:
 	free(output_ids);
 	return ret;
--

2.39.5

Signature · 2 lines
Ville Syrjälä
Intel
#18 lore raw

PATCH 10/16 use XNFalloc() instead of xnfalloc

In reply to a message not in the archive

xnfalloc is just an alias for XNFalloc() that doesn't seem to serve any practical purpose, so it can go away once all drivers stopped using it.

---
 src/sna/sna_video_overlay.c   | 2 +-
 src/sna/sna_video_sprite.c    | 2 +-
 src/sna/sna_video_textured.c  | 2 +-
 src/uxa/intel_uxa_video.c     | 2 +-
 src/uxa/intel_video_overlay.c | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)
src/sna/sna_video_overlay.c +1 -1
index 07964871..5989b261 100644
@@ -723,7 +723,7 @@ void sna_video_overlay_setup(struct sna *sna, ScreenPtr screen)
 	adaptor->pScreen = screen;
 	adaptor->name = (char *)"Intel(R) Video Overlay";
 	adaptor->nEncodings = 1;
-	adaptor->pEncodings = xnfalloc(sizeof(XvEncodingRec));
+	adaptor->pEncodings = XNFalloc(sizeof(XvEncodingRec));
 	adaptor->pEncodings[0].id = 0;
 	adaptor->pEncodings[0].pScreen = screen;
 	adaptor->pEncodings[0].name = (char *)"XV_IMAGE";
src/sna/sna_video_sprite.c +1 -1
index db3865b9..2d012b95 100644
@@ -854,7 +854,7 @@ void sna_video_sprite_setup(struct sna *sna, ScreenPtr screen)
 	adaptor->pScreen = screen;
 	adaptor->name = (char *)"Intel(R) Video Sprite";
 	adaptor->nEncodings = 1;
-	adaptor->pEncodings = xnfalloc(sizeof(XvEncodingRec));
+	adaptor->pEncodings = XNFalloc(sizeof(XvEncodingRec));
 	adaptor->pEncodings[0].id = 0;
 	adaptor->pEncodings[0].pScreen = screen;
 	adaptor->pEncodings[0].name = (char *)"XV_IMAGE";
src/sna/sna_video_textured.c +1 -1
index 6e30461d..0b3330f2 100644
@@ -414,7 +414,7 @@ void sna_video_textured_setup(struct sna *sna, ScreenPtr screen)
 	adaptor->pScreen = screen;
 	adaptor->name = (char *)"Intel(R) Textured Video";
 	adaptor->nEncodings = 1;
-	adaptor->pEncodings = xnfalloc(sizeof(XvEncodingRec));
+	adaptor->pEncodings = XNFalloc(sizeof(XvEncodingRec));
 	adaptor->pEncodings[0].id = 0;
 	adaptor->pEncodings[0].pScreen = screen;
 	adaptor->pEncodings[0].name = (char *)"XV_IMAGE";
src/uxa/intel_uxa_video.c +1 -1
index 8287be4b..8e0eb4a2 100644
@@ -339,7 +339,7 @@ XF86VideoAdaptorPtr intel_uxa_video_setup_image_textured(ScreenPtr screen)
 	adapt->flags = 0;
 	adapt->name = "Intel(R) Textured Video";
 	adapt->nEncodings = 1;
-	adapt->pEncodings = xnfalloc(sizeof(intel_xv_dummy_encoding));
+	adapt->pEncodings = XNFalloc(sizeof(intel_xv_dummy_encoding));
 	memcpy(adapt->pEncodings, intel_xv_dummy_encoding, sizeof(intel_xv_dummy_encoding));
 	adapt->nFormats = NUM_FORMATS;
 	adapt->pFormats = intel_xv_formats;
src/uxa/intel_video_overlay.c +2 -2
index 8e0eb7af..35f615c2 100644
@@ -465,7 +465,7 @@ XF86VideoAdaptorPtr intel_video_overlay_setup_image(ScreenPtr screen)
 	adapt->flags = VIDEO_OVERLAID_IMAGES /*| VIDEO_CLIP_TO_VIEWPORT */ ;
 	adapt->name = "Intel(R) Video Overlay";
 	adapt->nEncodings = 1;
-	adapt->pEncodings = xnfalloc(sizeof(intel_xv_dummy_encoding));
+	adapt->pEncodings = XNFalloc(sizeof(intel_xv_dummy_encoding));
 	memcpy(adapt->pEncodings, intel_xv_dummy_encoding, sizeof(intel_xv_dummy_encoding));
 	if (IS_845G(intel) || IS_I830(intel)) {
 		adapt->pEncodings->width = IMAGE_MAX_WIDTH_LEGACY;
@@ -483,7 +483,7 @@ XF86VideoAdaptorPtr intel_video_overlay_setup_image(ScreenPtr screen)
 	if (INTEL_INFO(intel)->gen >= 030)
 		adapt->nAttributes += GAMMA_ATTRIBUTES;	/* has gamma */
 	adapt->pAttributes =
-	    xnfalloc(sizeof(XF86AttributeRec) * adapt->nAttributes);
+	    XNFalloc(sizeof(XF86AttributeRec) * adapt->nAttributes);
 	/* Now copy the attributes */
 	att = adapt->pAttributes;
 	memcpy((char *)att, (char *)intel_xv_attributes,

--
2.39.5

#19 lore raw

PATCH 11/16 use XNFcallocarray() instead of xnfcalloc macro

In reply to a message not in the archive

xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve any practical purpose, so it can go away once all drivers stopped using it.

---
 src/legacy/i810/i810_driver.c | 4 ++--
 src/legacy/i810/i810_xaa.c    | 4 ++--
 src/uxa/intel_driver.c        | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
src/legacy/i810/i810_driver.c +2 -2
index 778b1a41..e24d3f8b 100644
@@ -155,7 +155,7 @@ I810GetRec(ScrnInfoPtr scrn)
    if (((uintptr_t)scrn->driverPrivate & 3) == 0)
       return TRUE;
 
-   scrn->driverPrivate = xnfcalloc(sizeof(I810Rec), 1);
+   scrn->driverPrivate = XNFcallocarray(sizeof(I810Rec), 1);
    return TRUE;
 }
 
@@ -503,7 +503,7 @@ I810PreInit(ScrnInfoPtr scrn, int flags)
 	 pI810->MaxClock = 86000;
       }
    }
-   clockRanges = xnfcalloc(sizeof(ClockRange), 1);
+   clockRanges = XNFcallocarray(sizeof(ClockRange), 1);
    clockRanges->next = NULL;
    /* 9.4MHz appears to be the smallest that works. */
    clockRanges->minClock = 9500;
src/legacy/i810/i810_xaa.c +2 -2
index ea03441b..1e0a8527 100644
@@ -284,7 +284,7 @@ I810AccelInit(ScreenPtr pScreen)
 
       pI810->NumScanlineColorExpandBuffers = nr_buffers;
       pI810->ScanlineColorExpandBuffers = (unsigned char **)
-	    xnfcalloc(nr_buffers, sizeof(unsigned char *));
+	    XNFcallocarray(nr_buffers, sizeof(unsigned char *));
 
       for (i = 0; i < nr_buffers; i++, ptr += width)
 	 pI810->ScanlineColorExpandBuffers[i] = ptr;
@@ -295,7 +295,7 @@ I810AccelInit(ScreenPtr pScreen)
 							  | 0);
 
       infoPtr->ScanlineColorExpandBuffers = (unsigned char **)
-	    xnfcalloc(1, sizeof(unsigned char *));
+	    XNFcallocarray(1, sizeof(unsigned char *));
       infoPtr->NumScanlineColorExpandBuffers = 1;
 
       infoPtr->ScanlineColorExpandBuffers[0] =
src/uxa/intel_driver.c +1 -1
index 79105b89..24783492 100644
@@ -460,7 +460,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
 		return TRUE;
 
 	if (((uintptr_t)scrn->driverPrivate) & 3) {
-		intel = xnfcalloc(sizeof(*intel), 1);
+		intel = XNFcallocarray(sizeof(*intel), 1);
 		if (intel == NULL)
 			return FALSE;
 

--
2.39.5

#20 lore raw

Re: [PATCH 11/16] use XNFcallocarray() instead of xnfcalloc macro

Quoted 15 lines · metux IT consult

xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve any practical purpose, so it can go away once all drivers stopped using it.

---
 src/legacy/i810/i810_driver.c | 4 ++--
 src/legacy/i810/i810_xaa.c    | 4 ++--
 src/uxa/intel_driver.c        | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
src/legacy/i810/i810_driver.c +0 -0
index 778b1a41..e24d3f8b 100644

src/legacy/i810/i810_driver.c I810GetRec(ScrnInfoPtr scrn) · line 158

Quoted 5 lines
src/legacy/i810/i810_driver.c +1 -1
@@ -155,7 +155,7 @@ I810GetRec(ScrnInfoPtr scrn)
    if (((uintptr_t)scrn->driverPrivate & 3) == 0)
       return TRUE;
 
-   scrn->driverPrivate = xnfcalloc(sizeof(I810Rec), 1);
+   scrn->driverPrivate = XNFcallocarray(sizeof(I810Rec), 1);

Hmm. These have transposed arguments as well. I just fixed the normal calloc()s because the compiler was unhappy:

commit fc07603ee033 ("Fix transposed calloc() arguments")

Quoted 49 lines
src/legacy/i810/i810_driver.c +1 -1
    return TRUE;
 }
 
@@ -503,7 +503,7 @@ I810PreInit(ScrnInfoPtr scrn, int flags)
 	 pI810->MaxClock = 86000;
       }
    }
-   clockRanges = xnfcalloc(sizeof(ClockRange), 1);
+   clockRanges = XNFcallocarray(sizeof(ClockRange), 1);
    clockRanges->next = NULL;
    /* 9.4MHz appears to be the smallest that works. */
    clockRanges->minClock = 9500;
src/legacy/i810/i810_xaa.c +2 -2
index ea03441b..1e0a8527 100644
@@ -284,7 +284,7 @@ I810AccelInit(ScreenPtr pScreen)
 
       pI810->NumScanlineColorExpandBuffers = nr_buffers;
       pI810->ScanlineColorExpandBuffers = (unsigned char **)
-	    xnfcalloc(nr_buffers, sizeof(unsigned char *));
+	    XNFcallocarray(nr_buffers, sizeof(unsigned char *));
 
       for (i = 0; i < nr_buffers; i++, ptr += width)
 	 pI810->ScanlineColorExpandBuffers[i] = ptr;
@@ -295,7 +295,7 @@ I810AccelInit(ScreenPtr pScreen)
 							  | 0);
 
       infoPtr->ScanlineColorExpandBuffers = (unsigned char **)
-	    xnfcalloc(1, sizeof(unsigned char *));
+	    XNFcallocarray(1, sizeof(unsigned char *));
       infoPtr->NumScanlineColorExpandBuffers = 1;
 
       infoPtr->ScanlineColorExpandBuffers[0] =
src/uxa/intel_driver.c +1 -2
index 79105b89..24783492 100644
@@ -460,7 +460,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
 		return TRUE;
 
 	if (((uintptr_t)scrn->driverPrivate) & 3) {
-		intel = xnfcalloc(sizeof(*intel), 1);
+		intel = XNFcallocarray(sizeof(*intel), 1);
 		if (intel == NULL)
 			return FALSE;
 
--

2.39.5

Signature · 2 lines
Ville Syrjälä
Intel
#21 lore raw

PATCH 12/16 sna: use xserver's bswap_32()

In reply to a message not in the archive

Some (non-BSD) platforms don't have <byteswap.h>, so better use the Xserver's bswap_32() implementation here.

---
 src/sna/sna_video.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/sna/sna_video.c +2 -1
index b7aa6624..9217a42f 100644
@@ -68,7 +68,8 @@
 #define bswap_32 bswap32
 #endif
 #else
-#include <byteswap.h>
+/* use Xserver's implementation */
+#include "misc.h"
 #endif
 
 #ifdef SNA_XVMC

--
2.39.5

#22 lore raw

PATCH 13/16 meson.build: increase required version

In reply to a message not in the archive

tools/meson.build:45: WARNING: Project targets '>0.40.0' but uses feature introduced in '0.41.0': capture arg in configure_file. 377tools/meson.build:45: WARNING: Project targets '>0.40.0' but uses feature introduced in '0.50.0': install arg in configure_file.

---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
index 227ca2eb..fa861401 100644
@@ -5,7 +5,7 @@ project('xf86-video-intel', 'c',
 	  'c_std=gnu99',
 	],
 	license : 'MIT',
-	meson_version : '>0.40.0')
+	meson_version : '>=0.50.0')
 
 config = configuration_data()
 

--
2.39.5

#23 lore raw

Re: [PATCH 13/16] meson.build: increase required version

Quoted 2 lines · metux IT consult

tools/meson.build:45: WARNING: Project targets '>0.40.0' but uses feature introduced in '0.41.0': capture arg in configure_file. 377tools/meson.build:45: WARNING: Project targets '>0.40.0' but uses feature introduced in '0.50.0': install arg in configure_file.

I have a feeling meson itself might be confused as to when things got added. I'm pretty sure I just used whatever meson version I had at the time and it hasn't been touched since.

But whatever, >=0.50 seems reasonable enough.

Quoted 21 lines
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -2
index 227ca2eb..fa861401 100644
@@ -5,7 +5,7 @@ project('xf86-video-intel', 'c',
 	  'c_std=gnu99',
 	],
 	license : 'MIT',
-	meson_version : '>0.40.0')
+	meson_version : '>=0.50.0')
 
 config = configuration_data()
 
--

2.39.5

Signature · 2 lines
Ville Syrjälä
Intel
#24 lore raw

PATCH 14/16 Define __container_of only if not defined yet.

In reply to a message not in the archive

Silence warnings.

---
 benchmarks/dri3-swap.c | 2 ++
 src/intel_list.h       | 3 +++
 test/present-speed.c   | 2 ++
 3 files changed, 7 insertions(+)
benchmarks/dri3-swap.c +2 -0
index 4dd423b3..fa8ec34e 100644
@@ -110,8 +110,10 @@ list_move(struct list *list, struct list *head)
 	}
 }
 
+#ifndef __container_of
 #define __container_of(ptr, sample, member)				\
     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
+#endif
 
 #define list_for_each_entry(pos, head, member)				\
     for (pos = __container_of((head)->next, pos, member);		\
src/intel_list.h +3 -0
index c8a3187a..f0fe7af9 100644
@@ -305,8 +305,11 @@ list_is_empty(const struct list *head)
 #define list_last_entry(ptr, type, member) \
     list_entry((ptr)->prev, type, member)
 
+#ifndef __container_of
 #define __container_of(ptr, sample, member)				\
     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
+#endif
+
 /**
  * Loop through the list given by head and set pos to struct in the list.
  *
test/present-speed.c +2 -0
index eccde931..7765aa94 100644
@@ -108,8 +108,10 @@ list_move(struct list *list, struct list *head)
 	}
 }
 
+#ifndef __container_of
 #define __container_of(ptr, sample, member)				\
     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
+#endif
 
 #define list_for_each_entry(pos, head, member)				\
     for (pos = __container_of((head)->next, pos, member);		\

--
2.39.5

#25 lore raw

Re: [PATCH 14/16] Define __container_of only if not defined yet.

Quoted 7 lines · metux IT consult

Silence warnings.

---
 benchmarks/dri3-swap.c | 2 ++
 src/intel_list.h       | 3 +++
 test/present-speed.c   | 2 ++

Looks like I never added the benchmarks and tests to the meson build. So that could partially explain why I'm not seeing this. But intel_list.h is used for real so I'm confused as to why you are seeing some issues that I can't see.

Who is defining this in your case?

Quoted 50 lines
 3 files changed, 7 insertions(+)
benchmarks/dri3-swap.c +2 -0
index 4dd423b3..fa8ec34e 100644
@@ -110,8 +110,10 @@ list_move(struct list *list, struct list *head)
 	}
 }
 
+#ifndef __container_of
 #define __container_of(ptr, sample, member)				\
     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
+#endif
 
 #define list_for_each_entry(pos, head, member)				\
     for (pos = __container_of((head)->next, pos, member);		\
src/intel_list.h +3 -0
index c8a3187a..f0fe7af9 100644
@@ -305,8 +305,11 @@ list_is_empty(const struct list *head)
 #define list_last_entry(ptr, type, member) \
     list_entry((ptr)->prev, type, member)
 
+#ifndef __container_of
 #define __container_of(ptr, sample, member)				\
     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
+#endif
+
 /**
  * Loop through the list given by head and set pos to struct in the list.
  *
test/present-speed.c +2 -1
index eccde931..7765aa94 100644
@@ -108,8 +108,10 @@ list_move(struct list *list, struct list *head)
 	}
 }
 
+#ifndef __container_of
 #define __container_of(ptr, sample, member)				\
     (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
+#endif
 
 #define list_for_each_entry(pos, head, member)				\
     for (pos = __container_of((head)->next, pos, member);		\
--

2.39.5

Signature · 2 lines
Ville Syrjälä
Intel
#26 lore raw

PATCH 15/16 use dixDestroyPixmap() instead of direct driver call

In reply to a message not in the archive

Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping jungle, so use the proper dix function instead.

See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754

---
 src/sna/sna_accel.c        |  8 ++++----
 src/sna/sna_display.c      |  6 +++---
 src/sna/sna_display_fake.c |  2 +-
 src/sna/sna_dri2.c         |  2 +-
 src/sna/sna_dri3.c         |  2 +-
 src/sna/sna_driver.c       |  4 ++--
 src/sna/sna_glyphs.c       |  2 +-
 src/sna/sna_render.c       | 14 +++++++-------
 src/sna/sna_video_sprite.c |  4 ++--
 src/uxa/i915_video.c       |  4 ++--
 src/uxa/intel_display.c    | 10 +++++-----
 src/uxa/intel_dri.c        | 14 +++++++-------
 src/uxa/intel_uxa.c        | 10 +++++-----
 src/uxa/uxa-glyphs.c       | 12 ++++++------
 src/uxa/uxa-render.c       | 24 ++++++++++++------------
 src/uxa/uxa.c              |  5 ++---
 16 files changed, 61 insertions(+), 62 deletions(-)
src/sna/sna_accel.c +4 -4
index 90a61ab3..e3c57edd 100644
@@ -982,7 +982,7 @@ fallback:
 
 		if (!screen->ModifyPixmapHeader(pixmap, width, height, depth,
 						bpp, pitch, addr)) {
-			screen->DestroyPixmap(pixmap);
+			dixDestroyPixmap(pixmap, 0);
 			return NULL;
 		}
 
@@ -6871,10 +6871,10 @@ discard_cow:
 						    box, n, 0)) {
 				DBG(("%s: fallback - accelerated copy boxes failed\n",
 				     __FUNCTION__));
-				tmp->drawable.pScreen->DestroyPixmap(tmp);
+				dixDestroyPixmap(tmp, 0);
 				goto fallback;
 			}
-			tmp->drawable.pScreen->DestroyPixmap(tmp);
+			dixDestroyPixmap(tmp, 0);
 
 			if (damage)
 				sna_damage_add_to_pixmap(damage, region, dst_pixmap);
@@ -18011,7 +18011,7 @@ sna_set_screen_pixmap(PixmapPtr pixmap)
 	pixmap->refcnt++;
 
 	if (old_front)
-		screen->DestroyPixmap(old_front);
+		dixDestroyPixmap(old_front, 0);
 }
 
 static Bool
src/sna/sna_display.c +3 -3
index d4adf34f..33a7e70f 100644
@@ -6046,7 +6046,7 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height)
 	screen->SetScreenPixmap(new_front);
 	assert(screen->GetScreenPixmap(screen) == new_front);
 	assert(sna->front == new_front);
-	screen->DestroyPixmap(new_front); /* owned by screen now */
+	dixDestroyPixmap(new_front, 0); /* owned by screen now */
 
 	scrn->virtualX = width;
 	scrn->virtualY = height;
@@ -8918,7 +8918,7 @@ sna_crtc_redisplay__fallback(xf86CrtcPtr crtc, RegionPtr region, struct kgem_bo
 free_src:
 	FreePicture(src, None);
 free_pixmap:
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 }
 
 static void
@@ -9028,7 +9028,7 @@ sna_crtc_redisplay__composite(xf86CrtcPtr crtc, RegionPtr region, struct kgem_bo
 free_src:
 	FreePicture(src, None);
 free_pixmap:
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 }
 
 static void
src/sna/sna_display_fake.c +1 -1
index 401e9a06..ed26199c 100644
@@ -215,7 +215,7 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height)
 	assert(screen->GetScreenPixmap(screen) == new_front);
 	assert(to_sna_from_screen(screen)->front == new_front);
 
-	screen->DestroyPixmap(new_front);
+	dixDestroyPixmap(new_front, 0);
 
 	return TRUE;
 }
src/sna/sna_dri2.c +1 -1
index ee4b89db..f5f47554 100644
@@ -934,7 +934,7 @@ static void _sna_dri2_destroy_buffer(struct sna *sna,
 		sna_watch_flush(sna, -1);
 
 		sna_pixmap_set_buffer(pixmap, NULL);
-		pixmap->drawable.pScreen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 	}
 
 	sna_dri2_cache_bo(sna, draw,
src/sna/sna_dri3.c +1 -1
index ce4970ae..cea1efc7 100644
@@ -284,7 +284,7 @@ static PixmapPtr sna_dri3_pixmap_from_fd(ScreenPtr screen,
 	return pixmap;
 
 free_pixmap:
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 free_bo:
 	kgem_bo_destroy(&sna->kgem, bo);
 	return NULL;
src/sna/sna_driver.c +2 -2
index 137f29e8..66e8731e 100644
@@ -266,7 +266,7 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
 	screen->SetScreenPixmap(new_front);
 	assert(screen->GetScreenPixmap(screen) == new_front);
 	assert(sna->front == new_front);
-	screen->DestroyPixmap(new_front); /* transfer ownership to screen */
+	dixDestroyPixmap(new_front, 0); /* transfer ownership to screen */
 
 	sna_mode_set_primary(sna);
 
@@ -1011,7 +1011,7 @@ static Bool sna_early_close_screen(CLOSE_SCREEN_ARGS_DECL)
 	}
 
 	if (sna->front) {
-		screen->DestroyPixmap(sna->front);
+		dixDestroyPixmap(sna->front, 0);
 		sna->front = NULL;
 	}
 
src/sna/sna_glyphs.c +1 -1
index ebc061b5..a3894518 100644
@@ -260,7 +260,7 @@ bool sna_glyphs_create(struct sna *sna)
 						serverClient, &error);
 		}
 
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		if (!picture)
 			goto bail;
 
src/sna/sna_render.c +7 -7
index 904d4400..a0fdabcb 100644
@@ -875,7 +875,7 @@ cleanup_src:
 cleanup_dst:
 	FreePicture(tmp_dst, 0);
 cleanup_tmp:
-	screen->DestroyPixmap(tmp);
+	dixDestroyPixmap(tmp, 0);
 	return ret;
 }
 
@@ -1348,7 +1348,7 @@ sna_render_picture_convolve(struct sna *sna,
 		tmp = CreatePicture(0, &pixmap->drawable,
 				PictureMatchFormat(screen, depth, channel->pict_format),
 				0, NULL, serverClient, &error);
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 	if (tmp == NULL)
 		return -1;
 
@@ -1429,7 +1429,7 @@ sna_render_picture_flatten(struct sna *sna,
 	tmp = CreatePicture(0, &pixmap->drawable,
 			    PictureMatchFormat(screen, 32, PICT_a8r8g8b8),
 			    0, NULL, serverClient, &error);
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 	if (tmp == NULL)
 		return false;
 
@@ -1811,7 +1811,7 @@ sna_render_picture_convert(struct sna *sna,
 						       channel->pict_format),
 				    0, NULL, serverClient, &error);
 		if (dst == NULL) {
-			screen->DestroyPixmap(tmp);
+			dixDestroyPixmap(tmp, 0);
 			return 0;
 		}
 
@@ -1822,7 +1822,7 @@ sna_render_picture_convert(struct sna *sna,
 				    0, NULL, serverClient, &error);
 		if (src == NULL) {
 			FreePicture(dst, 0);
-			screen->DestroyPixmap(tmp);
+			dixDestroyPixmap(tmp, 0);
 			return 0;
 		}
 
@@ -1839,7 +1839,7 @@ sna_render_picture_convert(struct sna *sna,
 
 		channel->bo = __sna_pixmap_get_bo(tmp);
 		kgem_bo_reference(channel->bo);
-		screen->DestroyPixmap(tmp);
+		dixDestroyPixmap(tmp, 0);
 	} else {
 		pixman_image_t *src, *dst;
 		void *ptr;
@@ -2173,7 +2173,7 @@ copy_overlap(struct sna *sna, uint8_t alu,
 				      draw, bo, dst_dx, dst_dy,
 				      box, n, 0));
 
-	screen->DestroyPixmap(tmp);
+	dixDestroyPixmap(tmp, 0);
 	return ret;
 }
 bool
src/sna/sna_video_sprite.c +2 -2
index 2d012b95..7d9a13e1 100644
@@ -666,7 +666,7 @@ off:
 			}
 
 			if (!sna->render.video(sna, video, &frame, &r, scaled)) {
-				screen->DestroyPixmap(scaled);
+				dixDestroyPixmap(scaled, 0);
 				ret = BadAlloc;
 				goto err;
 			}
@@ -685,7 +685,7 @@ off:
 			frame.height = frame.image.y2;
 			frame.pitch[0] = frame.bo->pitch;
 
-			screen->DestroyPixmap(scaled);
+			dixDestroyPixmap(scaled, 0);
 			cache_bo = false;
 		}
 
src/uxa/i915_video.c +2 -2
index a2fb50cf..6f7ae91e 100644
@@ -79,7 +79,7 @@ I915DisplayVideoTextured(ScrnInfoPtr scrn,
 			return;
 
 		if (intel_uxa_get_pixmap_bo(target) == NULL) {
-			screen->DestroyPixmap(target);
+			dixDestroyPixmap(target, 0);
 			return;
 		}
 
@@ -485,7 +485,7 @@ I915DisplayVideoTextured(ScrnInfoPtr scrn,
 			FreeScratchGC(gc);
 		}
 
-		target->drawable.pScreen->DestroyPixmap(target);
+		dixDestroyPixmap(target, 0);
 	}
 
 	intel_uxa_debug_flush(scrn);
src/uxa/intel_display.c +5 -5
index 2a544779..17198ffc 100644
@@ -563,7 +563,7 @@ intel_create_pixmap_header(ScreenPtr pScreen, int width, int height, int depth,
                 {
                         return pixmap;
                 }
-                (*pScreen->DestroyPixmap) (pixmap);
+                dixDestroyPixmap(pixmap, 0);
         }
         return NullPixmap;
 }
@@ -620,7 +620,7 @@ intel_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
 
 	if (rotate_pixmap) {
                 intel_set_pixmap_bo(rotate_pixmap, NULL);
-                rotate_pixmap->drawable.pScreen->DestroyPixmap(rotate_pixmap);
+                dixDestroyPixmap(rotate_pixmap, 0);
 	}
 
 	if (data) {
@@ -2408,7 +2408,7 @@ intel_create_pixmap_for_bo(ScreenPtr pScreen, dri_bo *bo,
 					 width, height,
 					 depth, bpp,
 					 pitch, NULL)) {
-		pScreen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		return NullPixmap;
 	}
 
@@ -2515,9 +2515,9 @@ void intel_copy_fb(ScrnInfoPtr scrn)
 #endif
 
 cleanup_dst:
-	(*pScreen->DestroyPixmap)(dst);
+	dixDestroyPixmap(dst, 0);
 cleanup_src:
-	(*pScreen->DestroyPixmap)(src);
+	dixDestroyPixmap(src, 0);
 }
 
 void
src/uxa/intel_dri.c +7 -7
index d91ed295..ddce265c 100644
@@ -210,7 +210,7 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments,
 			    intel_get_pixmap_bo(pixmap) == NULL)
 			{
 				if (pixmap)
-					screen->DestroyPixmap(pixmap);
+					dixDestroyPixmap(pixmap, 0);
 				goto unwind;
 			}
 		}
@@ -228,7 +228,7 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments,
 
 		if ((buffers[i].name = pixmap_flink(pixmap)) == 0) {
 			/* failed to name buffer */
-			screen->DestroyPixmap(pixmap);
+			dixDestroyPixmap(pixmap, 0);
 			goto unwind;
 		}
 	}
@@ -237,7 +237,7 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments,
 
 unwind:
 	while (i--)
-		screen->DestroyPixmap(privates[i].pixmap);
+		dixDestroyPixmap(privates[i].pixmap, 0);
 	free(privates);
 	free(buffers);
 	return NULL;
@@ -252,7 +252,7 @@ I830DRI2DestroyBuffers(DrawablePtr drawable, DRI2BufferPtr buffers, int count)
 
 	for (i = 0; i < count; i++) {
 		private = buffers[i].driverPrivate;
-		screen->DestroyPixmap(private->pixmap);
+		dixDestroyPixmap(private->pixmap, 0);
 	}
 
 	if (buffers) {
@@ -353,7 +353,7 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment,
 					      hint);
 		if (pixmap == NULL || intel_get_pixmap_bo(pixmap) == NULL) {
 			if (pixmap)
-				screen->DestroyPixmap(pixmap);
+				dixDestroyPixmap(pixmap, 0);
 			free(privates);
 			free(buffer);
 			return NULL;
@@ -371,7 +371,7 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment,
 
 	if ((buffer->name = pixmap_flink(pixmap)) == 0) {
 		/* failed to name buffer */
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		free(privates);
 		free(buffer);
 		return NULL;
@@ -386,7 +386,7 @@ static void I830DRI2DestroyBuffer(DrawablePtr drawable, DRI2Buffer2Ptr buffer)
 		I830DRI2BufferPrivatePtr private = buffer->driverPrivate;
 		if (--private->refcnt == 0) {
 			ScreenPtr screen = private->pixmap->drawable.pScreen;
-			screen->DestroyPixmap(private->pixmap);
+			dixDestroyPixmap(private->pixmap, 0);
 
 			free(private);
 			free(buffer);
src/uxa/intel_uxa.c +5 -5
index ec32a723..3ab70a30 100644
@@ -811,7 +811,7 @@ static Bool intel_uxa_put_image(PixmapPtr pixmap,
 				return FALSE;
 
 			if (!intel_uxa_pixmap_is_offscreen(scratch)) {
-				screen->DestroyPixmap(scratch);
+				dixDestroyPixmap(scratch, 0);
 				return FALSE;
 			}
 
@@ -830,7 +830,7 @@ static Bool intel_uxa_put_image(PixmapPtr pixmap,
 					ret = FALSE;
 			}
 
-			(*screen->DestroyPixmap)(scratch);
+			dixDestroyPixmap(scratch, 0);
 			return ret;
 		}
 	}
@@ -896,13 +896,13 @@ static Bool intel_uxa_get_image(PixmapPtr pixmap,
 			return FALSE;
 
 		if (!intel_uxa_pixmap_is_offscreen(scratch)) {
-			screen->DestroyPixmap(scratch);
+			dixDestroyPixmap(scratch, 0);
 			return FALSE;
 		}
 
 		gc = GetScratchGC(pixmap->drawable.depth, screen);
 		if (!gc) {
-			screen->DestroyPixmap(scratch);
+			dixDestroyPixmap(scratch, 0);
 			return FALSE;
 		}
 
@@ -923,7 +923,7 @@ static Bool intel_uxa_get_image(PixmapPtr pixmap,
 	ret = intel_uxa_pixmap_get_image(pixmap, x, y, w, h, dst, dst_pitch);
 
 	if (scratch)
-		scratch->drawable.pScreen->DestroyPixmap(scratch);
+		dixDestroyPixmap(scratch, 0);
 
 	return ret;
 }
src/uxa/uxa-glyphs.c +6 -6
index d24ba518..ac33178d 100644
@@ -172,7 +172,7 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen)
 			goto bail;
 		if (!uxa_pixmap_is_offscreen(pixmap)) {
 			/* Presume shadow is in-effect */
-			pScreen->DestroyPixmap(pixmap);
+			dixDestroyPixmap(pixmap, 0);
 			uxa_unrealize_glyph_caches(pScreen);
 			return TRUE;
 		}
@@ -182,7 +182,7 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen)
 					CPComponentAlpha, &component_alpha,
 					serverClient, &error);
 
-		pScreen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 
 		if (!picture)
 			goto bail;
@@ -293,7 +293,7 @@ uxa_glyph_cache_upload_glyph(ScreenPtr screen,
 		      x, y);
 
 	if (scratch != pGlyphPixmap)
-		screen->DestroyPixmap(scratch);
+		dixDestroyPixmap(scratch, 0);
 
 	FreeScratchGC(gc);
 }
@@ -769,7 +769,7 @@ uxa_glyphs_via_mask(CARD8 op,
 		return 1;
 
 	if (!uxa_pixmap_is_offscreen(pixmap)) {
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		return -1;
 	}
 
@@ -780,7 +780,7 @@ uxa_glyphs_via_mask(CARD8 op,
 	if (!white_pixmap) {
 		if (white)
 			FreePicture(white, 0);
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		return -1;
 	}
 
@@ -790,7 +790,7 @@ uxa_glyphs_via_mask(CARD8 op,
 	mask = CreatePicture(0, &pixmap->drawable,
 			      maskFormat, CPComponentAlpha,
 			      &component_alpha, serverClient, &error);
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 
 	if (!mask) {
 		FreePicture(white, 0);
src/uxa/uxa-render.c +12 -12
index 0c3e8560..ea3e9d4a 100644
@@ -479,7 +479,7 @@ uxa_picture_for_pixman_format(ScreenPtr screen,
 		return 0;
 
 	if (!uxa_pixmap_is_offscreen(pixmap)) {
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		return 0;
 	}
 
@@ -488,7 +488,7 @@ uxa_picture_for_pixman_format(ScreenPtr screen,
 						   PIXMAN_FORMAT_DEPTH(format),
 						   format),
 				0, 0, serverClient, &error);
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 	if (!picture)
 		return 0;
 
@@ -592,7 +592,7 @@ uxa_create_solid(ScreenPtr screen, uint32_t color)
 		return 0;
 
 	if (!uxa_prepare_access((DrawablePtr)pixmap, UXA_ACCESS_RW)) {
-		(*screen->DestroyPixmap)(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		return 0;
 	}
 	*((uint32_t *)pixmap->devPrivate.ptr) = color;
@@ -601,7 +601,7 @@ uxa_create_solid(ScreenPtr screen, uint32_t color)
 	picture = CreatePicture(0, &pixmap->drawable,
 				PictureMatchFormat(screen, 32, PICT_a8r8g8b8),
 				CPRepeat, &repeat, serverClient, &error);
-	(*screen->DestroyPixmap)(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 
 	return picture;
 }
@@ -828,13 +828,13 @@ uxa_acquire_drawable(ScreenPtr pScreen,
 
 	/* Skip the copy if the result remains in memory and not a bo */
 	if (!uxa_pixmap_is_offscreen(pPixmap)) {
-		pScreen->DestroyPixmap(pPixmap);
+		dixDestroyPixmap(pPixmap, 0);
 		return 0;
 	}
 
 	pGC = GetScratchGC(depth, pScreen);
 	if (!pGC) {
-		pScreen->DestroyPixmap(pPixmap);
+		dixDestroyPixmap(pPixmap, 0);
 		return 0;
 	}
 
@@ -846,7 +846,7 @@ uxa_acquire_drawable(ScreenPtr pScreen,
 	pDst = CreatePicture(0, &pPixmap->drawable,
 			     PictureMatchFormat(pScreen, depth, pSrc->format),
 			     0, 0, serverClient, &error);
-	pScreen->DestroyPixmap(pPixmap);
+	dixDestroyPixmap(pPixmap, 0);
 	if (!pDst)
 		return 0;
 
@@ -978,7 +978,7 @@ uxa_try_driver_composite(CARD8 op,
 
 		gc = GetScratchGC(depth, screen);
 		if (!gc) {
-			screen->DestroyPixmap(pixmap);
+			dixDestroyPixmap(pixmap, 0);
 			return 0;
 		}
 
@@ -993,7 +993,7 @@ uxa_try_driver_composite(CARD8 op,
 		localDst = CreatePicture(0, &pixmap->drawable,
 					 PictureMatchFormat(screen, depth, pDst->format),
 					 0, 0, serverClient, &error);
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 
 		if (!localDst)
 			return 0;
@@ -1238,7 +1238,7 @@ uxa_try_magic_two_pass_composite_helper(CARD8 op,
 
 		gc = GetScratchGC(depth, screen);
 		if (!gc) {
-			screen->DestroyPixmap(pixmap);
+			dixDestroyPixmap(pixmap, 0);
 			return 0;
 		}
 
@@ -1253,7 +1253,7 @@ uxa_try_magic_two_pass_composite_helper(CARD8 op,
 		localDst = CreatePicture(0, &pixmap->drawable,
 					 PictureMatchFormat(screen, depth, pDst->format),
 					 0, 0, serverClient, &error);
-		screen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 
 		if (!localDst)
 			return 0;
@@ -1574,7 +1574,7 @@ uxa_create_alpha_picture(ScreenPtr pScreen,
 		return 0;
 	pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat,
 				 0, 0, serverClient, &error);
-	(*pScreen->DestroyPixmap) (pPixmap);
+	dixDestroyPixmap(pPixmap, 0);
 	return pPicture;
 }
 
src/uxa/uxa.c +2 -3
index b682dfd9..125dc0c4 100644
@@ -191,7 +191,7 @@ uxa_validate_gc(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 
 #ifdef FB_24_32BIT
 	if ((changes & GCTile) && fbGetRotatedPixmap(pGC)) {
-		(*pGC->pScreen->DestroyPixmap) (fbGetRotatedPixmap(pGC));
+		dixDestroyPixmap(fbGetRotatedPixmap(pGC), 0);
 		fbGetRotatedPixmap(pGC) = 0;
 	}
 
@@ -205,8 +205,7 @@ uxa_validate_gc(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
 			    pNewTile->drawable.bitsPerPixel !=
 			    pDrawable->bitsPerPixel) {
 				if (pNewTile)
-					(*pGC->pScreen->
-					 DestroyPixmap) (pNewTile);
+					dixDestroyPixmap(pNewTile, 0);
 				/* fb24_32ReformatTile will do direct access
 				 * of a newly-allocated pixmap.  This isn't a
 				 * problem yet, since we don't put pixmaps in

--
2.39.5

#27 lore raw

PATCH 16/16 use xf86NameCmp() instead of xf86nameCompare()

In reply to a message not in the archive

This driver is the only one still using xf86nameCompare() and so blocking it's removal from Xserver module ABI.

---
 src/intel_module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/intel_module.c +1 -1
index 7ea0f5d3..f90b3cea 100644
@@ -654,7 +654,7 @@ static XF86ConfDevicePtr
 _xf86findDriver(const char *ident, XF86ConfDevicePtr p)
 {
 	while (p) {
-		if (p->dev_driver && xf86nameCompare(ident, p->dev_driver) == 0)
+		if (p->dev_driver && xf86NameCmp(ident, p->dev_driver) == 0)
 			return p;
 
 		p = p->list.next;

--
2.39.5

#28 lore raw

✗ LGCI.VerificationFailed: failure for series starting with [01/16] meson.build: fix missing Xv dependencies

In reply to a message not in the archive
== Series Details ==

== Series Details ==

Series: series starting with [01/16] meson.build: fix missing Xv dependencies
URL : https://patchwork.freedesktop.org/series/145783/
State : failure

== Summary ==

Address '[email protected]' is not on the allowlist! Exception occurred during validation, bailing out!