]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: add SW tracking to FBC enabling
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 19 Sep 2014 19:04:55 +0000 (16:04 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Sep 2014 08:28:53 +0000 (10:28 +0200)
commit00359d98283bd48e46826c477642058b07314e85
tree071fe73fc3ad629b50c746d86b143006504f0ba9
parent4e8c672780432c76db31124fd24d718d1b74a54e
drm/i915: add SW tracking to FBC enabling

Currently, calling intel_fbc_enabled() will trigger a register read.
And we call it a lot of times, even when FBC is disabled, so saving a
few cycles would be a good thing.

Another reason for this patch is because we currently call
intel_fbc_enabled() while the HW is runtime suspended, so the read
makes no sense and triggers a WARN. This happens even if FBC is
disabled by default. Of course one could argue that we just shouldn't
be calling intel_fbc_enabled() while the driver is runtime suspended,
and I agree that's a good argument, but I still think that the reason
explained in the first paragraph already justifies the patch.
This problem can easily be reproduced with many subtests of
igt/pm_rpm, and it is a regression introduced by:

    commit fda18c0971a5c53e96f1f05139d7b12e95d37caa
    Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Date:   Mon Aug 4 03:51:38 2014 -0700
        drm/i915: FBC flush nuke for BDW

Testcase: igt/pm_rpm/cursor (and others)
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_pm.c