drm/amdgpu/disply: set num_crtc earlier
Subsystems (3)
PATCH 1/1 drm/amdgpu/disply: set num_crtc earlier
To avoid a recently added warning:
Bogus possible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full crtc mask=0x7)
WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617 drm_mode_config_validate+0x178/0x200 [drm]
In this case the warning is harmless, but confusing to users.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -5
@@ -1130,9 +1130,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) goto error; } -/* Update the actual used number of crtc */ - adev->mode_info.num_crtc = adev->dm.display_indexes_num; -/* create fake encoders for MST */ dm_dp_create_fake_mst_encoders (adev);
@@ -3364,6 +3361,10 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)enum dc_connection_type new_connection_type = dc_connection_none;const struct dc_plane_cap *plane; + dm->display_indexes_num = dm->dc->caps.max_streams; +/* Update the actual used number of crtc */ + adev->mode_info.num_crtc = adev->dm.display_indexes_num; + link_cnt = dm->dc->caps.max_links;if (amdgpu_dm_mode_config_init (dm->adev)) {DRM_ERROR ("DM: Failed to initialize mode config\n" );
@@ -3425,8 +3426,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) goto fail; } - dm->display_indexes_num = dm->dc->caps.max_streams; -/* loops over all connectors on the board */ for (i =0 ; i < link_cnt; i++) {struct dc_link *link =NULL ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 7 lines · Alex Deucher
To avoid a recently added warning:
Boguspossible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full crtc mask=0x7)WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617 drm_mode_config_validate+0x178/0x200 [drm]In this case the warning is harmless, but confusing to users.
Reviewed-by Nicholas Kazlauskas <[email protected]>
Regards,
Nicholas Kazlauskas
Quoted 31 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4
-3@@ -1130,9 +1130,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) goto error; } -/* Update the actual used number of crtc */ - adev->mode_info.num_crtc = adev->dm.display_indexes_num; -/* create fake encoders for MST */ dm_dp_create_fake_mst_encoders (adev);@@ -3364,6 +3361,10 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)enum dc_connection_type new_connection_type = dc_connection_none;const struct dc_plane_cap *plane; + dm->display_indexes_num = dm->dc->caps.max_streams; +/* Update the actual used number of crtc */ + adev->mode_info.num_crtc = adev->dm.display_indexes_num; + link_cnt = dm->dc->caps.max_links;if (amdgpu_dm_mode_config_init (dm->adev)) {DRM_ERROR ("DM: Failed to initialize mode config\n" );
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) · line 3431
Quoted 8 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-2@@ -3425,8 +3426,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) goto fail; } - dm->display_indexes_num = dm->dc->caps.max_streams; -/* loops over all connectors on the board */ for (i =0 ; i < link_cnt; i++) {struct dc_link *link =NULL ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx