From 44029293d12f538a95824ecdd40b8c228933bebc Mon Sep 17 00:00:00 2001 From: Vitaly Prosyak Date: Thu, 24 Mar 2016 11:18:12 -0400 Subject: [PATCH 0992/1110] drm/amd/dal: fix cursor width and height in interface Cursor size in interface should be equal to the requested values Do adjustment in dce's specific code. Signed-off-by: Vitaly Prosyak Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 4 ++-- drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp_cursor.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c index 010705d..9f02d3e 100644 --- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c +++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c @@ -82,8 +82,8 @@ static void dm_set_cursor( attributes.address.high_part = upper_32_bits(gpu_addr); attributes.address.low_part = lower_32_bits(gpu_addr); - attributes.width = width-1; - attributes.height = height-1; + attributes.width = width; + attributes.height = height; attributes.x_hot = 0; attributes.y_hot = 0; attributes.color_format = CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA; diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp_cursor.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp_cursor.c index 2dabaed..95f6ca3 100644 --- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp_cursor.c +++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_ipp_cursor.c @@ -117,7 +117,7 @@ bool dce110_ipp_cursor_set_attributes( * Program cursor size -- NOTE: HW spec specifies that HW register * stores size as (height - 1, width - 1) */ - program_size(ipp110, attributes->width, attributes->height); + program_size(ipp110, attributes->width-1, attributes->height-1); /* Program cursor surface address */ program_address(ipp110, attributes->address); -- 2.7.4