drm/i915: don't keep reassigning FBC_UNSUPPORTED
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Mon, 9 Feb 2015 16:46:28 +0000 (14:46 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 13 Feb 2015 22:28:14 +0000 (23:28 +0100)
This may save a few picoseconds on !HAS_FBC platforms. And it also
satisfies my OCD.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_fbc.c

index c9a470f9d8800756dbd9a53eff54a1c949af403d..ce7774d1b675eb89c8ecf4c6c35d8822419dcb07 100644 (file)
@@ -502,10 +502,8 @@ void intel_fbc_update(struct drm_device *dev)
        const struct drm_display_mode *adjusted_mode;
        unsigned int max_width, max_height;
 
-       if (!HAS_FBC(dev)) {
-               set_no_fbc_reason(dev_priv, FBC_UNSUPPORTED);
+       if (!HAS_FBC(dev))
                return;
-       }
 
        if (i915.enable_fbc < 0) {
                if (set_no_fbc_reason(dev_priv, FBC_CHIP_DEFAULT))
@@ -670,6 +668,7 @@ void intel_fbc_init(struct drm_i915_private *dev_priv)
 {
        if (!HAS_FBC(dev_priv)) {
                dev_priv->fbc.enabled = false;
+               dev_priv->fbc.no_fbc_reason = FBC_UNSUPPORTED;
                return;
        }