drm/amd/display: Check dce_hwseq before dereferencing it
PATCH 1/1 drm/amd/display: Check dce_hwseq before dereferencing it
From: Alex Hung <[email protected]>
[ Upstream b669507b637eb6b1aaecf347f193efccc65d756e commit ]
[WHAT]
hws was checked for null earlier in dce110_blank_stream, indicating hws can be null, and should be checked whenever it is used.
[ The context change is due to the commit 8e7b3f5435b3 ("drm/amd/display: Add control flag to dc_stream_state to skip eDP BL off/link off") and the commit a8728dbb4ba2 ("drm/amd/display: Refactor edp power control") and the proper adoption is done. ]
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +2 -1
@@ -1233,7 +1233,8 @@ void dce110_blank_stream(struct pipe_ctx *pipe_ctx)struct dce_hwseq *hws = link->dc->hwseq;if (link->local_sink && link->local_sink->sink_signal ==SIGNAL_TYPE_EDP ) { - hws->funcs.edp_backlight_control (link, false); +if (hws) + hws->funcs.edp_backlight_control (link, false); link->dc->hwss.set_abm_immediate_disable (pipe_ctx); }
Signature · 1 line
2.34.1
Greg KH
maintainerQuoted 17 lines · Rahul Sharma
From: Alex Hung <[email protected]>
[ Upstream
b669507b637eb6b1aaecf347f193efccc65d756ecommit ][WHAT]
hws was checked for null earlier in
dce110_blank_stream, indicating hws can be null, and should be checked whenever it is used.Cc Mario Limonciello <[email protected]>Cc Alex Deucher <[email protected]>Reviewed-by Aurabindo Pillai <[email protected]>Signed-off-by Alex Hung <[email protected]>Signed-off-by Aurabindo Pillai <[email protected]>Signed-off-by Alex Deucher <[email protected]>(cherry picked from commit 79db43611ff61280b6de58ce1305e0b2ecf675ad)
Quoted 8 lines
[ The context change is due to the commit
8e7b3f5435b3("drm/amd/display: Add control flag todc_stream_stateto skip eDP BL off/link off") and the commita8728dbb4ba2("drm/amd/display: Refactor edp power control") and the proper adoption is done. ]Signed-off-by Rahul Sharma <[email protected]>--- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
We need 6.6.y backport first, before we can take this one, for obvious reasons (i.e. you do not want to have a regression). Can you submit that one first and then this again?
thanks,
greg k-h
A message that is not in the archive (sent off-list or not yet received): [email protected]
Greg KH
maintainerQuoted 41 lines · Rahul Sharma
Quoted 27 lines · Greg KH
Quoted 25 lines · Rahul Sharma
From: Alex Hung <[email protected]>
[ Upstream
b669507b637eb6b1aaecf347f193efccc65d756ecommit ][WHAT]
hws was checked for null earlier in
dce110_blank_stream, indicating hws can be null, and should be checked whenever it is used.Cc Mario Limonciello <[email protected]>Cc Alex Deucher <[email protected]>Reviewed-by Aurabindo Pillai <[email protected]>Signed-off-by Alex Hung <[email protected]>Signed-off-by Aurabindo Pillai <[email protected]>Signed-off-by Alex Deucher <[email protected]>(cherry picked from commit 79db43611ff61280b6de58ce1305e0b2ecf675ad)[ The context change is due to the commit
8e7b3f5435b3("drm/amd/display: Add control flag todc_stream_stateto skip eDP BL off/link off") and the commita8728dbb4ba2("drm/amd/display: Refactor edp power control") and the proper adoption is done. ]Signed-off-by Rahul Sharma <[email protected]>--- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 6 lines
Quoted 5 lines
We need 6.6.y backport first, before we can take this one, for obvious reasons (i.e. you do not want to have a regression). Can you submit that one first and then this again?
Thanks Greg, I have sent out the backported patch for 6.6.y.
Great, can you resend this one as well? It's long-gone from my mail system.
thanks,
greg k-h