mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
Revert "drm/amd/display: Add NULL check for 'afb' before dereferencing in amdgpu_dm_plane_handle_cursor_update"
commit778e3979c5
upstream. [WHY] This patch is a dupplicate implementation of 14bcf29b, which we are reverting due to a regression with kms_plane_cursor IGT tests. This reverts commit38e6f715b0
. Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Tested-by: George Zhang <George.zhang@amd.com> Signed-off-by: Ivan Lipski <ivlipski@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1278dd5f37
commit
ce5d090af6
@ -1225,22 +1225,14 @@ void handle_cursor_update(struct drm_plane *plane,
|
||||
{
|
||||
struct amdgpu_device *adev = drm_to_adev(plane->dev);
|
||||
struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(plane->state->fb);
|
||||
struct drm_crtc *crtc;
|
||||
struct dm_crtc_state *crtc_state;
|
||||
struct amdgpu_crtc *amdgpu_crtc;
|
||||
u64 address;
|
||||
struct drm_crtc *crtc = afb ? plane->state->crtc : old_plane_state->crtc;
|
||||
struct dm_crtc_state *crtc_state = crtc ? to_dm_crtc_state(crtc->state) : NULL;
|
||||
struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
|
||||
uint64_t address = afb ? afb->address : 0;
|
||||
struct dc_cursor_position position = {0};
|
||||
struct dc_cursor_attributes attributes;
|
||||
int ret;
|
||||
|
||||
if (!afb)
|
||||
return;
|
||||
|
||||
crtc = plane->state->crtc ? plane->state->crtc : old_plane_state->crtc;
|
||||
crtc_state = crtc ? to_dm_crtc_state(crtc->state) : NULL;
|
||||
amdgpu_crtc = to_amdgpu_crtc(crtc);
|
||||
address = afb->address;
|
||||
|
||||
if (!plane->state->fb && !old_plane_state->fb)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user