[Intel-gfx] [PATCH v2 1/8] drm/i915: prefer i915_runtime_pm in intel_runtime function
Chris Wilson
chris at chris-wilson.co.uk
Wed Jun 12 22:10:20 UTC 2019
Quoting Daniele Ceraolo Spurio (2019-06-12 19:37:40)
> As a first step towards updating the code to work on the runtime_pm
> structure instead of i915, rework all the internals to use and pass
> around that.
>
> v2: add comment for kdev (Jani), move rpm init after pdev init for
> mock_device
>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Cc: Jani Nikula <jani.nikula at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 2 +
> drivers/gpu/drm/i915/intel_drv.h | 10 +-
> drivers/gpu/drm/i915/intel_runtime_pm.c | 122 ++++++++----------
> .../gpu/drm/i915/selftests/mock_gem_device.c | 4 +-
> 4 files changed, 68 insertions(+), 70 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 0ea7f78ae227..3e7186362bb0 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1073,6 +1073,8 @@ struct skl_wm_params {
> */
> struct i915_runtime_pm {
> atomic_t wakeref_count;
> + struct device *kdev; /* points to i915->drm.pdev->dev */
> + bool available;
> bool suspended;
> bool irqs_enabled;
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 3e337317f77e..aec40adf4876 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1656,13 +1656,17 @@ ____assert_rpm_wakelock_held(struct i915_runtime_pm *rpm, int wakeref_count)
> }
>
> static inline void
> -assert_rpm_raw_wakeref_held(struct drm_i915_private *i915)
> +__assert_rpm_raw_wakeref_held(struct i915_runtime_pm *rpm)
Our naming scheme would make this intel_runtime_pm as it is more HW
facing than user. Plus, Jani will point out it's intel_runtime_pm.c
-Chris
More information about the Intel-gfx
mailing list