Commit 778e3979 authored by Ivan Lipski's avatar Ivan Lipski Committed by Alex Deucher

Revert "drm/amd/display: Add NULL check for 'afb' before dereferencing in...

Revert "drm/amd/display: Add NULL check for 'afb' before dereferencing in amdgpu_dm_plane_handle_cursor_update"

[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 commit 38e6f715.
Reviewed-by: default avatarSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Tested-by: default avatarGeorge Zhang <George.zhang@amd.com>
Signed-off-by: default avatarIvan Lipski <ivlipski@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1e006baf
...@@ -1246,22 +1246,14 @@ void amdgpu_dm_plane_handle_cursor_update(struct drm_plane *plane, ...@@ -1246,22 +1246,14 @@ void amdgpu_dm_plane_handle_cursor_update(struct drm_plane *plane,
{ {
struct amdgpu_device *adev = drm_to_adev(plane->dev); struct amdgpu_device *adev = drm_to_adev(plane->dev);
struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(plane->state->fb); struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(plane->state->fb);
struct drm_crtc *crtc; struct drm_crtc *crtc = afb ? plane->state->crtc : old_plane_state->crtc;
struct dm_crtc_state *crtc_state; struct dm_crtc_state *crtc_state = crtc ? to_dm_crtc_state(crtc->state) : NULL;
struct amdgpu_crtc *amdgpu_crtc; struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
u64 address; uint64_t address = afb ? afb->address : 0;
struct dc_cursor_position position = {0}; struct dc_cursor_position position = {0};
struct dc_cursor_attributes attributes; struct dc_cursor_attributes attributes;
int ret; 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) if (!plane->state->fb && !old_plane_state->fb)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment