drm/i915: move dev_priv->(rps|ips) out of line
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 2 Nov 2012 18:55:03 +0000 (19:55 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 11 Nov 2012 22:51:38 +0000 (23:51 +0100)
And give the structs slightly more generic names. I've decided to keep
the short rps/ips prefix, since that's just easier and less churn.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h

index 6a37efe..abf87c6 100644 (file)
@@ -549,6 +549,40 @@ struct i915_suspend_saved_registers {
        u32 saveMCHBAR_RENDER_STANDBY;
        u32 savePCH_PORT_HOTPLUG;
 };
+
+struct intel_gen6_power_mgmt {
+       struct work_struct work;
+       u32 pm_iir;
+       /* lock - irqsave spinlock that protectects the work_struct and
+        * pm_iir. */
+       spinlock_t lock;
+
+       /* The below variables an all the rps hw state are protected by
+        * dev->struct mutext. */
+       u8 cur_delay;
+       u8 min_delay;
+       u8 max_delay;
+};
+
+struct intel_ilk_power_mgmt {
+       u8 cur_delay;
+       u8 min_delay;
+       u8 max_delay;
+       u8 fmax;
+       u8 fstart;
+
+       u64 last_count1;
+       unsigned long last_time1;
+       unsigned long chipset_power;
+       u64 last_count2;
+       struct timespec last_time2;
+       unsigned long gfx_power;
+       u8 corr;
+
+       int c_m;
+       int r_t;
+};
+
 typedef struct drm_i915_private {
        struct drm_device *dev;
 
@@ -833,40 +867,11 @@ typedef struct drm_i915_private {
        bool mchbar_need_disable;
 
        /* gen6+ rps state */
-       struct {
-               struct work_struct work;
-               u32 pm_iir;
-               /* lock - irqsave spinlock that protectects the work_struct and
-                * pm_iir. */
-               spinlock_t lock;
-
-               /* The below variables an all the rps hw state are protected by
-                * dev->struct mutext. */
-               u8 cur_delay;
-               u8 min_delay;
-               u8 max_delay;
-       } rps;
+       struct intel_gen6_power_mgmt rps;
 
        /* ilk-only ips/rps state. Everything in here is protected by the global
         * mchdev_lock in intel_pm.c */
-       struct {
-               u8 cur_delay;
-               u8 min_delay;
-               u8 max_delay;
-               u8 fmax;
-               u8 fstart;
-
-               u64 last_count1;
-               unsigned long last_time1;
-               unsigned long chipset_power;
-               u64 last_count2;
-               struct timespec last_time2;
-               unsigned long gfx_power;
-               u8 corr;
-
-               int c_m;
-               int r_t;
-       } ips;
+       struct intel_ilk_power_mgmt ips;
 
        enum no_fbc_reason no_fbc_reason;