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-m...@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(-) -- 2.47.2