[PATCH 0/2] Recover from failure to probe GPU

Javier Martinez Canillas javierm at redhat.com
Tue Dec 27 19:23:32 UTC 2022


Hello Alex,

On 12/27/22 18:04, Alex Deucher wrote:

[...]

> 
> I think something like this would do the trick:
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 2017b3466612..45aee27ab6b1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2141,6 +2141,11 @@ static int amdgpu_device_ip_early_init(struct
> amdgpu_device *adev)
>                 break;
>         }
> 
> +       /* Get rid of things like offb */
> +       r = drm_aperture_remove_conflicting_pci_framebuffers(pdev,
> &amdgpu_kms_driver);
> +       if (r)
> +               return r;
> +
>         if (amdgpu_has_atpx() &&
>             (amdgpu_is_atpx_hybrid() ||
>              amdgpu_has_atpx_dgpu_power_cntl()) &&
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index b8cfa48fb296..4e74d7abc3c2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -2123,11 +2123,6 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
>         }
>  #endif
> 
> -       /* Get rid of things like offb */
> -       ret = drm_aperture_remove_conflicting_pci_framebuffers(pdev,
> &amdgpu_kms_driver);
> -       if (ret)
> -               return ret;
> -

I'm not familiar with the amdgpu driver but yes, something like that
is what I had in mind.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat



More information about the dri-devel mailing list