[PATCH] drm/amd/display: Pass errors from amdgpu_dm_init() up

Harry Wentland harry.wentland at amd.com
Wed May 22 19:44:12 UTC 2024


On 2024-05-19 09:02, Mario Limonciello wrote:
> Errors in amdgpu_dm_init() are silently ignored and dm_hw_init()
> will succeed. However often these are fatal errors and it would
> be better to pass them up.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>

Reviewed-by: Harry Wentland <harry.wentland at amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index d6e71aa808d8..01b0a331e4a6 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2556,8 +2556,12 @@ static int amdgpu_dm_smu_write_watermarks_table(struct amdgpu_device *adev)
>  static int dm_hw_init(void *handle)
>  {
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> +	int r;
> +
>  	/* Create DAL display manager */
> -	amdgpu_dm_init(adev);
> +	r = amdgpu_dm_init(adev);
> +	if (r)
> +		return r;
>  	amdgpu_dm_hpd_init(adev);
>  
>  	return 0;



More information about the amd-gfx mailing list