drm/i915: pass dev_priv to intel_device_info_runtime_init()
authorJani Nikula <jani.nikula@intel.com>
Mon, 31 Dec 2018 14:56:43 +0000 (16:56 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 2 Jan 2019 10:47:52 +0000 (12:47 +0200)
With the static/runtime device info split, this makes more sense.

Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ad5b448e4e318df0d292d73e6c3378f3e6b9bae5.1546267488.git.jani.nikula@intel.com
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_device_info.c
drivers/gpu/drm/i915/intel_device_info.h

index f884b9a138cd8f074d5004086326418621cb09f8..261932ee6837d3b9a91b643b13b499626304ff32 100644 (file)
@@ -1374,7 +1374,7 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
        if (i915_inject_load_failure())
                return -ENODEV;
 
-       intel_device_info_runtime_init(mkwrite_device_info(dev_priv));
+       intel_device_info_runtime_init(dev_priv);
 
        if (HAS_PPGTT(dev_priv)) {
                if (intel_vgpu_active(dev_priv) &&
index ffc5d75aa690b52b954d01428442b87d5a37703d..f35e8cff4b99771ea13fb5d3e9bfbb9d763936c4 100644 (file)
@@ -738,10 +738,9 @@ static u32 read_timestamp_frequency(struct drm_i915_private *dev_priv)
  *   - after the PCH has been detected,
  *   - before the first usage of the fields it can tweak.
  */
-void intel_device_info_runtime_init(struct intel_device_info *info)
+void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 {
-       struct drm_i915_private *dev_priv =
-               container_of(info, struct drm_i915_private, info);
+       struct intel_device_info *info = mkwrite_device_info(dev_priv);
        struct intel_runtime_info *runtime = RUNTIME_INFO(dev_priv);
        enum pipe pipe;
 
index fa81ee15dfa1bd8b52f38befae594dd57e14c82d..f0e6d374d4ecb1506cac6cb618d7ed1da35e8bbb 100644 (file)
@@ -266,7 +266,7 @@ static inline void sseu_set_eus(struct sseu_dev_info *sseu,
 
 const char *intel_platform_name(enum intel_platform platform);
 
-void intel_device_info_runtime_init(struct intel_device_info *info);
+void intel_device_info_runtime_init(struct drm_i915_private *dev_priv);
 void intel_device_info_dump(const struct intel_device_info *info,
                            struct drm_printer *p);
 void intel_device_info_dump_flags(const struct intel_device_info *info,