Skip to contentSkip to conversation

Require xserver 1.10 or newer

PATCH In review Michel Dänzer 2 participants 2 messages Nov 1, 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 c7d27c94cb65 ("Keep track of damage event related flushes per-client").

(Ported from radeon commit 5df36de39952c3a26cb2fbc125f298139a9dd5bc)

---
 configure.ac          | 2 +-
 src/amdgpu_drv.h      | 2 --
 src/amdgpu_kms.c      | 6 ------
 src/amdgpu_probe.c    | 5 -----
 src/drmmode_display.c | 7 -------
 src/drmmode_display.h | 2 --
 6 files changed, 1 insertion(+), 23 deletions(-)
configure.ac +1 -1
index b436db5..abdeb40 100644
@@ -74,7 +74,7 @@ PKG_CHECK_MODULES(LIBDRM_AMDGPU, [libdrm_amdgpu])
 PKG_CHECK_MODULES(GBM, [gbm])
 
 # 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/amdgpu_drv.h +0 -2
index fc6a79d..0f6bbf4 100644
@@ -227,9 +227,7 @@ typedef struct {
 	DisplayModePtr currentMode;
 
 	CreateScreenResourcesProcPtr CreateScreenResources;
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
 	CreateWindowProcPtr CreateWindow;
-#endif
 
 	Bool IsSecondary;
 
src/amdgpu_kms.c +0 -6
index 6fa63e9..acf3a7d 100644
@@ -1245,8 +1245,6 @@ static void AMDGPUSetupCapabilities(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
  */
@@ -1271,8 +1269,6 @@ static Bool AMDGPUCreateWindow_oneshot(WindowPtr pWin)
 	return ret;
 }
 
-#endif
-
 Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 {
 	AMDGPUInfoPtr info;
@@ -1820,12 +1816,10 @@ Bool AMDGPUScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
 	}
 	pScrn->pScreen = pScreen;
 
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
 	if (serverGeneration == 1 && bgNoneRoot && info->use_glamor) {
 		info->CreateWindow = pScreen->CreateWindow;
 		pScreen->CreateWindow = AMDGPUCreateWindow_oneshot;
 	}
-#endif
 
 	/* Provide SaveScreen & wrap BlockHandler and CloseScreen */
 	/* Wrap CloseScreen */
src/amdgpu_probe.c +0 -5
index 213d245..52e962d 100644
@@ -84,13 +84,8 @@ static char *amdgpu_bus_id(ScrnInfoPtr pScrn, struct pci_device *dev)
 {
 	char *busid;
 
-#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
 
 	if (!busid)
 		xf86DrvMsgVerb(pScrn->scrnIndex, X_ERROR, 0,
src/drmmode_display.c +0 -7
index b03a8a7..f514866 100644
@@ -327,8 +327,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)
@@ -442,8 +440,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)
@@ -1981,9 +1977,6 @@ static Bool 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 (!amdgpu_glamor_create_screen_resources(scrn->pScreen))
 		goto fail;
src/drmmode_display.h +0 -2
index 4973bc2..2c4a869 100644
@@ -138,9 +138,7 @@ extern void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id,
 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);
Signature · 6 lines
2.10.2

_______________________________________________
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): 20161101071002.16182-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 10 lines · Michel Dänzer

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

1.10.0 was released in February 2011.

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

(Ported from radeon commit 5df36de39952c3a26cb2fbc125f298139a9dd5bc)

Quoted 138 lines
---
 configure.ac          | 2 +-
 src/amdgpu_drv.h      | 2 --
 src/amdgpu_kms.c      | 6 ------
 src/amdgpu_probe.c    | 5 -----
 src/drmmode_display.c | 7 -------
 src/drmmode_display.h | 2 --
 6 files changed, 1 insertion(+), 23 deletions(-)
configure.ac +1 -1
index b436db5..abdeb40 100644
@@ -74,7 +74,7 @@ PKG_CHECK_MODULES(LIBDRM_AMDGPU, [libdrm_amdgpu])
 PKG_CHECK_MODULES(GBM, [gbm])
 
 # 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/amdgpu_drv.h +0 -2
index fc6a79d..0f6bbf4 100644
@@ -227,9 +227,7 @@ typedef struct {
        DisplayModePtr currentMode;
 
        CreateScreenResourcesProcPtr CreateScreenResources;
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
        CreateWindowProcPtr CreateWindow;
-#endif
 
        Bool IsSecondary;
 
src/amdgpu_kms.c +0 -6
index 6fa63e9..acf3a7d 100644
@@ -1245,8 +1245,6 @@ static void AMDGPUSetupCapabilities(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
  */
@@ -1271,8 +1269,6 @@ static Bool AMDGPUCreateWindow_oneshot(WindowPtr pWin)
        return ret;
 }
 
-#endif
-
 Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 {
        AMDGPUInfoPtr info;
@@ -1820,12 +1816,10 @@ Bool AMDGPUScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
        }
        pScrn->pScreen = pScreen;
 
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10
        if (serverGeneration == 1 && bgNoneRoot && info->use_glamor) {
                info->CreateWindow = pScreen->CreateWindow;
                pScreen->CreateWindow = AMDGPUCreateWindow_oneshot;
        }
-#endif
 
        /* Provide SaveScreen & wrap BlockHandler and CloseScreen */
        /* Wrap CloseScreen */
src/amdgpu_probe.c +0 -5
index 213d245..52e962d 100644
@@ -84,13 +84,8 @@ static char *amdgpu_bus_id(ScrnInfoPtr pScrn, struct pci_device *dev)
 {
        char *busid;
 
-#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
 
        if (!busid)
                xf86DrvMsgVerb(pScrn->scrnIndex, X_ERROR, 0,
src/drmmode_display.c +0 -7
index b03a8a7..f514866 100644
@@ -327,8 +327,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)
@@ -442,8 +440,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)
@@ -1981,9 +1977,6 @@ static Bool 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 (!amdgpu_glamor_create_screen_resources(scrn->pScreen))
                goto fail;
src/drmmode_display.h +0 -3
index 4973bc2..2c4a869 100644
@@ -138,9 +138,7 @@ extern void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id,
 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);
--

2.10.2

Quoted 4 lines

_______________________________________________
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