Skip to contentSkip to conversation

drm/i915: protect HSW power well check with IS_HASWELL in redisable_vga

PATCH In review Jesse Barnes 2 participants 3 messages Oct 11, 2013 – Oct 12, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: protect HSW power well check with IS_HASWELL in redisable_vga

This may need work if other platforms do the same thing, but in the meantime we should avoid looking at HSW specific bits in this generic function.

---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 53c4ea8..e1b19b4 100644
@@ -10667,7 +10667,7 @@ void i915_redisable_vga(struct drm_device *dev)
 	 * level, just check if the power well is enabled instead of trying to
 	 * follow the "don't touch the power well if we don't need it" policy
 	 * the rest of the driver uses. */
-	if (HAS_POWER_WELL(dev) &&
+	if (IS_HASWELL(dev) &&
 	    (I915_READ(HSW_PWR_WELL_DRIVER) & HSW_PWR_WELL_STATE_ENABLED) == 0)
 		return;
 
Signature · 1 line
1.8.3.1
#1 lore raw

2013/10/11 Jesse Barnes <[email protected]>:

Quoted 14 lines

This may need work if other platforms do the same thing, but in the meantime we should avoid looking at HSW specific bits in this generic function.

---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index 53c4ea8..e1b19b4 100644

drivers/gpu/drm/i915/intel_display.c void i915_redisable_vga(struct drm_device *dev) · line 10670

Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -10667,7 +10667,7 @@ void i915_redisable_vga(struct drm_device *dev)
         * level, just check if the power well is enabled instead of trying to
         * follow the "don't touch the power well if we don't need it" policy
         * the rest of the driver uses. */
-       if (HAS_POWER_WELL(dev) &&
+       if (IS_HASWELL(dev) &&

But today, HAS_POWER_WELL is exactly the same thing as IS_HASWELL, so you're not really changing anything besides coding style :)

I know you have plans to add power well support for other platforms,
so: Reviewed-by: Paulo Zanoni <[email protected]>

But this patch really makes sense only when inside some bigger series that we haven't seen yet. I'll leave the decision to merge it or not to Daniel.

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +0 -1
            (I915_READ(HSW_PWR_WELL_DRIVER) & HSW_PWR_WELL_STATE_ENABLED) == 0)
                return;
 
--

1.8.3.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Paulo Zanoni
#2 lore raw
Quoted 24 lines · On Fri, 11 Oct 2013 18:39:01 -0300 Paulo Zanoni <[email protected]> wrote:

2013/10/11 Jesse Barnes <[email protected]>:

Quoted 14 lines

This may need work if other platforms do the same thing, but in the meantime we should avoid looking at HSW specific bits in this generic function.

---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index 53c4ea8..e1b19b4 100644

drivers/gpu/drm/i915/intel_display.c void i915_redisable_vga(struct drm_device *dev) · line 10670

Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -10667,7 +10667,7 @@ void i915_redisable_vga(struct drm_device *dev)
         * level, just check if the power well is enabled instead of trying to
         * follow the "don't touch the power well if we don't need it" policy
         * the rest of the driver uses. */
-       if (HAS_POWER_WELL(dev) &&
+       if (IS_HASWELL(dev) &&

But today, HAS_POWER_WELL is exactly the same thing as IS_HASWELL, so you're not really changing anything besides coding style :)

Quoted 6 lines

I know you have plans to add power well support for other platforms,
so: Reviewed-by: Paulo Zanoni <[email protected]>

But this patch really makes sense only when inside some bigger series that we haven't seen yet. I'll leave the decision to merge it or not to Daniel.

The bigger series is coming, indulge me with this patch. :)

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center