[PATCH v2 xserver 3/4] dri2: refine dri2_probe_driver_name (v2)
Yu, Qiang
Qiang.Yu at amd.com
Mon Jan 23 06:30:39 UTC 2017
Hi,
If no further comments, can this patch be merged?
Regards,
Qiang
________________________________________
From: Emil Velikov <emil.l.velikov at gmail.com>
Sent: Wednesday, January 11, 2017 7:15:52 PM
To: Yu, Qiang
Cc: ML xorg-devel
Subject: Re: [PATCH v2 xserver 3/4] dri2: refine dri2_probe_driver_name (v2)
On 11 January 2017 at 05:59, Qiang Yu <Qiang.Yu at amd.com> wrote:
> V2:
> 1. update comment
> 2. check bustype if PCI
> 3. configure add libdrm version check for drmGetDevice
>
> Get PCI information from info->fd with drmGetDevice instead of
> assuming the info->fd is the first entity of scrn which is not
> true for multi entities scrn.
>
> Signed-off-by: Qiang Yu <Qiang.Yu at amd.com>
> ---
> configure.ac | 7 ++++++-
> hw/xfree86/dri2/dri2.c | 43 ++++++++++++++++++++++++-------------------
> 2 files changed, 30 insertions(+), 20 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 93c81a6..a2de471 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1340,7 +1340,12 @@ AM_CONDITIONAL(DRI3, test "x$DRI3" = xyes)
> if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then
> if test "x$DRM" = xyes; then
> AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support])
> - PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
> + if test "x$DRI2" = xyes; then
> + dnl 2.4.65 is required for drmGetDevice
> + PKG_CHECK_MODULES([LIBDRM], libdrm >= 2.4.65)
> + else
> + PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
> + fi
> fi
> fi
>
> diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
> index 2165603..f9f9859 100644
> --- a/hw/xfree86/dri2/dri2.c
> +++ b/hw/xfree86/dri2/dri2.c
> @@ -1440,21 +1440,17 @@ get_prime_id(void)
> static char *
> dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info)
> {
> - ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
> - EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
> - struct pci_device *pdev = NULL;
> +#ifdef WITH_LIBDRM
Nicely spotted ! I wonder if/how things were building w/o the guard.
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
-Emil
More information about the xorg-devel
mailing list