From: Ville Syrjälä Date: Tue, 25 Feb 2020 17:11:10 +0000 (+0200) Subject: drm/i915: Make skl_compute_dbuf_slices() behave consistently for all platforms X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=2f9078c34c448372da0bd830cc80caba544a950a;p=kernel.git drm/i915: Make skl_compute_dbuf_slices() behave consistently for all platforms Currently skl_compute_dbuf_slices() returns 0 for any inactive pipe on icl+, but returns BIT(S1) on pre-icl for any pipe (whether it's active or not). Let's make the behaviour consistent and always return 0 for any inactive pipe. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200225171125.28885-6-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy --- diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 696491d71a1d1..5c47b893e7b21 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4606,7 +4606,7 @@ static u8 skl_compute_dbuf_slices(const struct intel_crtc_state *crtc_state, * For anything else just return one slice yet. * Should be extended for other platforms. */ - return BIT(DBUF_S1); + return active_pipes & BIT(pipe) ? BIT(DBUF_S1) : 0; } static u64