]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Allow constructing DCE8 link encoder without DDC
authorTimur Kristóf <timur.kristof@gmail.com>
Tue, 28 Apr 2026 11:40:43 +0000 (13:40 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Apr 2026 14:41:34 +0000 (10:41 -0400)
When the DDC channel ID is set to CHANNEL_ID_UNKNOWN,
pass NULL to the AUX regs array.

This is necessary to support embedded connectors without DDC.

Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)")
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5192
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 155baf3038c1af50b602723022ed869b38e86a99)

drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c

index 33be49b3c1b1785a30440bfe9c018d6be01df7f9..6c00497e9a01299c97d10fad8a8a5b4efc9e71e2 100644 (file)
@@ -760,7 +760,8 @@ static struct link_encoder *dce80_link_encoder_create(
                                      enc_init_data,
                                      &link_enc_feature,
                                      &link_enc_regs[link_regs_id],
-                                     &link_enc_aux_regs[enc_init_data->channel - 1],
+                                     enc_init_data->channel == CHANNEL_ID_UNKNOWN ?
+                                     NULL : &link_enc_aux_regs[enc_init_data->channel - 1],
                                      enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs) ?
                                      NULL : &link_enc_hpd_regs[enc_init_data->hpd_source]);
        return &enc110->base;