From: Stanislav Lisovskiy Date: Thu, 13 Feb 2020 14:04:10 +0000 (+0200) Subject: drm/i915: Ensure no conflicts with BIOS when updating Dbuf X-Git-Tag: baikal/mips/sdk5.9~13997^2~18^2~76 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=a6a32f6626afe311b7e9d2b05a491f30373afb69;p=kernel.git drm/i915: Ensure no conflicts with BIOS when updating Dbuf TGL BIOS seems to enable both DBuf slices ocasionally, depending how many displays are connected, while i915 according to BSpec was powering on S1 DBuf slice, until a modeset was done. This was causing a brief flash during the boot as we were disabling slice, previously used by BIOS with that. To prevent this, now we are ensuring tht we are enabling _at least_ one slice, but if there are more, let's not power them off. Fixes: 91c6fbd51328 ("drm/i915: Correctly map DBUF slices to pipes") Reviewed-by: Matt Roper Signed-off-by: Stanislav Lisovskiy Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200213140412.32697-2-stanislav.lisovskiy@intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c index 53056def54145..b9a9cbad8a036 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.c +++ b/drivers/gpu/drm/i915/display/intel_display_power.c @@ -4470,11 +4470,13 @@ void icl_dbuf_slices_update(struct drm_i915_private *dev_priv, static void icl_dbuf_enable(struct drm_i915_private *dev_priv) { + skl_ddb_get_hw_state(dev_priv); /* - * Just power up 1 slice, we will + * Just power up at least 1 slice, we will * figure out later which slices we have and what we need. */ - icl_dbuf_slices_update(dev_priv, BIT(DBUF_S1)); + icl_dbuf_slices_update(dev_priv, dev_priv->enabled_dbuf_slices_mask | + BIT(DBUF_S1)); } static void icl_dbuf_disable(struct drm_i915_private *dev_priv)