]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: SAUCE: drm: hibmc: Use set_busid function from drm core
authorDaniel Axtens <daniel.axtens@canonical.com>
Tue, 20 Jun 2017 03:53:47 +0000 (13:53 +1000)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 5 Sep 2017 12:33:51 +0000 (07:33 -0500)
BugLink: https://bugs.launchpad.net/bugs/1698700
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@hisilicon.com>
Cc: Rongrong Zou <zourongrong@gmail.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

index 2ffdbf9801bd644c3d1320b2499012c8ba6c83f0..9663a633897acd96a66272ad37295e4bcd4d6778 100644 (file)
@@ -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,
 };
 
 static int __maybe_unused hibmc_pm_suspend(struct device *dev)