[PATCH 0/5] drm/amd/display: remove code duplication on dcn401
Melissa Wen
mwen at igalia.com
Tue May 13 18:38:14 UTC 2025
On 12/05/2025 14:38, Alex Hung wrote:
> Hi Melissa,
>
> The patchset looks good to me but there is WIP dcn401 code, meaning
> dcn20 and dcn401 are different.
>
> I will check how to refactor code so this patchset can fit better.
I see. Let's wait a bit so.
Anyway, thanks for taking a look.
Melissa
>
> Thanks
>
> On 4/30/25 08:20, Melissa Wen wrote:
>> Hi,
>>
>> I've been examining dcn401 code to figure out what is causing a wrong
>> cursor gamma on HDR issue reported in [1], and I found unnecessary code
>> duplications during this inspection. I don't have the HW, so I'd
>> appreciate if someone can validate this series (if it makes sense to you
>> ofc).
>>
>> This series basically adds some hooks to dcn20 base functions that are
>> usually used in other hw versions and reuses those functions on dcn401
>> so that we can reduce many lines of code and also increase the coverage
>> of bug fixes by avoiding the kind of issue of [2]. Better for debugging
>> and maintainability too.
>>
>> [1] https://gitlab.freedesktop.org/drm/amd/-/issues/4176
>> [2]
>> https://lore.kernel.org/amd-gfx/20250430141156.827763-1-mwen@igalia.com/
>>
>> Melissa Wen (5):
>> drm/amd/display: add hook for program_tg
>> drm/amd/display: hook up program_tg for dcn401
>> drm/amd/display: remove duplicated program_front_end_for_ctx code
>> drm/amd/display: remove duplicated post_unlock_program_front_end code
>> on dcn401
>> drm/amd/display: remove duplicated program_pipe code on dcn401
>>
>> .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 40 +-
>> .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 436 +-----------------
>> .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 10 +-
>> .../amd/display/dc/hwss/dcn401/dcn401_init.c | 5 +-
>> .../drm/amd/display/dc/hwss/hw_sequencer.h | 4 +
>> 5 files changed, 45 insertions(+), 450 deletions(-)
>>
>
More information about the amd-gfx
mailing list