drm/amd/display: correct the condition in setting cursor not visible beyond left...
authorMartin Tsai <martin.tsai@amd.com>
Tue, 6 Mar 2018 20:22:03 +0000 (04:22 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Apr 2018 18:07:35 +0000 (13:07 -0500)
Signed-off-by: Martin Tsai <martin.tsai@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c

index e305c28c98defb66656272ae9bad6d1eb79e4a71..3356125a611724339bfb859b28e5aa4a5e2e3622 100644 (file)
@@ -416,7 +416,7 @@ void dpp1_set_cursor_position(
        if (src_x_offset >= (int)param->viewport_width)
                cur_en = 0;  /* not visible beyond right edge*/
 
-       if (src_x_offset + (int)width < 0)
+       if (src_x_offset + (int)width <= 0)
                cur_en = 0;  /* not visible beyond left edge*/
 
        REG_UPDATE(CURSOR0_CONTROL,
index 39b72f696ae9df5fdb78f78dba2b61e31cc37684..81b81e6efcd425a849bbe8d6dad3d74ad29a9a71 100644 (file)
@@ -897,7 +897,7 @@ void hubp1_cursor_set_position(
        if (src_x_offset >= (int)param->viewport_width)
                cur_en = 0;  /* not visible beyond right edge*/
 
-       if (src_x_offset + (int)hubp->curs_attr.width < 0)
+       if (src_x_offset + (int)hubp->curs_attr.width <= 0)
                cur_en = 0;  /* not visible beyond left edge*/
 
        if (cur_en && REG_READ(CURSOR_SURFACE_ADDRESS) == 0)