]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/hisilicon: Fixed pcie resource conflict between drm and firmware
authorTian Tao <tiantao6@hisilicon.com>
Mon, 24 Feb 2020 06:01:52 +0000 (14:01 +0800)
committerXinliang Liu <xinliang.liu@linaro.org>
Thu, 27 Feb 2020 04:34:32 +0000 (04:34 +0000)
use the drm_fb_helper_remove_conflicting_pci_framebuffer to remove
the framebuffer initialized by fireware/bootloader to avoid resource
conflict.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1582524112-5628-1-git-send-email-tiantao6@hisilicon.com
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

index 119135fc3e1a3f56f92920bd75bde66eeb098c48..222356a4f9a84d019d6fa6df5780ac98911fa105 100644 (file)
@@ -327,6 +327,11 @@ static int hibmc_pci_probe(struct pci_dev *pdev,
        struct drm_device *dev;
        int ret;
 
+       ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev,
+                                                               "hibmcdrmfb");
+       if (ret)
+               return ret;
+
        dev = drm_dev_alloc(&hibmc_driver, &pdev->dev);
        if (IS_ERR(dev)) {
                DRM_ERROR("failed to allocate drm_device\n");