diff mbox series

[3/3] drm/i915: Enable runtime pm autosuspend by default

Message ID 20210910174447.289750-3-rodrigo.vivi@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/3] drm/i915/runtime_pm: Consolidate runtime_pm functions | expand

Commit Message

Rodrigo Vivi Sept. 10, 2021, 5:44 p.m. UTC
Let's enable runtime pm autosuspend by default everywhere.

But at this time let's not touch the autosuspend_delay time,
what caused some regression on our previous attempt.

v2: CI on some gen9 platforms was not clean. But it came
    pretty clean on newer generations. For now, let's
    pick gen12 and newer. We will return later to extend
    that to older platforms.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: David Weinehall <david.weinehall@linux.intel.com>
Cc: Tilak Tangudu <tilak.tangudu@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com> #v1
---
 drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Gupta, Anshuman Sept. 13, 2021, 10:57 a.m. UTC | #1
> -----Original Message-----
> From: Vivi, Rodrigo <rodrigo.vivi@intel.com>
> Sent: Friday, September 10, 2021 11:15 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Vivi, Rodrigo <rodrigo.vivi@intel.com>; Daniel Vetter
> <daniel.vetter@ffwll.ch>; David Weinehall <david.weinehall@linux.intel.com>;
> Tangudu, Tilak <tilak.tangudu@intel.com>; Deak, Imre <imre.deak@intel.com>;
> Gupta, Anshuman <anshuman.gupta@intel.com>
> Subject: [PATCH 3/3] drm/i915: Enable runtime pm autosuspend by default
> 
> Let's enable runtime pm autosuspend by default everywhere.
> 
> But at this time let's not touch the autosuspend_delay time, what caused some
> regression on our previous attempt.
> 
> v2: CI on some gen9 platforms was not clean. But it came
>     pretty clean on newer generations. For now, let's
>     pick gen12 and newer. We will return later to extend
>     that to older platforms.
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: David Weinehall <david.weinehall@linux.intel.com>
> Cc: Tilak Tangudu <tilak.tangudu@intel.com>
> Cc: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com> #v1
> ---
>  drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c
> b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index f28b5bab61b4..f91a04c3ef14 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -605,6 +605,10 @@ void intel_runtime_pm_enable(struct
> intel_runtime_pm *rpm)
>  		pm_runtime_use_autosuspend(kdev);
>  	}
> 
> +	/* XXX: Enable by default only for newer platforms for now */
> +	if (GRAPHICS_VER(i915) >= 12)
> +		pm_runtime_allow(kdev);
	Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
	Looks good to me.
	Br,
	Anshuman Gupta.
> +
>  	/*
>  	 * The core calls the driver load handler with an RPM reference held.
>  	 * We drop that here and will reacquire it during unloading in
> --
> 2.31.1
Rodrigo Vivi Sept. 13, 2021, 6:49 p.m. UTC | #2
On Mon, 2021-09-13 at 16:27 +0530, Gupta, Anshuman wrote:
> 
> 
> > -----Original Message-----
> > From: Vivi, Rodrigo <rodrigo.vivi@intel.com>
> > Sent: Friday, September 10, 2021 11:15 PM
> > To: intel-gfx@lists.freedesktop.org
> > Cc: Vivi, Rodrigo <rodrigo.vivi@intel.com>; Daniel Vetter
> > <daniel.vetter@ffwll.ch>; David Weinehall
> > <david.weinehall@linux.intel.com>;
> > Tangudu, Tilak <tilak.tangudu@intel.com>; Deak, Imre
> > <imre.deak@intel.com>;
> > Gupta, Anshuman <anshuman.gupta@intel.com>
> > Subject: [PATCH 3/3] drm/i915: Enable runtime pm autosuspend by
> > default
> > 
> > Let's enable runtime pm autosuspend by default everywhere.
> > 
> > But at this time let's not touch the autosuspend_delay time, what
> > caused some
> > regression on our previous attempt.
> > 
> > v2: CI on some gen9 platforms was not clean. But it came
> >     pretty clean on newer generations. For now, let's
> >     pick gen12 and newer. We will return later to extend
> >     that to older platforms.
> > 
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: David Weinehall <david.weinehall@linux.intel.com>
> > Cc: Tilak Tangudu <tilak.tangudu@intel.com>
> > Cc: Imre Deak <imre.deak@intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com> #v1
> > ---
> >  drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c
> > b/drivers/gpu/drm/i915/intel_runtime_pm.c
> > index f28b5bab61b4..f91a04c3ef14 100644
> > --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> > @@ -605,6 +605,10 @@ void intel_runtime_pm_enable(struct
> > intel_runtime_pm *rpm)
> >                 pm_runtime_use_autosuspend(kdev);
> >         }
> > 
> > +       /* XXX: Enable by default only for newer platforms for now
> > */
> > +       if (GRAPHICS_VER(i915) >= 12)
> > +               pm_runtime_allow(kdev);
>         Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
>         Looks good to me.
>         Br,
>         Anshuman Gupta.

Not so fast though :(
We found some bugs on DG2. Tilak will take a look there before we can
push this.

Thanks,
Rodrigo.


> > +
> >         /*
> >          * The core calls the driver load handler with an RPM
> > reference held.
> >          * We drop that here and will reacquire it during unloading
> > in
> > --
> > 2.31.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index f28b5bab61b4..f91a04c3ef14 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -605,6 +605,10 @@  void intel_runtime_pm_enable(struct intel_runtime_pm *rpm)
 		pm_runtime_use_autosuspend(kdev);
 	}
 
+	/* XXX: Enable by default only for newer platforms for now */
+	if (GRAPHICS_VER(i915) >= 12)
+		pm_runtime_allow(kdev);
+
 	/*
 	 * The core calls the driver load handler with an RPM reference held.
 	 * We drop that here and will reacquire it during unloading in