[PATCH 22/24] drm/amd/display: Adjust cursor position

Rodrigo Siqueira Jordao Rodrigo.Siqueira at amd.com
Fri Aug 9 19:06:41 UTC 2024



On 8/8/24 4:06 PM, Melissa Wen wrote:
> 
> 
> On 07/08/2024 04:55, Tom Chung wrote:
>> From: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
>>
>> [why & how]
>> When the commit 9d84c7ef8a87 ("drm/amd/display: Correct cursor position
>> on horizontal mirror") was introduced, it used the wrong calculation for
>> the position copy for X. This commit uses the correct calculation for 
>> that
>> based on the original patch.
>>
>> Fixes: 9d84c7ef8a87 ("drm/amd/display: Correct cursor position on 
>> horizontal mirror")
>> Cc: Mario Limonciello <mario.limonciello at amd.com>
>> Cc: Alex Deucher <alexander.deucher at amd.com>
>> Cc: stable at vger.kernel.org
>> Acked-by: Wayne Lin <wayne.lin at amd.com>
>> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
>> Signed-off-by: Tom Chung <chiahsuan.chung at amd.com>
>> ---
>>   drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c 
>> b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
>> index 802902f54d09..01dffed4d30b 100644
>> --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
>> +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
>> @@ -3687,7 +3687,7 @@ void dcn10_set_cursor_position(struct pipe_ctx 
>> *pipe_ctx)
>>                           (int)hubp->curs_attr.width || pos_cpy.x
>>                           <= (int)hubp->curs_attr.width +
>>                           pipe_ctx->plane_state->src_rect.x) {
>> -                        pos_cpy.x = 2 * viewport_width - temp_x;
>> +                        pos_cpy.x = temp_x + viewport_width;
> Hey,
> 
> AFAIU, this patch reverts the change in the previous patch.
> Or this should be discarded, or both.

Hi Melissa,

This is a different part of the same function; the above change happens 
toward the end of dcn10_set_cursor_position, and your change occurs in 
the middle of the function. I think your change can probably be applied 
in this second part, but I prefer to do it in a different patch since 
this other change requires validation.

Thanks
Siqueira

> 
> Melissa
>>                       }
>>                   }
>>               } else {
> 



More information about the amd-gfx mailing list