]> git.dujemihanovic.xyz Git - linux.git/commit
drm/amd/display: handle nulled pipe context in DCE110's set_drr()
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Mon, 16 Sep 2024 12:54:05 +0000 (14:54 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Sep 2024 20:15:09 +0000 (16:15 -0400)
commite7d4e1438533abe448813bdc45691f9c230aa307
treefc310cef649c0b9a4eb34184ecb848181f725cfd
parent375b035f689735fd7a87ff31ccac3a42717252bf
drm/amd/display: handle nulled pipe context in DCE110's set_drr()

As set_drr() is called from IRQ context, it can happen that the
pipe context has been nulled by dc_state_destruct().

Apply the same protection here that is already present for
dcn35_set_drr() and dcn10_set_drr(). I.e. fetch the tg pointer
first (to avoid a race with dc_state_destruct()), and then
check the local copy before using it.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3142
Fixes: 06ad7e164256 ("drm/amd/display: Destroy DC context while keeping DML and DML2")
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c