Skip to contentSkip to conversation

Require xserver 1.10 or newer

PATCH In review Michel Dänzer 2 participants 2 messages Oct 27, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Require xserver 1.10 or newer

From: Michel Dänzer <[email protected]>

1.10.0 was released in February 2011.

We've been accidentally requiring 1.10 or newer since 121a6de72da5 ("Keep track of damage event related flushes per-client v2").

---
 configure.ac          |  2 +-
 src/drmmode_display.c |  7 -------
 src/drmmode_display.h |  2 --
 src/radeon.h          |  2 --
 src/radeon_kms.c      | 12 ------------
 5 files changed, 1 insertion(+), 24 deletions(-)
configure.ac +1 -1
index 3fc967e..2f76945 100644
@@ -73,7 +73,7 @@ PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.58])
 PKG_CHECK_MODULES(LIBDRM_RADEON, [libdrm_radeon])
 
 # Obtain compiler/linker options for the driver dependencies
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9 xproto fontsproto xf86driproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10 xproto fontsproto xf86driproto $REQUIRED_MODULES])
 PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
                   HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
                   HAVE_XEXTPROTO_71="no")
src/drmmode_display.c +0 -7
index 9cf4846..b95e1c9 100644
@@ -388,8 +388,6 @@ drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
 					    crtc->x, crtc->y);
 }
 
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
-
 static PixmapPtr
 create_pixmap_for_fbcon(drmmode_ptr drmmode,
 			ScrnInfoPtr pScrn, int fbcon_id)
@@ -508,8 +506,6 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
 	return;
 }
 
-#endif /* GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10 */
-
 static void
 drmmode_crtc_scanout_destroy(drmmode_ptr drmmode,
 			     struct drmmode_scanout *scanout)
@@ -2149,9 +2145,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 					   width, height, -1, -1, pitch,
 					   info->fb_shadow);
 	}
-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,9,99,1,0)
-	scrn->pixmapPrivate.ptr = ppix->devPrivate.ptr;
-#endif
 
 	if (info->use_glamor)
 		radeon_glamor_create_screen_resources(scrn->pScreen);
src/drmmode_display.h +0 -2
index ade4a0b..85bcad9 100644
@@ -141,9 +141,7 @@ extern void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, st
 void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y);
 extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
 				      Bool set_hw);
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
 extern void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
-#endif
 extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn);
 
 extern void drmmode_scanout_free(ScrnInfoPtr scrn);
src/radeon.h +0 -2
index 0bf6d37..ad7e69c 100644
@@ -519,9 +519,7 @@ typedef struct {
     DisplayModePtr currentMode;
 
     CreateScreenResourcesProcPtr CreateScreenResources;
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
     CreateWindowProcPtr CreateWindow;
-#endif
 
     Bool              IsSecondary;
 
src/radeon_kms.c +0 -12
index 68c7837..872150d 100644
@@ -1402,13 +1402,8 @@ static int radeon_get_drm_master_fd(ScrnInfoPtr pScrn)
     }
 #endif
 
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0)
     XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
                 dev->domain, dev->bus, dev->dev, dev->func);
-#else
-    busid = XNFprintf("pci:%04x:%02x:%02x.%d",
-		      dev->domain, dev->bus, dev->dev, dev->func);
-#endif
 
     fd = drmOpen(NULL, busid);
     if (fd == -1)
@@ -1597,8 +1592,6 @@ static void RADEONSetupCapabilities(ScrnInfoPtr pScrn)
 #endif
 }
 
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
-
 /* When the root window is created, initialize the screen contents from
  * console if -background none was specified on the command line
  */
@@ -1623,8 +1616,6 @@ static Bool RADEONCreateWindow_oneshot(WindowPtr pWin)
     return ret;
 }
 
-#endif
-
 Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 {
     RADEONInfoPtr     info;
@@ -1714,7 +1705,6 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
     /* don't enable tiling if accel is not enabled */
     if (!info->r600_shadow_fb) {
 	Bool colorTilingDefault =
-	    xorgGetVersion() >= XORG_VERSION_NUMERIC(1,9,4,901,0) &&
 	    info->ChipFamily >= CHIP_FAMILY_R300 &&
 	    /* this check could be removed sometime after a big mesa release
 	     * with proper bit, in the meantime you need to set tiling option in
@@ -2303,12 +2293,10 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
     }
     pScrn->pScreen = pScreen;
 
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
     if (serverGeneration == 1 && bgNoneRoot && info->accelOn) {
 	info->CreateWindow = pScreen->CreateWindow;
 	pScreen->CreateWindow = RADEONCreateWindow_oneshot;
     }
-#endif
 
     /* Provide SaveScreen & wrap BlockHandler and CloseScreen */
     /* Wrap CloseScreen */
Signature · 6 lines
2.10.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20161027024858.30080-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 7 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Wednesday, October 26, 2016 10:49 PM
To: [email protected]
Subject: [PATCH xf86-video-ati] Require xserver 1.10 or newer

Quoted 8 lines

From: Michel Dänzer <[email protected]>

1.10.0 was released in February 2011.

We've been accidentally requiring 1.10 or newer since 121a6de72da5 ("Keep track of damage event related flushes per-client v2").

Quoted 153 lines
---
 configure.ac          |  2 +-
 src/drmmode_display.c |  7 -------
 src/drmmode_display.h |  2 --
 src/radeon.h          |  2 --
 src/radeon_kms.c      | 12 ------------
 5 files changed, 1 insertion(+), 24 deletions(-)
configure.ac +1 -1
index 3fc967e..2f76945 100644
@@ -73,7 +73,7 @@ PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.58])
 PKG_CHECK_MODULES(LIBDRM_RADEON, [libdrm_radeon])
 
 # Obtain compiler/linker options for the driver dependencies
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9 xproto fontsproto
 xf86driproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10 xproto fontsproto
 xf86driproto $REQUIRED_MODULES])
 PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
                   HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71,
