Skip to contentSkip to conversation

drm/amd/display: Avoid sending abnormal VSIF

PATCH In review Wayne Lin 2 participants 2 messages Oct 17, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Wayne Lin

author
#0 lore raw

PATCH 1/1 drm/amd/display: Avoid sending abnormal VSIF

[Why]
While setting hdmi_vic, hv_frame.vic is not initialized and might assign a wrong value to hdmi_vic. Cause to send out VSIF with abnormal value.

[How]
Initialize hv_frame and avi_frame

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
index 10cce584719f..33a455c90e27 100644
@@ -3472,6 +3472,9 @@ static void fill_stream_properties_from_drm_display_mode(
 	struct hdmi_vendor_infoframe hv_frame;
 	struct hdmi_avi_infoframe avi_frame;
 
+	memset(&hv_frame, 0, sizeof(hv_frame));
+	memset(&avi_frame, 0, sizeof(avi_frame));
+
 	timing_out->h_border_left = 0;
 	timing_out->h_border_right = 0;
 	timing_out->v_border_top = 0;
Signature · 6 lines
2.17.1

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by Nicholas Kazlauskas
#2 lore raw
Quoted 9 lines · Wayne Lin

[Why]
While setting hdmi_vic, hv_frame.vic is not initialized and might assign a wrong value to hdmi_vic. Cause to send out VSIF with abnormal value.

[How]
Initialize hv_frame and avi_frame

Thanks!

Quoted 10 lines
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 10cce584719f..33a455c90e27 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void fill_stream_properties_from_drm_display_mode( · line 3480

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
@@ -3472,6 +3472,9 @@ static void fill_stream_properties_from_drm_display_mode(
  	struct hdmi_vendor_infoframe hv_frame;
  	struct hdmi_avi_infoframe avi_frame;
 
+	memset(&hv_frame, 0, sizeof(hv_frame));
+	memset(&avi_frame, 0, sizeof(avi_frame));
+
  	timing_out->h_border_left = 0;
  	timing_out->h_border_right = 0;
  	timing_out->v_border_top = 0;

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