Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Add null check in resource_log_pipe_topology_update

[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>

authored by

Natanel Roizenman and committed by
Alex Deucher
899d92fd cbc7d7d4

+4
+4
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
··· 2302 2302 2303 2303 otg_master = resource_get_otg_master_for_stream( 2304 2304 &state->res_ctx, state->streams[stream_idx]); 2305 + 2306 + if (!otg_master) 2307 + continue; 2308 + 2305 2309 resource_log_pipe_for_stream(dc, state, otg_master, stream_idx); 2306 2310 } 2307 2311 if (state->phantom_stream_count > 0) {