drm/i915: Valleyview doesn't have rc6+ or rc6++
Subsystems (2)
PATCH 1/1 drm/i915: Valleyview doesn't have rc6+ or rc6++
I do not currently have a VLV to test this on, but hopefully it only removes information from debugfs, sysfs, and prevents enabling an unsupported mode.
--- drivers/gpu/drm/i915/i915_debugfs.c | 5 +++++ drivers/gpu/drm/i915/i915_sysfs.c | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +5 -0
@@ -1144,11 +1144,16 @@ static int gen6_drpc_info(struct seq_file *m) I915_READ(GEN6_GT_GFX_RC6_LOCKED));seq_printf (m,"RC6 residency since boot: %u\n" ,I915_READ (GEN6_GT_GFX_RC6 )); + +if (IS_VALLEYVIEW (dev)) + goto out; +seq_printf (m,"RC6+ residency since boot: %u\n" ,I915_READ (GEN6_GT_GFX_RC6p));seq_printf (m,"RC6++ residency since boot: %u\n" ,I915_READ (GEN6_GT_GFX_RC6pp)); +out:return 0 ; }
drivers/gpu/drm/i915/i915_sysfs.c +3 -0
@@ -41,6 +41,9 @@ static u32 calc_residency(struct drm_device *dev, const u32 reg)if (!intel_enable_rc6 (dev))return 0 ; +if (IS_VALLEYVIEW (dev) && reg !=GEN6_GT_GFX_RC6 ) +return 0 ; + raw_time =I915_READ (reg) *128ULL ;return DIV_ROUND_UP_ULL (raw_time,100000 ); }
drivers/gpu/drm/i915/intel_pm.c +2 -2
@@ -2389,8 +2389,8 @@ int intel_enable_rc6(const struct drm_device *dev) }/* snb/ivb have more than one rc6 state. */ -if (INTEL_INFO (dev)->gen ==6 ) { -DRM_DEBUG_DRIVER ("Sandybridge: deep RC6 disabled\n" ); +if (INTEL_INFO (dev)->gen ==6 ||IS_VALLEYVIEW (dev)) { +DRM_DEBUG_DRIVER ("HW doesn't support deep RC6 (disabling)\n" );return INTEL_RC6_ENABLE ; }
Signature · 1 line
1.7.12
Feel free to use:
Quoted 69 lines · Ben Widawsky
I do not currently have a VLV to test this on, but hopefully it only removes information from debugfs, sysfs, and prevents enabling an unsupported mode.
CC Jesse Barnes <[email protected]>Signed-off-by Ben Widawsky <[email protected]>--- drivers/gpu/drm/i915/i915_debugfs.c | 5 +++++ drivers/gpu/drm/i915/i915_sysfs.c | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +5
-0@@ -1144,11 +1144,16 @@ static int gen6_drpc_info(struct seq_file *m) I915_READ(GEN6_GT_GFX_RC6_LOCKED));seq_printf (m,"RC6 residency since boot: %u\n" ,I915_READ (GEN6_GT_GFX_RC6 )); + +if (IS_VALLEYVIEW (dev)) + goto out; +seq_printf (m,"RC6+ residency since boot: %u\n" ,I915_READ (GEN6_GT_GFX_RC6p));seq_printf (m,"RC6++ residency since boot: %u\n" ,I915_READ (GEN6_GT_GFX_RC6pp)); +out:return 0 ; }drivers/gpu/drm/i915/i915_sysfs.c +3
-0@@ -41,6 +41,9 @@ static u32 calc_residency(struct drm_device *dev, const u32 reg)if (!intel_enable_rc6 (dev))return 0 ; +if (IS_VALLEYVIEW (dev) && reg !=GEN6_GT_GFX_RC6 ) +return 0 ; + raw_time =I915_READ (reg) *128ULL ;return DIV_ROUND_UP_ULL (raw_time,100000 ); }drivers/gpu/drm/i915/intel_pm.c +2
-3@@ -2389,8 +2389,8 @@ int intel_enable_rc6(const struct drm_device *dev) }/* snb/ivb have more than one rc6 state. */ -if (INTEL_INFO (dev)->gen ==6 ) { -DRM_DEBUG_DRIVER ("Sandybridge: deep RC6 disabled\n" ); +if (INTEL_INFO (dev)->gen ==6 ||IS_VALLEYVIEW (dev)) { +DRM_DEBUG_DRIVER ("HW doesn't support deep RC6 (disabling)\n" );return INTEL_RC6_ENABLE ; } --1.7.12
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Quoted 6 lines · Ben Widawsky
I do not currently have a VLV to test this on, but hopefully it only removes information from debugfs, sysfs, and prevents enabling an unsupported mode.
CC Jesse Barnes <[email protected]>Signed-off-by Ben Widawsky <[email protected]>
Haswell seems to have a similar issue ...
-Daniel
Quoted 63 lines
--- drivers/gpu/drm/i915/i915_debugfs.c | 5 +++++ drivers/gpu/drm/i915/i915_sysfs.c | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +5
-0@@ -1144,11 +1144,16 @@ static int gen6_drpc_info(struct seq_file *m) I915_READ(GEN6_GT_GFX_RC6_LOCKED));seq_printf (m,"RC6 residency since boot: %u\n" ,I915_READ (GEN6_GT_GFX_RC6 )); + +if (IS_VALLEYVIEW (dev)) + goto out; +seq_printf (m,"RC6+ residency since boot: %u\n" ,I915_READ (GEN6_GT_GFX_RC6p));seq_printf (m,"RC6++ residency since boot: %u\n" ,I915_READ (GEN6_GT_GFX_RC6pp)); +out:return 0 ; }drivers/gpu/drm/i915/i915_sysfs.c +3
-0@@ -41,6 +41,9 @@ static u32 calc_residency(struct drm_device *dev, const u32 reg)if (!intel_enable_rc6 (dev))return 0 ; +if (IS_VALLEYVIEW (dev) && reg !=GEN6_GT_GFX_RC6 ) +return 0 ; + raw_time =I915_READ (reg) *128ULL ;return DIV_ROUND_UP_ULL (raw_time,100000 ); }drivers/gpu/drm/i915/intel_pm.c +2
-2@@ -2389,8 +2389,8 @@ int intel_enable_rc6(const struct drm_device *dev) }/* snb/ivb have more than one rc6 state. */ -if (INTEL_INFO (dev)->gen ==6 ) { -DRM_DEBUG_DRIVER ("Sandybridge: deep RC6 disabled\n" ); +if (INTEL_INFO (dev)->gen ==6 ||IS_VALLEYVIEW (dev)) { +DRM_DEBUG_DRIVER ("HW doesn't support deep RC6 (disabling)\n" );return INTEL_RC6_ENABLE ; }Signature · 6 lines
1.7.12 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 10 lines · On Wed, 26 Sep 2012 14:06:36 +0200 Daniel Vetter <[email protected]> wrote:
Quoted 6 lines · Ben Widawsky
I do not currently have a VLV to test this on, but hopefully it only removes information from debugfs, sysfs, and prevents enabling an unsupported mode.
CC Jesse Barnes <[email protected]>Signed-off-by Ben Widawsky <[email protected]>Haswell seems to have a similar issue ...
-Daniel
I've not found such information. Can you tell me where you see that?
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
Quoted 8 lines · Ben Widawsky
Quoted 5 lines · On Wed, 26 Sep 2012 14:06:36 +0200 Daniel Vetter <[email protected]> wrote:
Quoted 4 lines · Ben Widawsky
I do not currently have a VLV to test this on, but hopefully it only removes information from debugfs, sysfs, and prevents enabling an unsupported mode.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
CC Jesse Barnes <[email protected]>Signed-off-by Ben Widawsky <[email protected]>Haswell seems to have a similar issue ...
-DanielI've not found such information. Can you tell me where you see that?
Haswell doesn't have the additional rc6 levels either, but on a quick look through the code we still expose them, like on vlv. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch