From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09FFEC3F2CD for ; Mon, 2 Mar 2020 14:50:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D3FD32166E for ; Mon, 2 Mar 2020 14:50:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D3FD32166E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 849E56E2E3; Mon, 2 Mar 2020 14:50:42 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4712A6E2E3 for ; Mon, 2 Mar 2020 14:50:41 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2020 06:50:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,507,1574150400"; d="scan'208";a="233177949" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga008.jf.intel.com with SMTP; 02 Mar 2020 06:50:38 -0800 Received: by stinkbox (sSMTP sendmail emulation); Mon, 02 Mar 2020 16:50:37 +0200 Date: Mon, 2 Mar 2020 16:50:37 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: "Lisovskiy, Stanislav" Message-ID: <20200302145037.GK13686@intel.com> References: <20200225171125.28885-1-ville.syrjala@linux.intel.com> <20200225171125.28885-6-ville.syrjala@linux.intel.com> <587c8ad3b5fc69b2ec0d4fcae302d4e8c959ba82.camel@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <587c8ad3b5fc69b2ec0d4fcae302d4e8c959ba82.camel@intel.com> X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [Intel-gfx] [PATCH v2 05/20] drm/i915: Make skl_compute_dbuf_slices() behave consistently for all platforms X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "intel-gfx@lists.freedesktop.org" Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, Feb 25, 2020 at 05:30:57PM +0000, Lisovskiy, Stanislav wrote: > On Tue, 2020-02-25 at 19:11 +0200, Ville Syrjala wrote: > > From: Ville Syrj=E4l=E4 > > = > > 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=E4l=E4 > > --- > > drivers/gpu/drm/i915/intel_pm.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > = > > diff --git a/drivers/gpu/drm/i915/intel_pm.c > > b/drivers/gpu/drm/i915/intel_pm.c > > index a2e78969c0df..640f4c4fd508 100644 > > --- a/drivers/gpu/drm/i915/intel_pm.c > > +++ b/drivers/gpu/drm/i915/intel_pm.c > > @@ -4408,7 +4408,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; > = > I think the initial idea was this won't be even called if there = > are no active pipes at all - skl_ddb_get_pipe_allocation_limits would > bail out immediately. If there were some active pipes - then we will > have to use slice S1 anyway - because there were simply no other slices > available. If some pipes were inactive - they are currently skipped by > !crtc_state->hw.active check - so I would just keep it simple and don't > call this function for non-active pipes at all. That's just going to make the caller more messy by forcing it to check for active_pipes 0 vs. not. Ie. we'd be splitting the responsibility of computing the dbuf slices for this pipe between skl_compute_dbuf_slices() and its caller. Not a good idea IMO. -- = Ville Syrj=E4l=E4 Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx