]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/amd/display: avoid using null object of framebuffer
authorMa Ke <make24@iscas.ac.cn>
Wed, 21 Aug 2024 04:27:24 +0000 (12:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 28 Aug 2024 14:05:46 +0000 (10:05 -0400)
commit3b9a33235c773c7a3768060cf1d2cf8a9153bc37
tree689203610971865d891296adb65562743d45c410
parent959fc102ff4c39f5ab021da311c2cfd1d5602a0c
drm/amd/display: avoid using null object of framebuffer

Instead of using state->fb->obj[0] directly, get object from framebuffer
by calling drm_gem_fb_get_obj() and return error code when object is
null to avoid using null object of framebuffer.

Fixes: 5d945cbcd4b1 ("drm/amd/display: Create a file dedicated to planes")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 73dd0ad9e5dad53766ea3e631303430116f834b3)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c