[PATCH] drm/amdgpu: Add error message for DAC setup failure

Nirmoy nirmodas at amd.com
Wed Oct 7 09:17:37 UTC 2020


Acked-by: Nirmoy Das <nirmoy.das at amd.com>

On 10/6/20 8:05 AM, Shashank Sharma wrote:
> This patch adds a return value check and an error message to
> highlight the DAC setup failure case during encoder DPMS
> operation.
>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Signed-off-by: Shashank Sharma <shashank.sharma at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> index 1e94a9b652f7..3779f933564b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> +++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
> @@ -341,8 +341,8 @@ amdgpu_atombios_encoder_setup_dac(struct drm_encoder *encoder, int action)
>   	args.ucDacStandard = ATOM_DAC1_PS2;
>   	args.usPixelClock = cpu_to_le16(amdgpu_encoder->pixel_clock / 10);
>   
> -	amdgpu_atom_execute_table(adev->mode_info.atom_context, index, (uint32_t *)&args);
> -
> +	if (amdgpu_atom_execute_table(adev->mode_info.atom_context, index, (uint32_t *)&args))
> +		DRM_ERROR("AMDGPU: dac setup failed\n");
>   }
>   
>   static u8 amdgpu_atombios_encoder_get_bpc(struct drm_encoder *encoder)


More information about the amd-gfx mailing list