drm/amd/display: Fix null pointer when setting backlight
Subsystems (3)
PATCH 1/1 drm/amd/display: Fix null pointer when setting backlight
Fixes c894d9f208f9 (drm/amd/display: Fixed dim around 1sec when resume
from S3)
Signed-off-by Harry Wentland <[email protected]>
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +5 -3
@@ -1960,10 +1960,12 @@ bool dc_link_set_backlight_level(const struct dc_link *link, uint32_t level, (abm->funcs->set_backlight_level == NULL))return false; -if (stream->bl_pwm_level ==0 ) - frame_ramp =0 ; +if (stream) { +if (stream->bl_pwm_level ==0 ) + frame_ramp =0 ; - ((struct dc_stream_state *)stream)->bl_pwm_level = level; + ((struct dc_stream_state *)stream)->bl_pwm_level = level; + } use_smooth_brightness = dmcu->funcs->is_dmcu_initialized (dmcu);
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): 20180314135537.20052-1-harry.wentland-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Acked-byQuoted 4 lines · Harry Wentland
Fixes c894d9f208f9 (drm/amd/display: Fixed dim around 1sec when resumefrom S3)
Signed-off-by Harry Wentland <[email protected]>
Acked-by Alex Deucher <[email protected]>
Quoted 27 lines
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/display/dc/core/dc_link.c +5
-4@@ -1960,10 +1960,12 @@ bool dc_link_set_backlight_level(const struct dc_link *link, uint32_t level, (abm->funcs->set_backlight_level == NULL))return false; -if (stream->bl_pwm_level ==0 ) - frame_ramp =0 ; +if (stream) { +if (stream->bl_pwm_level ==0 ) + frame_ramp =0 ; - ((struct dc_stream_state *)stream)->bl_pwm_level = level; + ((struct dc_stream_state *)stream)->bl_pwm_level = level; + } use_smooth_brightness = dmcu->funcs->is_dmcu_initialized (dmcu); --2.14.1
Quoted 4 lines
_______________________________________________
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