drm/i915/skl: Updated the act_freq_mhz_show sysfs function
authorAkash Goel <akash.goel@intel.com>
Fri, 6 Mar 2015 05:37:22 +0000 (11:07 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 17 Mar 2015 21:30:25 +0000 (22:30 +0100)
Added support for SKL in the act_freq_mhz_show sysfs function

Signed-off-by: Akash Goel <akash.goel@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_sysfs.c

index 67bd07edcbb0045f0ffe434bb02efaecd54e1768..247626885f49d22cfb94f6f89b1a459c4b0500a8 100644 (file)
@@ -319,7 +319,9 @@ static ssize_t gt_act_freq_mhz_show(struct device *kdev,
                ret = intel_gpu_freq(dev_priv, (freq >> 8) & 0xff);
        } else {
                u32 rpstat = I915_READ(GEN6_RPSTAT1);
-               if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
+               if (IS_GEN9(dev_priv))
+                       ret = (rpstat & GEN9_CAGF_MASK) >> GEN9_CAGF_SHIFT;
+               else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
                        ret = (rpstat & HSW_CAGF_MASK) >> HSW_CAGF_SHIFT;
                else
                        ret = (rpstat & GEN6_CAGF_MASK) >> GEN6_CAGF_SHIFT;