[WHY & HOW]
Adjust hot spot positions between ODM slices when cursor
magnification is used.
Reviewed-by: Sridevi Arvindekar <sridevi.arvindekar@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Nevenko Stupar <nevenko.stupar@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
if (x_pos < 0) {
pos_cpy.x_hotspot -= x_pos;
+ if ((odm_combine_on) && (hubp->curs_attr.attribute_flags.bits.ENABLE_MAGNIFICATION)) {
+ if (hubp->curs_attr.width <= 128) {
+ pos_cpy.x_hotspot /= 2;
+ pos_cpy.x_hotspot += 1;
+ } else {
+ pos_cpy.x_hotspot /= 2;
+ pos_cpy.x_hotspot += 2;
+ }
+ }
x_pos = 0;
}