Commit a5d258a0 authored by Aurabindo Pillai's avatar Aurabindo Pillai Committed by Alex Deucher
Browse files

Revert "drm/amd/display: Optimize cursor position updates"



This reverts commit 88c7c56d07c108ed4de319c8dba44aa4b8a38dd1.

SW and HW state are not always matching in some cases causing cursor to
be disabled.

Signed-off-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8b248b90
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -480,12 +480,11 @@ void dpp1_set_cursor_position(
	if (src_y_offset + cursor_height <= 0)
		cur_en = 0;  /* not visible beyond top edge*/

	if (dpp_base->pos.cur0_ctl.bits.cur0_enable != cur_en) {
		REG_UPDATE(CURSOR0_CONTROL, CUR0_ENABLE, cur_en);
	REG_UPDATE(CURSOR0_CONTROL,
			CUR0_ENABLE, cur_en);

	dpp_base->pos.cur0_ctl.bits.cur0_enable = cur_en;
}
}

void dpp1_cnv_set_optional_cursor_attributes(
		struct dpp *dpp_base,
+2 −4
Original line number Diff line number Diff line
@@ -154,12 +154,10 @@ void dpp401_set_cursor_position(
	struct dcn401_dpp *dpp = TO_DCN401_DPP(dpp_base);
	uint32_t cur_en = pos->enable ? 1 : 0;

	if (dpp_base->pos.cur0_ctl.bits.cur0_enable != cur_en) {
	REG_UPDATE(CURSOR0_CONTROL, CUR0_ENABLE, cur_en);

	dpp_base->pos.cur0_ctl.bits.cur0_enable = cur_en;
}
}

void dpp401_set_optional_cursor_attributes(
	struct dpp *dpp_base,
+3 −5
Original line number Diff line number Diff line
@@ -1058,13 +1058,11 @@ void hubp2_cursor_set_position(
	if (src_y_offset + cursor_height <= 0)
		cur_en = 0;  /* not visible beyond top edge*/

	if (hubp->pos.cur_ctl.bits.cur_enable != cur_en) {
	if (cur_en && REG_READ(CURSOR_SURFACE_ADDRESS) == 0)
		hubp->funcs->set_cursor_attributes(hubp, &hubp->curs_attr);

	REG_UPDATE(CURSOR_CONTROL,
			CURSOR_ENABLE, cur_en);
	}

	REG_SET_2(CURSOR_POSITION, 0,
			CURSOR_X_POSITION, pos->x,
+4 −6
Original line number Diff line number Diff line
@@ -730,13 +730,11 @@ void hubp401_cursor_set_position(
			dc_fixpt_from_int(dst_x_offset),
			param->h_scale_ratio));

	if (hubp->pos.cur_ctl.bits.cur_enable != cur_en) {
	if (cur_en && REG_READ(CURSOR_SURFACE_ADDRESS) == 0)
		hubp->funcs->set_cursor_attributes(hubp, &hubp->curs_attr);

	REG_UPDATE(CURSOR_CONTROL,
		CURSOR_ENABLE, cur_en);
	}

	REG_SET_2(CURSOR_POSITION, 0,
		CURSOR_X_POSITION, x_pos,