drm/amd/display: Add null check in resource_log_pipe_topology_update
commit 899d92fd26fe780aad711322aa671f68058207a6 upstream. [WHY] When switching from "Extend" to "Second Display Only" we sometimes call resource_get_otg_master_for_stream on a stream for the eDP, which is disconnected. This leads to a null pointer dereference. [HOW] Added a null check in dc_resource.c/resource_log_pipe_topology_update. CC: stable@vger.kernel.org Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Natanel Roizenman <natanel.roizenman@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7f71acdb07
commit
c36e922a36
@ -2267,6 +2267,10 @@ void resource_log_pipe_topology_update(struct dc *dc, struct dc_state *state)
|
||||
|
||||
otg_master = resource_get_otg_master_for_stream(
|
||||
&state->res_ctx, state->streams[stream_idx]);
|
||||
|
||||
if (!otg_master)
|
||||
continue;
|
||||
|
||||
resource_log_pipe_for_stream(dc, state, otg_master, stream_idx);
|
||||
}
|
||||
if (state->phantom_stream_count > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user