drm/amd/display: Fix NULL ptr when calculating refresh rate
Subsystems (3)
PATCH 1/1 drm/amd/display: Fix NULL ptr when calculating refresh rate
Calculate preferred refresh rate only when preferred mode exists.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -3
@@ -2835,7 +2835,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,bool native_mode_found = false;bool scale = dm_state ? (dm_state->scaling !=RMX_OFF ) : false;int mode_refresh; -int preferred_refresh; +int preferred_refresh =0 ;struct dc_sink *sink =NULL ;if (aconnector ==NULL ) {
@@ -2889,13 +2889,12 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,decide_crtc_timing_for_drm_display_mode ( &mode, preferred_mode, dm_state ? (dm_state->scaling !=RMX_OFF ) : false); + preferred_refresh =drm_mode_vrefresh (preferred_mode); }if (!dm_state)drm_mode_set_crtcinfo (&mode,0 ); - preferred_refresh =drm_mode_vrefresh (preferred_mode); -/* * If scaling is enabled and refresh rate didn't change * we copy the vic and polarities of the old timings
Signature · 6 lines
2.14.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]
Lakha, Bhawanpreet
Reviewed-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Jerry (Fangzhi) Zuo <[email protected]>
Sent: November 27, 2018 1:45:54 PM
To: [email protected]; Wentland, Harry; Lakha, Bhawanpreet
Cc: Zuo, Jerry
Subject: [PATCH] drm/amd/display: Fix NULL ptr when calculating refresh rate
Calculate preferred refresh rate only when preferred mode exists.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -3
@@ -2835,7 +2835,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,bool native_mode_found = false;bool scale = dm_state ? (dm_state->scaling !=RMX_OFF ) : false;int mode_refresh; -int preferred_refresh; +int preferred_refresh =0 ;struct dc_sink *sink =NULL ;if (aconnector ==NULL ) {
@@ -2889,13 +2889,12 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,decide_crtc_timing_for_drm_display_mode ( &mode, preferred_mode, dm_state ? (dm_state->scaling !=RMX_OFF ) : false); + preferred_refresh =drm_mode_vrefresh (preferred_mode); }if (!dm_state)drm_mode_set_crtcinfo (&mode,0 ); - preferred_refresh =drm_mode_vrefresh (preferred_mode); -/* * If scaling is enabled and refresh rate didn't change * we copy the vic and polarities of the old timings
--
2.14.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx