drm/amd/display: For vblank_disable_immediate, check PSR is really used
Even if PSR is allowed for a present GPU, there might be no eDP link
which supports PSR.
Fixes: 7089784873
("drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled")
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
29b440d204
commit
fdda8f3406
|
@ -4249,6 +4249,9 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Disable vblank IRQs aggressively for power-saving. */
|
||||||
|
adev_to_drm(adev)->vblank_disable_immediate = true;
|
||||||
|
|
||||||
/* loops over all connectors on the board */
|
/* loops over all connectors on the board */
|
||||||
for (i = 0; i < link_cnt; i++) {
|
for (i = 0; i < link_cnt; i++) {
|
||||||
struct dc_link *link = NULL;
|
struct dc_link *link = NULL;
|
||||||
|
@ -4294,19 +4297,17 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
|
||||||
update_connector_ext_caps(aconnector);
|
update_connector_ext_caps(aconnector);
|
||||||
if (psr_feature_enabled)
|
if (psr_feature_enabled)
|
||||||
amdgpu_dm_set_psr_caps(link);
|
amdgpu_dm_set_psr_caps(link);
|
||||||
|
|
||||||
|
/* TODO: Fix vblank control helpers to delay PSR entry to allow this when
|
||||||
|
* PSR is also supported.
|
||||||
|
*/
|
||||||
|
if (link->psr_settings.psr_feature_enabled)
|
||||||
|
adev_to_drm(adev)->vblank_disable_immediate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Disable vblank IRQs aggressively for power-saving.
|
|
||||||
*
|
|
||||||
* TODO: Fix vblank control helpers to delay PSR entry to allow this when PSR
|
|
||||||
* is also supported.
|
|
||||||
*/
|
|
||||||
adev_to_drm(adev)->vblank_disable_immediate = !psr_feature_enabled;
|
|
||||||
|
|
||||||
/* Software is initialized. Now we can register interrupt handlers. */
|
/* Software is initialized. Now we can register interrupt handlers. */
|
||||||
switch (adev->asic_type) {
|
switch (adev->asic_type) {
|
||||||
#if defined(CONFIG_DRM_AMD_DC_SI)
|
#if defined(CONFIG_DRM_AMD_DC_SI)
|
||||||
|
|
Loading…
Reference in New Issue