aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSridevi Arvindekar <[email protected]>2024-05-27 11:26:58 -0400
committerAlex Deucher <[email protected]>2024-06-14 16:17:15 -0400
commited79ab5a07c1cb4bb05422ac6e794e40c4c1484c (patch)
tree6ec06bd079d4961f56b639e00c28cc1191dd1fae
parent3df528be2af34946b1ccce84c1fd38a5c7e42e61 (diff)
drm/amd/display: DCN401 cusor code update
Scaling and rotation changes for cursor. Reviewed-by: Ariel Bernstein <[email protected]> Reviewed-by: Nevenko Stupar <[email protected]> Acked-by: Zaeem Mohamed <[email protected]> Signed-off-by: Sridevi Arvindekar <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
index b9541d5ab601..0b00fdf1297a 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
@@ -1124,14 +1124,10 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx)
* pipe to make sure each pipe enabling cursor on its part of the
* screen.
*/
-
- if (param.rotation == ROTATION_ANGLE_90 || param.rotation == ROTATION_ANGLE_270) {
- } else {
- x_pos = pipe_ctx->stream->dst.x + x_pos * pipe_ctx->stream->dst.width /
- pipe_ctx->stream->src.width;
- y_pos = pipe_ctx->stream->dst.y + y_pos * pipe_ctx->stream->dst.height /
- pipe_ctx->stream->src.height;
- }
+ x_pos = pipe_ctx->stream->dst.x + x_pos * pipe_ctx->stream->dst.width /
+ pipe_ctx->stream->src.width;
+ y_pos = pipe_ctx->stream->dst.y + y_pos * pipe_ctx->stream->dst.height /
+ pipe_ctx->stream->src.height;
/**
* If the cursor's source viewport is clipped then we need to
@@ -1297,18 +1293,10 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx)
pos_cpy.x = temp_x + recout_width;
}
}
- } else {
}
+
}
- /**
- * Display groups that are 1xnY, have pos_cpy.y > recout.height
- * Calculation:
- * delta_from_bottom = recout.y + recout.height - pos_cpy.y
- * pos_cpy.y_new = recout.y + delta_from_bottom
- * Simplify it as:
- * pos_cpy.y = recout.y * 2 + recout.height - pos_cpy.y
- */
}
hubp->funcs->set_cursor_position(hubp, &pos_cpy, &param);