Commit 5ffd494b authored by Jesse Barnes's avatar Jesse Barnes Committed by Daniel Vetter
Browse files

drm/i915/vlv: disable rc6p and rc6pp residency reporting on BYT



Byt doesn't have rc6p and rc6pp support and even more important the
the offsets of the residency registers there's something else. So Just
return a constant 0 to avoid upsetting userspace tools like powertop.

Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
[danvet: Explain a bit in the commit message what's going on.]
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent a2b23fe0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -65,6 +65,8 @@ show_rc6p_ms(struct device *kdev, struct device_attribute *attr, char *buf)
{
	struct drm_minor *dminor = container_of(kdev, struct drm_minor, kdev);
	u32 rc6p_residency = calc_residency(dminor->dev, GEN6_GT_GFX_RC6p);
	if (IS_VALLEYVIEW(dminor->dev))
		rc6p_residency = 0;
	return snprintf(buf, PAGE_SIZE, "%u\n", rc6p_residency);
}

@@ -73,6 +75,8 @@ show_rc6pp_ms(struct device *kdev, struct device_attribute *attr, char *buf)
{
	struct drm_minor *dminor = container_of(kdev, struct drm_minor, kdev);
	u32 rc6pp_residency = calc_residency(dminor->dev, GEN6_GT_GFX_RC6pp);
	if (IS_VALLEYVIEW(dminor->dev))
		rc6pp_residency = 0;
	return snprintf(buf, PAGE_SIZE, "%u\n", rc6pp_residency);
}