Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82D4EC63797 for ; Wed, 1 Feb 2023 11:16:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231984AbjBALQL (ORCPT ); Wed, 1 Feb 2023 06:16:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230208AbjBALQI (ORCPT ); Wed, 1 Feb 2023 06:16:08 -0500 Received: from relay03.th.seeweb.it (relay03.th.seeweb.it [5.144.164.164]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F1301630C for ; Wed, 1 Feb 2023 03:16:06 -0800 (PST) Received: from SoMainline.org (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 4FF0A20134; Wed, 1 Feb 2023 12:16:05 +0100 (CET) Date: Wed, 1 Feb 2023 12:16:04 +0100 From: Marijn Suijten To: Kalyan Thota Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, robdclark@chromium.org, dianders@chromium.org, swboyd@chromium.org, quic_vpolimer@quicinc.com, dmitry.baryshkov@linaro.org, quic_abhinavk@quicinc.com Subject: Re: [v1 2/3] drm/msm/disp/dpu1: add dspps into reservation if there is a ctm request Message-ID: <20230201111604.htgczy6yvdkywhvl@SoMainline.org> References: <1675092092-26412-1-git-send-email-quic_kalyant@quicinc.com> <1675092092-26412-3-git-send-email-quic_kalyant@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1675092092-26412-3-git-send-email-quic_kalyant@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-01-30 07:21:31, Kalyan Thota wrote: > Add dspp blocks into the topology for reservation, if there is a ctm > request for that composition. DSPP > Changes in v1: > - Minor nits (Dmitry) This should go below the triple dashes, so that it /does not/ become part of the patch/commit that is applied to the tree (where review history is irrelevant as it can be searched for separately). > Signed-off-by: Kalyan Thota > Reviewed-by: Dmitry Baryshkov > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > index 9c6817b..3bd46b4 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > @@ -545,7 +545,8 @@ bool dpu_encoder_use_dsc_merge(struct drm_encoder *drm_enc) > static struct msm_display_topology dpu_encoder_get_topology( > struct dpu_encoder_virt *dpu_enc, > struct dpu_kms *dpu_kms, > - struct drm_display_mode *mode) > + struct drm_display_mode *mode, > + struct drm_crtc_state *crtc_state) > { > struct msm_display_topology topology = {0}; > int i, intf_count = 0; > @@ -573,11 +574,9 @@ static struct msm_display_topology dpu_encoder_get_topology( > else > topology.num_lm = (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1; > > - if (dpu_enc->disp_info.intf_type == DRM_MODE_ENCODER_DSI) { > - if (dpu_kms->catalog->dspp && > - (dpu_kms->catalog->dspp_count >= topology.num_lm)) > - topology.num_dspp = topology.num_lm; > - } > + if (dpu_kms->catalog->dspp && > + crtc_state->ctm && (dpu_kms->catalog->dspp_count >= topology.num_lm)) Multiline-if-clause is typically indented with two tabs, not a half tab (4 spaces). Nit: swap the && here? dspp and dspp_count are related, so check ctm first or last but not in the middle - makes reading easier. > + topology.num_dspp = topology.num_lm; > > topology.num_enc = 0; > topology.num_intf = intf_count; > @@ -643,7 +642,7 @@ static int dpu_encoder_virt_atomic_check( > } > } > > - topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode); > + topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode, crtc_state); > > /* Reserve dynamic resources now. */ > if (!ret) { > -- > 2.7.4 >