Re: [PATCH] drm: hibmc: Use set_busid function from drm core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

On 9 June 2017 at 07:57, Daniel Axtens <dja@xxxxxxxxxx> wrote:
> Currently, calling drmGetBusid from libdrm on a hibmc VGA
> card returns a string like "0007:a1:00.0".
>
> The busid reported by most cards begins with "pci:". For
> example, on an amd64 system, a VGA card reported
> "pci:0000:00:02.0".
>
> The missing "pci:" prefix confuses Xorg and leads to crashes
> and other misbehaviour.[0]
>
> Use the standard helper from the drm core to set the busid to
> include the "pci:" prefix. This is done by many other drivers.
>
> With this patch, Xorg can be run successfully.
>
> [0]: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1691991
>
> Cc: Xinliang Liu <z.liuxinliang@xxxxxxxxxxxxx>
> Cc: Rongrong Zou <zourongrong@xxxxxxxxx>
> Signed-off-by: Daniel Axtens <dja@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> index 2ffdbf9801bd..9663a633897a 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> @@ -69,6 +69,7 @@ static struct drm_driver hibmc_driver = {
>         .dumb_map_offset        = hibmc_dumb_mmap_offset,
>         .dumb_destroy           = drm_gem_dumb_destroy,
>         .irq_handler            = hibmc_drm_interrupt,
> +       .set_busid              = drm_pci_set_busid,

Daniel V has been working very hard on cleaning all the set_busid
"chaos" and even has some patches which remove it completely [1].
While your patch is correct, it would be nicer if we can remove the
code so that nobody else gets bitten ;-)

Can you be so kind and re-spin your patch with the cleanups (2-4) on top?
IIRC your fix should be CC kernel-stable.

Thanks
Emil

[1] https://lists.freedesktop.org/archives/dri-devel/2017-May/142670.html
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux