Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3213422rwd; Sat, 10 Jun 2023 03:50:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fOcQ/Gb3MGSLrnaRUcYX1XUTNQJhyTrK4cdAL5HrkTQe+g5cg0dAWqvAFgi2Igi2EJmZb X-Received: by 2002:a17:902:9b8d:b0:1ad:dac0:5125 with SMTP id y13-20020a1709029b8d00b001addac05125mr1523605plp.11.1686394220055; Sat, 10 Jun 2023 03:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686394220; cv=none; d=google.com; s=arc-20160816; b=IIo4bRUZUzQKKsaFUGN9mjAQPC8K08dmigNd3G6lvsEoX3Dxxw87LHNLLutXZUl1YB dbQItLxGwLoGb4XUT/ar5rgYtmTCRjjhqSZ0V3Q6CQL3k3gI8t3BqEslmeamc+DGo7us HTIRW6jQaxYhdBFEFmCr7HLfIPGtX3NJ2Q9BuFAnJ3qsQtZvd/9+sDVOwK6IO+P7LE2y 8ZmayqJNNDRtyvMSdGoR8T70dHWADMWj4arY87AmPnPT3tbuhEVlT8yZHirZOT+vkJU8 MHtoYuII7WHwZWyyMWg3LdPUC67H71UkNtOiygIjR4SEVZGDnJN8MgbiXroaV8NB0Fkn DM5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=to8oZ7L4fC+T49c7O2RXAbP8nJvmZRdwodJiT0ePUgs=; b=QAG0hyVQE0jpQCTKR9HjEZMu9zz4CuStttEvfCpW2YCzT8lNFV/jJTptC4t2x0MwY5 dDIfYDydltjfDtShte64ZBf0AaIR1g0RPShhHjxgKNsBvbBvrkMwTsaz8hIwb0Fp5Fbr rO0ZG3V7y7sUsUysBFWIs6D9yMIEnEQI2XmemgdeDWYFF0QwNxhAOtw2gUT3bDxsogC+ Nyu4zcZMYTyNTGzXuZnpicKNmaj0KyQ/9vFEv2uPl+apiKAvz0taP2RoSZv0pilYecGR 4u3jp59Y7GWaclmH9Fw01Cdp1Jfd1vyBXI5CKPjntsXU5Bpjp0WsMm1koMKfOXApda8g zH+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VtfoIIBi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a170902860c00b001b23e9c2759si4140723plo.398.2023.06.10.03.50.05; Sat, 10 Jun 2023 03:50:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VtfoIIBi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231919AbjFJK1M (ORCPT + 99 others); Sat, 10 Jun 2023 06:27:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbjFJK1L (ORCPT ); Sat, 10 Jun 2023 06:27:11 -0400 Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D4BA35B8 for ; Sat, 10 Jun 2023 03:27:10 -0700 (PDT) Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-565e6beb7aaso24755767b3.2 for ; Sat, 10 Jun 2023 03:27:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686392829; x=1688984829; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=to8oZ7L4fC+T49c7O2RXAbP8nJvmZRdwodJiT0ePUgs=; b=VtfoIIBi2gjH8mp/MVxkQnvYC58lGIrKyL1oN9HdMV2QIktHsfiMb7nG1eK+hsPfAn c96AHXJCFWm4BYoTbUUw+s0mrnbCF0m4V1D4E1TAAUEdHPVBdztK+sR/B53Aeu3DA2WF bR5lRfV0MrgBcPEMC3yfPypP3eQswXm2ZNAfBVQg/Recb+MgBGw8THISDUfL3IROQF/h zi6pMuJO66v17QGaf9n6xOa6kIb5OkjVHwJODl23BlrrbGcSedvUm8WyAatcB5Qvfsp1 DiGywfyCvuey04+bMIQJZYw3HaIpFrJmLVUafIO6QhGwZUv50Relfvjfkbo0XLyywpbY 9CdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686392829; x=1688984829; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=to8oZ7L4fC+T49c7O2RXAbP8nJvmZRdwodJiT0ePUgs=; b=YC6uu6w7H0bYXIhDlNFdD9k/m4Jc8cuU6I0j04feQw8raZKITL9izrX2rhEqzJJQIj 2D6lGSWvd5PCVuQin/62ghDDHthhGT/1rNUD/aF8MGxEJfRBNef4rwYuV+Z9n/IHItEF NhDGlSLbGE6bonnDfxJ3DGkyTBda68zP/OP1eH3P+9DyLViMbrx7SwRI4FWcS4fyUrOO aS2tjp1rbeq1E5nwUbZtPXmcE029Kht8bIHWUYjRZ0F5bzHeVBX5cXnLrch0YAZWgYvK FpNVZwGwA2ukcrugHnW0JhBbcU1quz5aHR0e6muZXITwgogq4yz1P+ApOnA7bEJDuR2+ 2A5g== X-Gm-Message-State: AC+VfDzu9KhLh/liiO1speTVMnxWlWoGU3+wiQw5bLpFSWeInNOqZ4vu YlwkIfBVYBVa4T39WILne0jI/6p94KlhQACqkC2pJg== X-Received: by 2002:a81:8841:0:b0:565:9a3d:a3f9 with SMTP id y62-20020a818841000000b005659a3da3f9mr3920231ywf.9.1686392829544; Sat, 10 Jun 2023 03:27:09 -0700 (PDT) MIME-Version: 1.0 References: <1676286704-818-1-git-send-email-quic_kalyant@quicinc.com> <1676286704-818-3-git-send-email-quic_kalyant@quicinc.com> <20230301082403.vm4ejqod3ba5wkzp@SoMainline.org> In-Reply-To: <20230301082403.vm4ejqod3ba5wkzp@SoMainline.org> From: Yongqin Liu Date: Sat, 10 Jun 2023 18:26:58 +0800 Message-ID: Subject: Re: [PATCH v4 2/4] drm/msm/dpu: add DSPPs into reservation upon a CTM request To: Marijn Suijten , 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, Amit Pundir , Sumit Semwal , John Stultz Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Kalyan Thota It seems this change caused some drm problems with the Android build. I tested with one Android build that based on the ACK android-mainline kernel[1], and there are the message printed like 01-01 06:51:50.541 504 504 E : [drm:_dpu_rm_check_lm_and_get_connected_blks] [dpu error]failed to get dspp on lm 0 01-01 06:51:50.551 504 504 E : [drm:_dpu_rm_check_lm_and_get_connected_blks] [dpu error]failed to get dspp on lm 0 01-01 06:51:50.560 504 504 E : [drm:_dpu_rm_check_lm_and_get_connected_blks] [dpu error]failed to get dspp on lm 0 01-01 06:51:50.570 504 504 E : [drm:_dpu_rm_check_lm_and_get_connected_blks] [dpu error]failed to get dspp on lm 0 01-01 06:51:50.579 504 504 E : [drm:_dpu_rm_make_reservation] [dpu error]unable to find appropriate mixers 01-01 06:51:50.588 504 504 E : [drm:dpu_rm_reserve] [dpu error]failed to reserve hw resources: -119 For details, please check the link here: https://termbin.com/31lc If I revert this commit, then the problem will be gone. Could you please help check if there is any problem with this commit? [1]: https://android.googlesource.com/kernel/common/+/refs/heads/android-mainline Thanks, Yongqin Liu On Wed, 1 Mar 2023 at 16:24, Marijn Suijten wrote: > > On 2023-02-13 03:11:42, Kalyan Thota wrote: > > Add DSPP blocks into the topology for reservation, if there > > is a CTM request for that composition. > > > > Signed-off-by: Kalyan Thota > > Reviewed-by: Dmitry Baryshkov > > Reviewed-by: Marijn Suijten > > > --- > > Changes in v1: > > - Minor nits (Dmitry) > > > > Changes in v2: > > - Populate DSPPs into the reservation only if CTM is requested (Dmitry) > > --- > > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 15 ++++++--------- > > 1 file changed, 6 insertions(+), 9 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..46d2a5c 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; > > @@ -563,8 +564,7 @@ static struct msm_display_topology dpu_encoder_get_topology( > > * 1 LM, 1 INTF > > * 2 LM, 1 INTF (stream merge to support high resolution interfaces) > > * > > - * Adding color blocks only to primary interface if available in > > - * sufficient number > > + * Add dspps to the reservation requirements if ctm is requested > > */ > > if (intf_count == 2) > > topology.num_lm = 2; > > @@ -573,11 +573,8 @@ 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 (crtc_state->ctm) > > + topology.num_dspp = topology.num_lm; > > > > topology.num_enc = 0; > > topology.num_intf = intf_count; > > @@ -643,7 +640,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 > > -- Best Regards, Yongqin Liu --------------------------------------------------------------- #mailing list linaro-android@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-android