Skip to contentSkip to conversation

drm/amdgpu: Add error message for DAC setup failure

PATCH In review Shashank Sharma 2 participants 2 messages Oct 6, 2020 – Oct 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

This patch adds a return value check and an error message to highlight the DAC setup failure case during encoder DPMS operation.

---
 drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c +2 -2
index 1e94a9b652f7..3779f933564b 100644
@@ -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)
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Acked-by Nirmoy Das on v1 1/1
#1 lore raw
Quoted 15 lines · Shashank Sharma

This patch adds a return value check and an error message to highlight the DAC setup failure case during encoder DPMS operation.

---
  drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c +0 -0
index 1e94a9b652f7..3779f933564b 100644

drivers/gpu/drm/amd/amdgpu/atombios_encoders.c amdgpu_atombios_encoder_setup_dac(struct drm_encoder *encoder, int action) · line 348

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c +2 -2
@@ -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)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx