]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Add NULL checks for vblank workqueue
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 7 Sep 2021 13:53:03 +0000 (09:53 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Sep 2021 13:56:23 +0000 (09:56 -0400)
commit6cabbe24bce54c5c8f0f07eef67784e2ab949c92
tree5b4070577b1eb0ef8e87fb422d25b149b466209a
parent88651fc6c4e2f6c3959cbfeaa42c17fc1f09a4a4
drm/amd/display: Add NULL checks for vblank workqueue

[Why]
If we're running a headless config with 0 links then the vblank
workqueue will be NULL - causing a NULL pointer exception during
any commit.

[How]
Guard access to the workqueue if it's NULL and don't queue or flush
work if it is.

Reported-by: Mike Lothian <mike@fireburn.co.uk>
BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1700
Fixes: 2b30c72c1da2b8 ("drm/amd/display: Use vblank control events for PSR enable/disable")
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c