From: Alvin Lee <[email protected]>

[Description]
Rounding up cursor width was only used to calculate total size in
previous generations. Do not use the rounded up cursor width in
hardware programming.

Signed-off-by: Alvin Lee <[email protected]>
Signed-off-by: Fangzhi Zuo <[email protected]>
Reviewed-by: Dillon Varone <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.c 
b/drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.c
index 4af60e473bd9..7c2ff310ea99 100644
--- a/drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.c
+++ b/drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.c
@@ -189,9 +189,6 @@ void hubp60_cursor_set_attributes(
        enum cursor_lines_per_chunk lpc = hubp2_get_lines_per_chunk(
                attr->width, attr->color_format);
 
-       //Round cursor width up to next multiple of 64
-       uint32_t cursor_width = ((attr->width + 63) / 64) * 64;
-
        hubp->curs_attr = *attr;
 
        if (!hubp->cursor_offload) {
@@ -201,7 +198,7 @@ void hubp60_cursor_set_attributes(
                        CURSOR_SURFACE_ADDRESS, attr->address.low_part);
 
                REG_UPDATE_2(CURSOR_SIZE,
-                       CURSOR_WIDTH, cursor_width,
+                       CURSOR_WIDTH, attr->width,
                        CURSOR_HEIGHT, attr->height);
 
                REG_UPDATE_4(CURSOR_CONTROL,
-- 
2.53.0

Reply via email to