diff mbox series

[02/11] drm/xe: Introduce intel_runtime_pm_get_noresume at compat-i915-headers for display

Message ID 20240314141021.161009-2-rodrigo.vivi@intel.com (mailing list archive)
State New, archived
Headers show
Series [01/11] drm/xe: Introduce xe_pm_runtime_get_noresume for inner callers | expand

Commit Message

Rodrigo Vivi March 14, 2024, 2:10 p.m. UTC
The i915-display will start using the intel_runtime_pm_noresume.
So we need to add the compat header before it.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Francois Dugast March 14, 2024, 6:04 p.m. UTC | #1
Hi,

On Thu, Mar 14, 2024 at 10:10:12AM -0400, Rodrigo Vivi wrote:
> The i915-display will start using the intel_runtime_pm_noresume.
> So we need to add the compat header before it.

Or "So we need to add it to the compat header before"?

> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> index fef969112b1d..ecaaef3df4bf 100644
> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> @@ -176,6 +176,14 @@ static inline intel_wakeref_t intel_runtime_pm_get_if_in_use(struct xe_runtime_p
>  	return xe_pm_runtime_get_if_in_use(xe);
>  }
>  
> +static inline intel_wakeref_t intel_runtime_pm_get_noresume(struct xe_runtime_pm *pm)
> +{
> +	struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> +
> +	xe_pm_runtime_get_noresume(xe);
> +	return true;
> +}
> +

LGTM but wondering if this and the next patch in the series should be
combined in order to have at least one use of this new definition.

Either way:
Reviewed-by: Francois Dugast <francois.dugast@intel.com>

Francois

>  static inline void intel_runtime_pm_put_unchecked(struct xe_runtime_pm *pm)
>  {
>  	struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> -- 
> 2.44.0
>
Rodrigo Vivi March 19, 2024, 3:42 p.m. UTC | #2
On Thu, Mar 14, 2024 at 07:04:02PM +0100, Francois Dugast wrote:
> Hi,
> 
> On Thu, Mar 14, 2024 at 10:10:12AM -0400, Rodrigo Vivi wrote:
> > The i915-display will start using the intel_runtime_pm_noresume.
> > So we need to add the compat header before it.
> 
> Or "So we need to add it to the compat header before"?
> 
> > 
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> >  drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> > index fef969112b1d..ecaaef3df4bf 100644
> > --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> > +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
> > @@ -176,6 +176,14 @@ static inline intel_wakeref_t intel_runtime_pm_get_if_in_use(struct xe_runtime_p
> >  	return xe_pm_runtime_get_if_in_use(xe);
> >  }
> >  
> > +static inline intel_wakeref_t intel_runtime_pm_get_noresume(struct xe_runtime_pm *pm)
> > +{
> > +	struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> > +
> > +	xe_pm_runtime_get_noresume(xe);
> > +	return true;
> > +}
> > +
> 
> LGTM but wondering if this and the next patch in the series should be
> combined in order to have at least one use of this new definition.

I preferred to keep separate because they are in different drivers and
because the compilation doesn't break without the user here.
(I just double checked that).

> 
> Either way:
> Reviewed-by: Francois Dugast <francois.dugast@intel.com>
> 
> Francois
> 
> >  static inline void intel_runtime_pm_put_unchecked(struct xe_runtime_pm *pm)
> >  {
> >  	struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> > -- 
> > 2.44.0
> >
diff mbox series

Patch

diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
index fef969112b1d..ecaaef3df4bf 100644
--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
+++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
@@ -176,6 +176,14 @@  static inline intel_wakeref_t intel_runtime_pm_get_if_in_use(struct xe_runtime_p
 	return xe_pm_runtime_get_if_in_use(xe);
 }
 
+static inline intel_wakeref_t intel_runtime_pm_get_noresume(struct xe_runtime_pm *pm)
+{
+	struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
+
+	xe_pm_runtime_get_noresume(xe);
+	return true;
+}
+
 static inline void intel_runtime_pm_put_unchecked(struct xe_runtime_pm *pm)
 {
 	struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);