Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp148884rwb; Tue, 13 Dec 2022 15:24:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXtVlTFbeTSFs5A+2iqSQbjjG1NIGgaztihP3hm1KR61j5OW1epv2AhvD6KUezkNPNr+N2nV X-Received: by 2002:aa7:c6c4:0:b0:472:2d7e:8c6d with SMTP id b4-20020aa7c6c4000000b004722d7e8c6dmr207400eds.28.1670973877751; Tue, 13 Dec 2022 15:24:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670973877; cv=none; d=google.com; s=arc-20160816; b=werDzSpMpyulgdM6/yN0cPBeT7IbnOl5SXud5hDXRX7Ty9WEN6Hu2O8GfowHMsZl/i iT/J1iW5+HO/sodunNSj7Q/Qt06B/rewo46guFTok67V5XeOh4w4mEIL3xPD7XM6jedQ PGdVk1P0Vwnc4WElr63D1YeECkGCnlP33kOPcO9VQduDYAoi9uU8VkKHWC1dQzrwq/ZA C/WIPI/y/N83HvzQH3kzJMAX7ufsHfzepxLVAgwX7BVPA0r7tusspNgg1ft0uQ3skvKL +hQ4cMAcS7mRtxR7SU2ZceJJG7Q8SkA28dZ1CbwMCA37KOJ481s3oNpxkwYGWb/lBgmX qNvQ== 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:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=MAM1zWKmLoLybnlVx2DB+oXg2+2O2pnw6L+In6EaViM=; b=EUKwp4/OdtY/sM7RHw0Y2wz6kuSa9CdRpmNWBgBq8NczZg8wwaz5Xa/2ieViVKVyVD YZ7wYuK/XPYDXQUOtwsjPKWwFPFr8Xsjx5pB18kn+xH1p+Jg07an37OnaoVYSt0O0nmE W9h1YLdhEK616Lf24oBPIX+XapIinhukYlgmvqJtpE+xjNoQmjAzcvExksSBeCbHaF7D Bf8x18r2IYiBF4OnQdJEEvOIQZpzumjnJRxdxA9f9r+8B+AaKh8zRcgwVldu5xskjK85 yEDsB6Al8PYfUbPjx9mOyn8aUqaoLKeDVq+3ftn+Uoxh494IBaFyV4hlW7AgHbyHZlmB R20A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jwUPqxBm; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y2-20020a056402440200b0046b62140386si13553659eda.576.2022.12.13.15.24.19; Tue, 13 Dec 2022 15:24:37 -0800 (PST) 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=@chromium.org header.s=google header.b=jwUPqxBm; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236950AbiLMXL6 (ORCPT + 72 others); Tue, 13 Dec 2022 18:11:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236963AbiLMXLx (ORCPT ); Tue, 13 Dec 2022 18:11:53 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99D5D1AF11 for ; Tue, 13 Dec 2022 15:11:51 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id h10so4963251ljk.11 for ; Tue, 13 Dec 2022 15:11:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:user-agent:from:references :in-reply-to:mime-version:from:to:cc:subject:date:message-id :reply-to; bh=MAM1zWKmLoLybnlVx2DB+oXg2+2O2pnw6L+In6EaViM=; b=jwUPqxBmQ7VtGQpi3Ku0db2HJCatByDjpndoUTTI1N7sNE3QQhWdr3aSxNhCL89LEa hFQXlBk/K0aE6oex5CH7USSb/WOpSeJhd0GWh4Q8bHdWF5M/j+appfx9A65lXJ0fPHbo yRkvbiKVN4JdC9L1kcxwbIE42pbhbLF8LU6cQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:user-agent:from:references :in-reply-to:mime-version:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MAM1zWKmLoLybnlVx2DB+oXg2+2O2pnw6L+In6EaViM=; b=ua7Hlb/M1pt+ZIaoaQdCF9qwkw7PCKcyZcIC3paYLyxTre6M/pgNN7+XSsa7RoN8cn xYVM6t65YxLUgShGyk7BIoEGUjGA+KZrhAXQ2ny2t6sXPLPg3P172AAP4UP39Mvdzi7A VehbG98MB8Ob3FDy1b+fOUJFXQj3cSabVnHXip17kGJFPKkaguQ3IN3oeWNrNbvrzDV/ /UXGGlEJE8l+BpleN846KGD8QPXfSkhGC70oJFlS74DF99AJPD/tTiYKgjk6yptvwnh1 Znnw74XsooBRZBNSaBU710p2dcie+4xtEJvpxPgG1aqpRPP9uCyOmUh78O5AsUeK76eG Ct9g== X-Gm-Message-State: ANoB5pmMrChEOSjPWKaRl5gMWz0njdEps79Wvb7y6i8w3ZiVWPkXqGCP FwYvk8uJz+KIgenRMqZg6wDi1pKun37gKd2cFoVSgw== X-Received: by 2002:a2e:a367:0:b0:27a:2a6d:73a with SMTP id i7-20020a2ea367000000b0027a2a6d073amr1335395ljn.27.1670973109877; Tue, 13 Dec 2022 15:11:49 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 13 Dec 2022 15:11:49 -0800 MIME-Version: 1.0 In-Reply-To: <1670967848-31475-4-git-send-email-quic_khsieh@quicinc.com> References: <1670967848-31475-1-git-send-email-quic_khsieh@quicinc.com> <1670967848-31475-4-git-send-email-quic_khsieh@quicinc.com> From: Stephen Boyd User-Agent: alot/0.10 Date: Tue, 13 Dec 2022 15:11:49 -0800 Message-ID: Subject: Re: [PATCH v12 3/5] drm/msm/dp: parser data-lanes as property of dp_out endpoint To: Kuogee Hsieh , agross@kernel.org, airlied@gmail.com, andersson@kernel.org, daniel@ffwll.ch, devicetree@vger.kernel.org, dianders@chromium.org, dmitry.baryshkov@linaro.org, dri-devel@lists.freedesktop.org, konrad.dybcio@somainline.org, krzysztof.kozlowski+dt@linaro.org, robdclark@gmail.com, robh+dt@kernel.org, sean@poorly.run, vkoul@kernel.org Cc: quic_abhinavk@quicinc.com, quic_sbillaka@quicinc.com, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Quoting Kuogee Hsieh (2022-12-13 13:44:06) > Add capability to parser data-lanes as property of dp_out endpoint. > Also retain the original capability to parser data-lanes as property > of mdss_dp node to handle legacy case. > > Changes in v6: > -- first patch after split parser patch into two > > Changes in v7: > -- check "data-lanes" from endpoint first > > Signed-off-by: Kuogee Hsieh > Reviewed-by: Dmitry Baryshkov Subject says "parser" when it probably should say "parse"? > --- > drivers/gpu/drm/msm/dp/dp_parser.c | 25 +++++++++++++++++-------- > 1 file changed, 17 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dp/dp_parser.c b/drivers/gpu/drm/msm/dp/dp_parser.c > index dd73221..b5f7e70 100644 > --- a/drivers/gpu/drm/msm/dp/dp_parser.c > +++ b/drivers/gpu/drm/msm/dp/dp_parser.c > @@ -94,16 +94,25 @@ static int dp_parser_ctrl_res(struct dp_parser *parser) > static int dp_parser_misc(struct dp_parser *parser) > { > struct device_node *of_node = parser->pdev->dev.of_node; > - int len; > - > - len = drm_of_get_data_lanes_count(of_node, 1, DP_MAX_NUM_DP_LANES); > - if (len < 0) { > - DRM_WARN("Invalid property \"data-lanes\", default max DP lanes = %d\n", > - DP_MAX_NUM_DP_LANES); > - len = DP_MAX_NUM_DP_LANES; > + int cnt; > + > + /* > + * data-lanes is the property of dp_out endpoint > + */ > + cnt = drm_of_get_data_lanes_count_ep(of_node, 1, 0, 1, DP_MAX_NUM_DP_LANES); > + if (cnt > 0) > + parser->max_dp_lanes = cnt; > + else { Please add brackets to the above if to match the else. > + /* > + * legacy code, data-lanes is the property of mdss_dp node > + */ > + cnt = drm_of_get_data_lanes_count(of_node, 1, DP_MAX_NUM_DP_LANES); > + if (cnt > 0) > + parser->max_dp_lanes = cnt; > + else > + parser->max_dp_lanes = DP_MAX_NUM_DP_LANES; /* 4 lanes */ > } >