diff options
author | Dillon Varone <dillon.varone@amd.com> | 2023-12-13 15:04:42 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-12-19 14:59:02 -0500 |
commit | 760ed918fb1f857490868e4bc91265a4d5d37f37 (patch) | |
tree | e09d6066f970d058888ac6e4977c4e696401a9d7 /drivers/gpu/drm/amd | |
parent | b03281e925f996ffc850ad25de10f4586a8c7435 (diff) | |
download | linux-stable-760ed918fb1f857490868e4bc91265a4d5d37f37.tar.gz linux-stable-760ed918fb1f857490868e4bc91265a4d5d37f37.tar.bz2 linux-stable-760ed918fb1f857490868e4bc91265a4d5d37f37.zip |
drm/amd/display: Create dc_state after resource initialization
[WHY&HOW]
After refactoring dc_state, it is always constructed at the time of its
creation. Construction can only happen after dc resources are initialized, so
move creation to be after this.
Reviewed-by: George Shen <george.shen@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Dillon Varone <dillon.varone@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 630a55b2c1d4..043913d65b16 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1025,6 +1025,15 @@ static bool dc_construct(struct dc *dc, } #endif + if (!create_links(dc, init_params->num_virtual_links)) + goto fail; + + /* Create additional DIG link encoder objects if fewer than the platform + * supports were created during link construction. + */ + if (!create_link_encoders(dc)) + goto fail; + /* Creation of current_state must occur after dc->dml * is initialized in dc_create_resource_pool because * on creation it copies the contents of dc->dml @@ -1037,15 +1046,6 @@ static bool dc_construct(struct dc *dc, goto fail; } - if (!create_links(dc, init_params->num_virtual_links)) - goto fail; - - /* Create additional DIG link encoder objects if fewer than the platform - * supports were created during link construction. - */ - if (!create_link_encoders(dc)) - goto fail; - return true; fail: |