[no subject]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"	struct device *kdev; /* points to i915->drm.dev */"

So, "intel_runtime_pm_suspended(&i915->runtime_pm)" seems
to be logically equivalent to
"pm_runtime_suspended(i915->drm.dev)", which would mean we
wouldn't need to declare the new helper function
"intel_runtime_pm_suspended" as both want to operate
pm_runtime_suspended on the same relative path for their target
drm device.

Though, perhaps I'm missing some other reasons we would want
the additional helper function besides, so I won't block on this:

Reviewed-by: Jonathan Cavitt <jonathan.cavitt@xxxxxxxxx>
-Jonathan Cavitt

>  		/*
>  		 * vdd off can generate a long/short pulse on eDP which
>  		 * would require vdd on to handle it, and thus we
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.h b/drivers/gpu/drm/i915/intel_runtime_pm.h
> index 126f8320f86eb..e22669d61e954 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.h
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.h
> @@ -96,10 +96,16 @@ intel_rpm_wakelock_count(int wakeref_count)
>  	return wakeref_count >> INTEL_RPM_WAKELOCK_SHIFT;
>  }
>  
> +static inline bool
> +intel_runtime_pm_suspended(struct intel_runtime_pm *rpm)
> +{
> +	return pm_runtime_suspended(rpm->kdev);
> +}
> +
>  static inline void
>  assert_rpm_device_not_suspended(struct intel_runtime_pm *rpm)
>  {
> -	WARN_ONCE(pm_runtime_suspended(rpm->kdev),
> +	WARN_ONCE(intel_runtime_pm_suspended(rpm),
>  		  "Device suspended during HW access\n");
>  }
>  
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h b/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h
> index cba587ceba1b6..274042bff1bec 100644
> --- a/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h
> @@ -20,6 +20,14 @@ static inline void enable_rpm_wakeref_asserts(void *rpm)
>  {
>  }
>  
> +static inline bool
> +intel_runtime_pm_suspended(struct xe_runtime_pm *pm)
> +{
> +	struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> +
> +	return pm_runtime_suspended(xe->drm.dev);
> +}
> +
>  static inline intel_wakeref_t intel_runtime_pm_get(struct xe_runtime_pm *pm)
>  {
>  	struct xe_device *xe = container_of(pm, struct xe_device, runtime_pm);
> -- 
> 2.44.2
> 
> 




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux