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
Documentation
arch
bench
examples
include
jvmti
pmu-events
python
scripts
tests
trace
ui
util
.gitignore -rw-r--r-- 482 bytes
Build -rw-r--r-- 1.6 KB
CREDITS -rw-r--r-- 603 bytes
MANIFEST -rw-r--r-- 327 bytes
Makefile -rw-r--r-- 2.5 KB
Makefile.config -rw-r--r-- 30.4 KB
Makefile.perf -rw-r--r-- 33.3 KB
builtin-annotate.c -rw-r--r-- 16.5 KB
builtin-bench.c -rw-r--r-- 7.4 KB
builtin-buildid-cache.c -rw-r--r-- 12.4 KB
builtin-buildid-list.c -rw-r--r-- 3.0 KB
builtin-c2c.c -rw-r--r-- 70.0 KB
builtin-config.c -rw-r--r-- 5.7 KB
builtin-data.c -rw-r--r-- 2.8 KB
builtin-diff.c -rw-r--r-- 33.9 KB
builtin-evlist.c -rw-r--r-- 2.1 KB
builtin-ftrace.c -rw-r--r-- 11.3 KB
builtin-help.c -rw-r--r-- 11.6 KB
builtin-inject.c -rw-r--r-- 22.5 KB
builtin-kallsyms.c -rw-r--r-- 1.7 KB
builtin-kmem.c -rw-r--r-- 45.7 KB
builtin-kvm.c -rw-r--r-- 37.8 KB
builtin-list.c -rw-r--r-- 3.8 KB
builtin-lock.c -rw-r--r-- 23.2 KB
builtin-mem.c -rw-r--r-- 10.7 KB
builtin-probe.c -rw-r--r-- 18.6 KB
builtin-record.c -rw-r--r-- 57.1 KB
builtin-report.c -rw-r--r-- 39.5 KB
builtin-sched.c -rw-r--r-- 87.5 KB
builtin-script.c -rw-r--r-- 96.5 KB
builtin-stat.c -rw-r--r-- 49.4 KB
builtin-timechart.c -rw-r--r-- 47.0 KB
builtin-top.c -rw-r--r-- 43.4 KB
builtin-trace.c -rw-r--r-- 112.1 KB
builtin-version.c -rw-r--r-- 2.3 KB
builtin.h -rw-r--r-- 1.6 KB
check-headers.sh -rwxr-xr-x 3.1 KB
command-list.txt -rw-r--r-- 1.1 KB
design.txt -rw-r--r-- 17.5 KB
perf-archive.sh -rw-r--r-- 1.3 KB
perf-completion.sh -rw-r--r-- 6.2 KB
perf-read-vdso.c -rw-r--r-- 547 bytes
perf-sys.h -rw-r--r-- 1.3 KB
perf-with-kcore.sh -rw-r--r-- 6.7 KB
perf.c -rw-r--r-- 12.3 KB
perf.h -rw-r--r-- 2.4 KB

back to top