diff mbox series

[v2] drm/hisilicon: Fixed pcie resource conflict between drm and firmware

Message ID 1582524112-5628-1-git-send-email-tiantao6@hisilicon.com (mailing list archive)
State New, archived
Headers show
Series [v2] drm/hisilicon: Fixed pcie resource conflict between drm and firmware | expand

Commit Message

tiantao (H) Feb. 24, 2020, 6:01 a.m. UTC
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>

---
v2: 	use the general API to remove the conflict resource instead of rolling
	our own.
---
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Zimmermann Feb. 25, 2020, 7:21 a.m. UTC | #1
Hi

Am 24.02.20 um 07:01 schrieb Tian Tao:
> 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>
> 
> ---
> v2: 	use the general API to remove the conflict resource instead of rolling
> 	our own.

Nit: the patch's version info is usually a part of the commit messages.
It goes between the description and the Signed-off-by line.

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
> ---
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> index 4a8a4cf..7518980 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");
>
Xinliang Liu Feb. 27, 2020, 4:39 a.m. UTC | #2
Thanks for the patch.
Applied to drm-misc-next.

On Mon, 24 Feb 2020 at 14:02, Tian Tao <tiantao6@hisilicon.com> wrote:

> 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>
>
> ---
> v2:     use the general API to remove the conflict resource instead of
> rolling
>         our own.
> ---
> ---
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> index 4a8a4cf..7518980 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");
> --
> 2.7.4
>
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index 4a8a4cf..7518980 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");