提交 cca84a1f 编写于 作者: B Ben Widawsky 提交者: Daniel Vetter

drm/i915: Clarify RC6 enabling

At one time, we though all future platforms would have the deeper RC6
states. As it turned out, they killed it after Ivybridge, and began
using other means to achieve the power savings (the stuff we need to get
to PC7+).

The enable function was left in a weird state of odd corner cases as a
result. Since the future is now, and we also have some insight into
what's currently the future, we have an opportunity to simplify, and
future proof the function.

NOTE: VLV will be addressed in a subsequent patch. This patch was trying
not to change functionality.

NOTE2: All callers sanitize the return value anyway, so this patch is
simply to have the code make a bit more sense.
Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
Reviewed-by: NDeepak S <deepak.s@intel.com>
Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 7ad25d48
......@@ -3222,14 +3222,10 @@ int intel_enable_rc6(const struct drm_device *dev)
if (INTEL_INFO(dev)->gen == 5)
return 0;
if (IS_HASWELL(dev))
return INTEL_RC6_ENABLE;
/* snb/ivb have more than one rc6 state. */
if (INTEL_INFO(dev)->gen == 6)
if (IS_IVYBRIDGE(dev) || IS_VALLEYVIEW(dev))
return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE);
else
return INTEL_RC6_ENABLE;
return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE);
}
static void gen6_enable_rps_interrupts(struct drm_device *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册