1
0
Fork 0
alistair23-linux/drivers/gpu/drm/amd/display/dc
Nicholas Kazlauskas bd13b2b874 drm/amd/display: Fix negative cursor pos programming (v2)
[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: 0921c41e19 ("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>
2019-04-08 10:33:40 -05:00
..
basics drm/amd/display: Convert remaining loggers off dc_logger 2018-07-13 14:48:42 -05:00
bios drm/amd/display/dc/bios_parser2: Mark expected switch fall-throughs 2019-02-18 18:01:00 -05:00
calcs drm/amd/display: don't call dm_pp_ function from an fpu block 2019-03-06 15:31:20 -05:00
core drm/amd/display: VBIOS can't be light up HDMI when restart system 2019-03-27 22:33:17 -05:00
dce Linux 5.0 2019-03-04 12:02:55 +10:00
dce80 Linux 5.0 2019-03-04 12:02:55 +10:00
dce100 Linux 5.0 2019-03-04 12:02:55 +10:00
dce110 drm/amd/display: Refactor for setup periodic interrupt. 2019-02-19 15:58:27 -05:00
dce112 drm/amd/display: fix eDP fast bootup for pre-raven asic 2019-01-25 16:15:36 -05:00
dce120 drm/amd/display: fix eDP fast bootup for pre-raven asic 2019-01-25 16:15:36 -05:00
dcn10 drm/amd/display: Fix negative cursor pos programming (v2) 2019-04-08 10:33:40 -05:00
dml Revert "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines" 2019-01-29 15:16:18 -05:00
gpio drm/amd/display: add gpio lock/unlock 2019-02-05 21:16:23 -05:00
inc drm/amd/display: Refactor for setup periodic interrupt. 2019-02-19 15:58:27 -05:00
irq Revert "drm/amdgpu/display: Replace CONFIG_DRM_AMD_DC_DCN1_0 with CONFIG_X86" 2018-08-21 14:32:28 -05:00
virtual drm/amd/display: Pass signal directly to enable_tmds_output 2018-03-07 16:27:20 -05:00
Makefile drm/amd/display: Introduce DC VM interface 2019-01-25 16:15:36 -05:00
dc.h drm/amd/display: interface to check if timing can be seamless 2019-02-06 13:30:44 -05:00
dc_bios_types.h drm/amd/display: Connect dig_fe to otg directly instead of calling bios 2019-01-25 16:15:37 -05:00
dc_ddc_types.h drm/amd/display: Move i2c and aux structs into dc_ddc_types.h 2018-06-15 12:23:38 -05:00
dc_dp_types.h drm/amd/display: Set link rate set if eDP ver >= 1.4. 2019-01-14 15:40:08 -05:00
dc_helper.c drm/amd/display: refactor reg_update 2019-01-14 15:38:40 -05:00
dc_hw_types.h drm/amd/display: Introduce DC VM interface 2019-01-25 16:15:36 -05:00
dc_link.h drm/amd/display: add way to determine if link is active 2019-02-06 13:30:59 -05:00
dc_stream.h drm/amd/display: Refactor for setup periodic interrupt. 2019-02-19 15:58:27 -05:00
dc_types.h drm/amd/display: Add monitor patch for backlight off 2019-02-05 21:16:23 -05:00
dm_event_log.h drm/amd/display: Add customizable tracing event 2018-11-30 12:02:49 -05:00
dm_helpers.h drm/amd/display: Poll pending down rep before clear payload allocation table 2019-01-28 11:43:46 -05:00
dm_pp_smu.h drm/amd/display: Add a PP_SMU_VER_MAX enum 2019-01-14 15:04:31 -05:00
dm_services.h drm/amd/display: Add tracing to dc 2018-12-05 17:49:49 -05:00
dm_services_types.h drm/amd/display: change the max clock level to 16 2019-01-25 16:15:35 -05:00
irq_types.h drm/amd/display: Add Vline1 interrupt source to InterruptManager 2019-01-28 11:44:10 -05:00
os_types.h amd-gpu: Don't undefine READ and WRITE 2018-10-24 00:36:12 +01:00