Revision bd13b2b874eceb4677cd26eebdc5f45cc52fa400 authored by Nicholas Kazlauskas on 01 February 2019, 14:36:59 UTC, committed by Alex Deucher on 08 April 2019, 15:33:40 UTC
[Why]
If the cursor pos passed from DM is less than the plane_state->dst_rect
top left corner then the unsigned cursor pos wraps around to a large
positive number since cursor pos is a u32.

There was an attempt to guard against this in hubp1_cursor_set_position
by checking the src_x_offset and src_y_offset and offseting the
cursor hotspot within hubp1_cursor_set_position.

However, the cursor position itself is still being programmed
incorrectly as a large value.

This manifests itself visually as the cursor disappearing or containing
strange artifacts near the middle of the screen on raven.

[How]
Don't subtract the destination rect top left corner from the pos but
add it to the hotspot instead. This happens before the pos gets
passed into hubp1_cursor_set_position.

This achieves the same result but avoids the subtraction wrap around.
With this fix the original cursor programming logic can be used again.

v2: add hunk that got dropped accidently when this patch was originally
committed. (Alex)
Fixes: 0921c41e1902831 ("drm/amd/display: Fix negative cursor pos programming")

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Acked-by: Murton Liu <Murton.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent c1cefe1
History
File Mode Size
Kconfig -rw-r--r-- 5.1 KB
Makefile -rw-r--r-- 918 bytes
acl.h -rw-r--r-- 2.4 KB
auth.c -rw-r--r-- 2.1 KB
auth.h -rw-r--r-- 378 bytes
blocklayout.c -rw-r--r-- 11.2 KB
blocklayoutxdr.c -rw-r--r-- 5.2 KB
blocklayoutxdr.h -rw-r--r-- 1.4 KB
cache.h -rw-r--r-- 1.8 KB
current_stateid.h -rw-r--r-- 1.4 KB
export.c -rw-r--r-- 31.8 KB
export.h -rw-r--r-- 3.0 KB
fault_inject.c -rw-r--r-- 3.7 KB
flexfilelayout.c -rw-r--r-- 3.4 KB
flexfilelayoutxdr.c -rw-r--r-- 2.7 KB
flexfilelayoutxdr.h -rw-r--r-- 1.1 KB
idmap.h -rw-r--r-- 2.3 KB
lockd.c -rw-r--r-- 1.7 KB
netns.h -rw-r--r-- 4.0 KB
nfs2acl.c -rw-r--r-- 9.3 KB
nfs3acl.c -rw-r--r-- 6.6 KB
nfs3proc.c -rw-r--r-- 24.4 KB
nfs3xdr.c -rw-r--r-- 27.4 KB
nfs4acl.c -rw-r--r-- 21.8 KB
nfs4callback.c -rw-r--r-- 31.8 KB
nfs4idmap.c -rw-r--r-- 16.2 KB
nfs4layouts.c -rw-r--r-- 18.6 KB
nfs4proc.c -rw-r--r-- 76.4 KB
nfs4recover.c -rw-r--r-- 35.5 KB
nfs4state.c -rw-r--r-- 188.5 KB
nfs4xdr.c -rw-r--r-- 116.3 KB
nfscache.c -rw-r--r-- 15.3 KB
nfsctl.c -rw-r--r-- 33.7 KB
nfsd.h -rw-r--r-- 16.9 KB
nfsfh.c -rw-r--r-- 18.5 KB
nfsfh.h -rw-r--r-- 7.5 KB
nfsproc.c -rw-r--r-- 21.3 KB
nfssvc.c -rw-r--r-- 21.6 KB
nfsxdr.c -rw-r--r-- 13.3 KB
pnfs.h -rw-r--r-- 2.7 KB
state.h -rw-r--r-- 23.1 KB
stats.c -rw-r--r-- 2.7 KB
stats.h -rw-r--r-- 1.5 KB
trace.c -rw-r--r-- 48 bytes
trace.h -rw-r--r-- 4.4 KB
vfs.c -rw-r--r-- 51.4 KB
vfs.h -rw-r--r-- 5.8 KB
xdr.h -rw-r--r-- 3.6 KB
xdr3.h -rw-r--r-- 7.2 KB
xdr4.h -rw-r--r-- 24.4 KB
xdr4cb.h -rw-r--r-- 1.8 KB

back to top