* [PATCH] drm/amd/display: For vblank_disable_immediate, check PSR is really used
@ 2022-02-15 18:53 Michel Dänzer
2022-02-15 19:41 ` Harry Wentland
0 siblings, 1 reply; 3+ messages in thread
From: Michel Dänzer @ 2022-02-15 18:53 UTC (permalink / raw)
To: Nicholas Kazlauskas; +Cc: Leo Li, Rodrigo Siqueira, Harry Wentland, amd-gfx
From: Michel Dänzer <mdaenzer@redhat.com>
Even if PSR is allowed for a present GPU, there might be no eDP link
which supports PSR.
Fixes: 9b510908e420 ("drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled")
Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index cd8b0d9eb19c..df86517dd532 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4256,6 +4256,9 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
}
#endif
+ /* Disable vblank IRQs aggressively for power-saving. */
+ adev_to_drm(adev)->vblank_disable_immediate = true;
+
/* loops over all connectors on the board */
for (i = 0; i < link_cnt; i++) {
struct dc_link *link = NULL;
@@ -4301,19 +4304,17 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
update_connector_ext_caps(aconnector);
if (psr_feature_enabled)
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. */
switch (adev->asic_type) {
#if defined(CONFIG_DRM_AMD_DC_SI)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: For vblank_disable_immediate, check PSR is really used
2022-02-15 18:53 [PATCH] drm/amd/display: For vblank_disable_immediate, check PSR is really used Michel Dänzer
@ 2022-02-15 19:41 ` Harry Wentland
2022-02-15 22:31 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Harry Wentland @ 2022-02-15 19:41 UTC (permalink / raw)
To: Michel Dänzer, Nicholas Kazlauskas; +Cc: Leo Li, Rodrigo Siqueira, amd-gfx
On 2022-02-15 13:53, Michel Dänzer wrote:
> From: Michel Dänzer <mdaenzer@redhat.com>
>
> Even if PSR is allowed for a present GPU, there might be no eDP link
> which supports PSR.
>
> Fixes: 9b510908e420 ("drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled")
> Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
Looks reasonable to me.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index cd8b0d9eb19c..df86517dd532 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4256,6 +4256,9 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
> }
> #endif
>
> + /* Disable vblank IRQs aggressively for power-saving. */
> + adev_to_drm(adev)->vblank_disable_immediate = true;
> +
> /* loops over all connectors on the board */
> for (i = 0; i < link_cnt; i++) {
> struct dc_link *link = NULL;
> @@ -4301,19 +4304,17 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
> update_connector_ext_caps(aconnector);
> if (psr_feature_enabled)
> 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. */
> switch (adev->asic_type) {
> #if defined(CONFIG_DRM_AMD_DC_SI)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amd/display: For vblank_disable_immediate, check PSR is really used
2022-02-15 19:41 ` Harry Wentland
@ 2022-02-15 22:31 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2022-02-15 22:31 UTC (permalink / raw)
To: Harry Wentland
Cc: Leo Li, Michel Dänzer, Rodrigo Siqueira,
Nicholas Kazlauskas, amd-gfx list
Applied. Thanks!
Alex
On Tue, Feb 15, 2022 at 2:41 PM Harry Wentland <harry.wentland@amd.com> wrote:
>
> On 2022-02-15 13:53, Michel Dänzer wrote:
> > From: Michel Dänzer <mdaenzer@redhat.com>
> >
> > Even if PSR is allowed for a present GPU, there might be no eDP link
> > which supports PSR.
> >
> > Fixes: 9b510908e420 ("drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled")
> > Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
>
> Looks reasonable to me.
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 +++++++++--------
> > 1 file changed, 9 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > index cd8b0d9eb19c..df86517dd532 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -4256,6 +4256,9 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
> > }
> > #endif
> >
> > + /* Disable vblank IRQs aggressively for power-saving. */
> > + adev_to_drm(adev)->vblank_disable_immediate = true;
> > +
> > /* loops over all connectors on the board */
> > for (i = 0; i < link_cnt; i++) {
> > struct dc_link *link = NULL;
> > @@ -4301,19 +4304,17 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
> > update_connector_ext_caps(aconnector);
> > if (psr_feature_enabled)
> > 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. */
> > switch (adev->asic_type) {
> > #if defined(CONFIG_DRM_AMD_DC_SI)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-15 22:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 18:53 [PATCH] drm/amd/display: For vblank_disable_immediate, check PSR is really used Michel Dänzer
2022-02-15 19:41 ` Harry Wentland
2022-02-15 22:31 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.