diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2020-02-24 07:01:52 +0100 |
---|---|---|
committer | Xinliang Liu <xinliang.liu@linaro.org> | 2020-02-27 05:34:32 +0100 |
commit | c3480301d750bd58bab35994ecf015a4682a17dd (patch) | |
tree | 142e7494d261d1402dcb48d5d889d2320a64b1af | |
parent | drm/hisilicon: Set preferred mode resolution and maximum resolution (diff) | |
download | linux-c3480301d750bd58bab35994ecf015a4682a17dd.tar.xz linux-c3480301d750bd58bab35994ecf015a4682a17dd.zip |
drm/hisilicon: Fixed pcie resource conflict between drm and firmware
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
-rw-r--r-- | drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 119135fc3e1a..222356a4f9a8 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -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"); |