drm/amd/display: abstract encoder related hwseq across different types
authorWenjing Liu <wenjing.liu@amd.com>
Wed, 19 Jan 2022 08:24:39 +0000 (16:24 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Jan 2022 23:00:34 +0000 (18:00 -0500)
commit5279e091616b74ff0e4a24e220e0552b10d88d46
treebd53bb45f98fd99c88e1483a4626307137867354
parentd9eb8fea6862e63421f7b9c93e32bef348488c41
drm/amd/display: abstract encoder related hwseq across different types

[why]
Current we have hundreds of if/else or switch statement to check
encoder type in dc_link level. The reason is because depending
on the type of encoder dc_link needs to perform similar programming
task but with different encoder interfaces. The story is to abstract
these interfaces so dc_link can just perform the programming task
without knowing the detail of which encoder it's dealing with.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c
drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h
drivers/gpu/drm/amd/display/dc/inc/link_hwss.h