1, [xextproto 7.1 available]),
                   HAVE_XEXTPROTO_71="no")
src/drmmode_display.c +0 -4
index 9cf4846..b95e1c9 100644
@@ -388,8 +388,6 @@ drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
 					    crtc->x, crtc->y);
 }
 
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
-
 static PixmapPtr
 create_pixmap_for_fbcon(drmmode_ptr drmmode,
 			ScrnInfoPtr pScrn, int fbcon_id)
@@ -508,8 +506,6 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn,
 drmmode_ptr drmmode)
 	return;
 }
 
-#endif /* GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10 */
-
 static void
 drmmode_crtc_scanout_destroy(drmmode_ptr drmmode,
src/drmmode_display.c +0 -3
 			     struct drmmode_scanout *scanout)
@@ -2149,9 +2145,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int
 width, int height)
 					   width, height, -1, -1, pitch,
 					   info->fb_shadow);
 	}
-#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,9,99,1,0)
-	scrn->pixmapPrivate.ptr = ppix->devPrivate.ptr;
-#endif
 
 	if (info->use_glamor)
src/drmmode_display.c +0 -0
 		radeon_glamor_create_screen_resources(scrn->pScreen);
src/drmmode_display.h +0 -0
index ade4a0b..85bcad9 100644
@@ -141,9 +141,7 @@ extern void drmmode_set_cursor(ScrnInfoPtr scrn,

drmmode_ptr drmmode, int id, st
void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
int x, int y);
extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn,
drmmode_ptr drmmode,

src/drmmode_display.h +0 -1
 				      Bool set_hw);
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
 extern void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr

drmmode);
-#endif
extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr
pScrn);

extern void drmmode_scanout_free(ScrnInfoPtr scrn);

src/radeon.h +0 -2
index 0bf6d37..ad7e69c 100644
@@ -519,9 +519,7 @@ typedef struct {
     DisplayModePtr currentMode;
 
     CreateScreenResourcesProcPtr CreateScreenResources;
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
     CreateWindowProcPtr CreateWindow;
-#endif
 
     Bool              IsSecondary;
 
src/radeon_kms.c +0 -5
index 68c7837..872150d 100644
@@ -1402,13 +1402,8 @@ static int radeon_get_drm_master_fd(ScrnInfoPtr
 pScrn)
     }
 #endif
 
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0)
     XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
                 dev->domain, dev->bus, dev->dev, dev->func);
-#else
-    busid = XNFprintf("pci:%04x:%02x:%02x.%d",
-		      dev->domain, dev->bus, dev->dev, dev->func);
-#endif
 
     fd = drmOpen(NULL, busid);
     if (fd == -1)
src/radeon_kms.c +0 -2
@@ -1597,8 +1592,6 @@ static void RADEONSetupCapabilities(ScrnInfoPtr
 pScrn)
 #endif
 }
 
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
-
 /* When the root window is created, initialize the screen contents from
  * console if -background none was specified on the command line

*/

src/radeon_kms.c +0 -2
@@ -1623,8 +1616,6 @@ static Bool
 RADEONCreateWindow_oneshot(WindowPtr pWin)
     return ret;
 }
 
-#endif
-
 Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 {
     RADEONInfoPtr     info;
src/radeon_kms.c +0 -1
@@ -1714,7 +1705,6 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int
 flags)
     /* don't enable tiling if accel is not enabled */
     if (!info->r600_shadow_fb) {
 	Bool colorTilingDefault =
-	    xorgGetVersion() >= XORG_VERSION_NUMERIC(1,9,4,901,0) &&
 	    info->ChipFamily >= CHIP_FAMILY_R300 &&
 	    /* this check could be removed sometime after a big mesa release
src/radeon_kms.c +0 -2
 	     * with proper bit, in the meantime you need to set tiling option in
@@ -2303,12 +2293,10 @@ Bool
 RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
     }
     pScrn->pScreen = pScreen;
 
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
     if (serverGeneration == 1 && bgNoneRoot && info->accelOn) {
 	info->CreateWindow = pScreen->CreateWindow;
 	pScreen->CreateWindow = RADEONCreateWindow_oneshot;
     }
-#endif
 
     /* Provide SaveScreen & wrap BlockHandler and CloseScreen */
     /* Wrap CloseScreen */
Quoted 7 lines

--
2.10.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx