[PATCH xf86-video-amdgpu 6/6] Require xserver 1.9 or newer

Alex Deucher alexdeucher at gmail.com
Thu Mar 24 13:43:42 UTC 2016


On Thu, Mar 24, 2016 at 6:14 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> 1.9.0 was released in August 2010.
>
> We were already unintentionally relying on things not available in 1.8
> for at least a year, and nobody has complained.
>
> (Ported from radeon commit e592f32f8b5f5873fcc18b10a69dd5e4ccf11073)
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

For the series:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>


> ---
>  configure.ac        |  2 +-
>  src/amdgpu_dri2.c   | 14 --------------
>  src/amdgpu_glamor.c |  8 --------
>  src/amdgpu_pixmap.c |  4 ----
>  src/amdgpu_pixmap.h |  8 --------
>  src/amdgpu_video.c  |  2 --
>  6 files changed, 1 insertion(+), 37 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 1deab68..58b79c5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -76,7 +76,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.8 xproto fontsproto xf86driproto $REQUIRED_MODULES])
> +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9 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")
> diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
> index de628cd..4478b16 100644
> --- a/src/amdgpu_dri2.c
> +++ b/src/amdgpu_dri2.c
> @@ -71,18 +71,9 @@ struct dri2_window_priv {
>         int vblank_delta;
>  };
>
> -#if HAS_DEVPRIVATEKEYREC
> -
>  static DevPrivateKeyRec dri2_window_private_key_rec;
>  #define dri2_window_private_key (&dri2_window_private_key_rec)
>
> -#else
> -
> -static int dri2_window_private_key_index;
> -DevPrivateKey dri2_window_private_key = &dri2_window_private_key_index;
> -
> -#endif /* HAS_DEVPRIVATEKEYREC */
> -
>  #define get_dri2_window_priv(window) \
>         ((struct dri2_window_priv*) \
>          dixLookupPrivate(&(window)->devPrivates, dri2_window_private_key))
> @@ -1454,14 +1445,9 @@ Bool amdgpu_dri2_screen_init(ScreenPtr pScreen)
>                 driverNames[0] = driverNames[1] = dri2_info.driverName;
>
>                 if (DRI2InfoCnt == 0) {
> -#if HAS_DIXREGISTERPRIVATEKEY
>                         if (!dixRegisterPrivateKey(dri2_window_private_key,
>                                                    PRIVATE_WINDOW,
>                                                    sizeof(struct dri2_window_priv))) {
> -#else
> -                       if (!dixRequestPrivate(dri2_window_private_key,
> -                                              sizeof(struct dri2_window_priv))) {
> -#endif
>                                 xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
>                                            "Failed to get DRI2 window private\n");
>                                 return FALSE;
> diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
> index efde2b0..52aa30d 100644
> --- a/src/amdgpu_glamor.c
> +++ b/src/amdgpu_glamor.c
> @@ -38,11 +38,7 @@
>
>  #include <GL/gl.h>
>
> -#if HAS_DEVPRIVATEKEYREC
>  DevPrivateKeyRec amdgpu_pixmap_index;
> -#else
> -int amdgpu_pixmap_index;
> -#endif
>
>  void amdgpu_glamor_exchange_buffers(PixmapPtr src, PixmapPtr dst)
>  {
> @@ -355,11 +351,7 @@ Bool amdgpu_glamor_init(ScreenPtr screen)
>                            "Failed to initialize textured pixmap of screen for glamor.\n");
>                 return FALSE;
>         }
> -#if HAS_DIXREGISTERPRIVATEKEY
>         if (!dixRegisterPrivateKey(&amdgpu_pixmap_index, PRIVATE_PIXMAP, 0))
> -#else
> -       if (!dixRequestPrivate(&amdgpu_pixmap_index, 0))
> -#endif
>                 return FALSE;
>
>         if (info->shadow_primary)
> diff --git a/src/amdgpu_pixmap.c b/src/amdgpu_pixmap.c
> index 0a1b0b1..f2008b5 100644
> --- a/src/amdgpu_pixmap.c
> +++ b/src/amdgpu_pixmap.c
> @@ -103,11 +103,7 @@ static Bool amdgpu_pixmap_destroy(PixmapPtr pixmap)
>  /* This should only be called when glamor is disabled */
>  Bool amdgpu_pixmap_init(ScreenPtr screen)
>  {
> -#if HAS_DIXREGISTERPRIVATEKEY
>         if (!dixRegisterPrivateKey(&amdgpu_pixmap_index, PRIVATE_PIXMAP, 0))
> -#else
> -       if (!dixRequestPrivate(&amdgpu_pixmap_index, 0))
> -#endif
>                 return FALSE;
>
>         screen->CreatePixmap = amdgpu_pixmap_create;
> diff --git a/src/amdgpu_pixmap.h b/src/amdgpu_pixmap.h
> index 6d16628..1fba90e 100644
> --- a/src/amdgpu_pixmap.h
> +++ b/src/amdgpu_pixmap.h
> @@ -39,19 +39,11 @@ struct amdgpu_pixmap {
>         uint32_t handle;
>  };
>
> -#if HAS_DEVPRIVATEKEYREC
>  extern DevPrivateKeyRec amdgpu_pixmap_index;
> -#else
> -extern int amdgpu_pixmap_index;
> -#endif
>
>  static inline struct amdgpu_pixmap *amdgpu_get_pixmap_private(PixmapPtr pixmap)
>  {
> -#if HAS_DEVPRIVATEKEYREC
>         return dixGetPrivate(&pixmap->devPrivates, &amdgpu_pixmap_index);
> -#else
> -       return dixLookupPrivate(&pixmap->devPrivates, &amdgpu_pixmap_index);
> -#endif
>  }
>
>  static inline void amdgpu_set_pixmap_private(PixmapPtr pixmap,
> diff --git a/src/amdgpu_video.c b/src/amdgpu_video.c
> index af34e10..8f9a2b9 100644
> --- a/src/amdgpu_video.c
> +++ b/src/amdgpu_video.c
> @@ -90,9 +90,7 @@ amdgpu_pick_best_crtc(ScrnInfoPtr pScrn, Bool consider_disabled,
>         best_coverage = 0;
>
>         /* Prefer the CRTC of the primary output */
> -#ifdef HAS_DIXREGISTERPRIVATEKEY
>         if (dixPrivateKeyRegistered(rrPrivKey))
> -#endif
>         {
>                 primary_output = RRFirstOutput(pScrn->pScreen);
>         }
> --
> 2.8.0.rc3
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> https://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list