提交 342e36c6 编写于 作者: R Rodrigo Vivi 提交者: Daniel Vetter

drm/i915: Avoid reading fbc registers in vain when fbc was never enabled.

If it wasn't never enabled by kernel parameter or platform default
we can avoid reading registers so many times in vain

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 01d06e9f
......@@ -339,6 +339,12 @@ bool intel_fbc_enabled(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
/* If it wasn't never enabled by kernel parameter or platform default
* we can avoid reading registers so many times in vain
*/
if (!i915.enable_fbc)
return false;
if (!dev_priv->display.fbc_enabled)
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部