summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuanhan Liu <yuanhan.liu@intel.com>2011-03-18 07:37:35 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-03-23 06:41:20 +0000
commit7ccb4a53eb03c9196646ca0c2a97558313e886f1 (patch)
treebbfb6b4d59a7acc9bd74ccbbf9da3e0adb966b73
parent09bfa51773c1e90f13000dc2fc0c4b84047009bc (diff)
drm/i915: Re-enable self-refresh
A broken implementation of is_pot() prevented the detection of when a singular pipe was enabled. Eric Anholt pointed out the existence of is_power_of_2() so use that instead of our broken code! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35402 Signed-off-by: Yuanhan Liu <yuanhan.liu@intel.com> Tested-by: xunx.fang@intel.com Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 841f0397288..49c07231302 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3885,10 +3885,7 @@ static bool g4x_compute_srwm(struct drm_device *dev,
display, cursor);
}
-static inline bool single_plane_enabled(unsigned int mask)
-{
- return mask && (mask & -mask) == 0;
-}
+#define single_plane_enabled(mask) is_power_of_2(mask)
static void g4x_update_wm(struct drm_device *dev)
{