summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_sysfs.c
diff options
context:
space:
mode:
authorAkash Goel <akash.goel@intel.com>2015-03-06 11:07:22 +0530
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-17 22:30:25 +0100
commited64d66fba4684f162cf573587f729142d5e0d0f (patch)
treeb11e4a51d7ad2fc5eb9997510cf74d93f69a3c68 /drivers/gpu/drm/i915/i915_sysfs.c
parent0beb059ab8312cd9dab598a3fb3555355c01a0d9 (diff)
downloadop-kernel-dev-ed64d66fba4684f162cf573587f729142d5e0d0f.zip
op-kernel-dev-ed64d66fba4684f162cf573587f729142d5e0d0f.tar.gz
drm/i915/skl: Updated the act_freq_mhz_show sysfs function
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_sysfs.c')
-rw-r--r--drivers/gpu/drm/i915/i915_sysfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index 67bd07e..2476268 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -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;
OpenPOWER on IntegriCloud