]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: add NULL check to avoid kernel crash in DC.
authorRobin Singh <robin.singh@amd.com>
Tue, 9 Mar 2021 21:47:20 +0000 (16:47 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Apr 2021 20:51:40 +0000 (16:51 -0400)
commit5459d1a742b32025dc706f8c834a198a0c7f07e4
tree95986a2ce5cb41a0e2aef8b37d8b87ed3806246c
parent85d5d03a2f1de06b5986fc166b03fca5277919bc
drm/amd/display: add NULL check to avoid kernel crash in DC.

[why]
There is case when the userspace like IGT test updates the custom
timings, i.e. the number of active lines CRTC property value,
and without committing the change, followed by
resetting the display, creating FB and plane to the pipe
and committing. The NULL pointer of pipe_ctx->plane_state
occurs and result in kernel crash. We need to avoid that.

[how]
add pointer check for the dc_plane_state of the pipe context in
the call of committing planes for stream in DC component.

Signed-off-by: Robin Singh <robin.singh@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c