drm/i915/fbc: Eliminate racy intel_fbc_is_active() usage
The ilk fbc watermark computation uses intel_fbc_is_active() which is racy since we don't know whether FBC will be enabled or not at some point. So let's just assume it will be if both HAS_FBC() and the modparam agree. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211124113652.22090-2-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola <mika.kahola@intel.com>
This commit is contained in:
parent
d96c5ed0e3
commit
248e251567
|
@ -3369,13 +3369,8 @@ static void ilk_wm_merge(struct drm_i915_private *dev_priv,
|
|||
}
|
||||
|
||||
/* ILK: LP2+ must be disabled when FBC WM is disabled but FBC enabled */
|
||||
/*
|
||||
* FIXME this is racy. FBC might get enabled later.
|
||||
* What we should check here is whether FBC can be
|
||||
* enabled sometime later.
|
||||
*/
|
||||
if (DISPLAY_VER(dev_priv) == 5 && !merged->fbc_wm_enabled &&
|
||||
intel_fbc_is_active(&dev_priv->fbc)) {
|
||||
if (DISPLAY_VER(dev_priv) == 5 && HAS_FBC(dev_priv) &&
|
||||
dev_priv->params.enable_fbc && !merged->fbc_wm_enabled) {
|
||||
for (level = 2; level <= max_level; level++) {
|
||||
struct intel_wm_level *wm = &merged->wm[level];
|
||||
|
||||
|
|
Loading…
Reference in New Issue