const struct dc_cursor_mi_param *param)
{
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
- int x_pos = pos->x - param->recout.x;
- int y_pos = pos->y - param->recout.y;
- int rec_x_offset = x_pos - pos->x_hotspot;
- int rec_y_offset = y_pos - pos->y_hotspot;
+ int rec_x_offset = pos->x - pos->x_hotspot;
+ int rec_y_offset = pos->y - pos->y_hotspot;
int dst_x_offset;
int x_pos_viewport = 0;
int x_hot_viewport = 0;
* within preceeding ODM slices.
*/
if (param->recout.width) {
- x_pos_viewport = x_pos * param->viewport.width / param->recout.width;
+ x_pos_viewport = pos->x * param->viewport.width / param->recout.width;
x_hot_viewport = pos->x_hotspot * param->viewport.width / param->recout.width;
} else {
- ASSERT(!cur_en || x_pos == 0);
+ ASSERT(!cur_en || pos->x == 0);
ASSERT(!cur_en || pos->x_hotspot == 0);
}
if (!hubp->cursor_offload) {
REG_SET_2(CURSOR_POSITION, 0,
- CURSOR_X_POSITION, x_pos,
- CURSOR_Y_POSITION, y_pos);
+ CURSOR_X_POSITION, pos->x,
+ CURSOR_Y_POSITION, pos->y);
REG_SET_2(CURSOR_HOT_SPOT, 0,
CURSOR_HOT_SPOT_X, pos->x_hotspot,
if (recout_y_pos + (int)hubp->curs_attr.height <= 0)
pos_cpy.enable = false; /* not visible beyond top edge*/
+ pos_cpy.x = x_pos;
+ pos_cpy.y = y_pos;
+
hubp->funcs->set_cursor_position(hubp, &pos_cpy, ¶m);
dpp->funcs->set_cursor_position(dpp, &pos_cpy, ¶m, hubp->curs_attr.width, hubp->curs_attr.height);
}