]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Assign preferred stream encoder instance to dpia
authorMeenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>
Wed, 23 Apr 2025 18:42:53 +0000 (14:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 May 2025 17:28:47 +0000 (13:28 -0400)
[Why]
For dpia, preferred engine instance availability is not checked
when assigning stream encoder instance.

[How]
Check for dpia preferred engine id and assign the same stream
encoder instance for the stream if available.

Reviewed-by: PeiChen Huang <peichen.huang@amd.com>
Signed-off-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c

index 9d8ecc6229d9a34d215aa87b731441a0e37d278d..be4ade0853e9adf2008d551a998b61db00a80d3c 100644 (file)
@@ -1246,6 +1246,10 @@ struct stream_encoder *dcn10_find_first_free_match_stream_enc_for_link(
                        if (link->ep_type == DISPLAY_ENDPOINT_PHY && pool->stream_enc[i]->id ==
                                        link->link_enc->preferred_engine)
                                return pool->stream_enc[i];
+
+                       if (link->ep_type == DISPLAY_ENDPOINT_USB4_DPIA && pool->stream_enc[i]->id ==
+                                       link->dpia_preferred_eng_id)
+                               return pool->stream_enc[i];
                }
        }