Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp909384iog; Fri, 24 Jun 2022 17:49:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ti4FFSMtyTquB+KoSWBGG8Wfs0JC2AakNPjb9yWtm5yCilA8IMhWYhXENhmWv0R/u1qLg9 X-Received: by 2002:a17:903:2452:b0:16a:3b58:48fd with SMTP id l18-20020a170903245200b0016a3b5848fdmr1707169pls.67.1656118197678; Fri, 24 Jun 2022 17:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656118197; cv=none; d=google.com; s=arc-20160816; b=LCa3rHZzl4wxMePGYOEkD60+Cb+TXdSmVhqmlA1FKaFv74mH9BtdoINKqnp/umL/eK VZDAyLNQ+wxWcGbQuN4rHqBLPAHKqAfpaq+EY9wOUvqn692yCnhdtx+sDkFaFBLF8uRq tg+eI0a0ToWw+Nqo9IviLiuVK3RXfb5ba85rh+f/NjoYj3R8H0IR3WFswqtwhlyGuBX3 NAvKtLQGedYRkxlCzDCQzMV8xaC8q35lOQkEpqI0dp38rmrMyY+WbBElwquygliaCSjN K742wendDoqGJDk3012m5Z5itU5mf+oZjzFOzo+DTQigiVwpQdJUnmUJigHnE0a1j6XC rGtQ== 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=aM/iH2gWxnXoR4sehLWupEN2NCl54gcxQiHVIQqiXeA=; b=FkFhYH9XLyxy3BvM/2TN8T6FprT88VfbnLwSRAkOmGbTVeREa6KF6KDarTHXoeEwes xYcV6i9d7HXcTnzI6FScdaGoJJQmACrJY4DVT1Hr/vLcS5rd6au55aWEme84HmXU9V3j 6DIb5SUIw7Iu37nujcOG+gA7ENso80KvLwqPYsFk8iWSLtnV4qId8BSHDoePdNL+560r DbDXSQNiq8W9U6uYHyUFbKLdmAYrVnI9lLmdfIqP7YAdwDiIWAMyjf9Z3a+XFzlq8Fxf GJXuSFB7+wLZc8qfJC9ovO6USIzMVEXioe4ZmNHrtXX/5XdYP2+BPb69ebOm9EL7v9TQ ej/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XUdqjNBs; 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 9-20020a17090a018900b001ec9f94d9d7si8356174pjc.84.2022.06.24.17.49.45; Fri, 24 Jun 2022 17:49:57 -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=@chromium.org header.s=google header.b=XUdqjNBs; 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 S231902AbiFYAXc (ORCPT + 99 others); Fri, 24 Jun 2022 20:23:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232040AbiFYAX3 (ORCPT ); Fri, 24 Jun 2022 20:23:29 -0400 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EADDD532D5 for ; Fri, 24 Jun 2022 17:23:27 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id s124so5641235oia.0 for ; Fri, 24 Jun 2022 17:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=aM/iH2gWxnXoR4sehLWupEN2NCl54gcxQiHVIQqiXeA=; b=XUdqjNBs7l7aNzEdKeTcgl6xsOJP5AbQJTNWTxsogl01wW+lDC4wB0Xt26N/RB/+rq JABElLRg7MJ6OGAtiRkQnVe0u96orezmaKZPE59BcfZZBv8pyAvPk30t9bsz+nDinPPC dK+MsucwjJtNSvhtWaYtTlcVElPQbB9mTVnLg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=aM/iH2gWxnXoR4sehLWupEN2NCl54gcxQiHVIQqiXeA=; b=FFC64NssKp9egRlNgA6O6SxoEcR3TG5AhvT+e6ecIjL8C0AET7S+uJnebf6kcNinQL v/Zo+3Cs5y8qPDw7j8CZHWqm9YQLKOzRgiRVkRnnplwJwTkRXeUoV4Pvp4MUx/8766gc Kba/LvWGWIYcWwTS7aO0RNl6kVvnzVAgwLfS1nXlomkneFLMwrjz8eFH74iuCYw/TcdL y2lcdGk/HkBgHzEkW2PZoG38H3bQbztZrMXe6h6Ar7uFG9Z67THkIUNUk7Lu7OTr4ZLM ScS6NJb/6r2T/t1lMbld0Qdiln3HXRZIf8idr8u+kWRPppJko96aiNJY15NMrPABo5OX Cogw== X-Gm-Message-State: AJIora/4QoNIMnMb41CDmJDtUffy0vmPEmWsiQTRgNUF7BctAVaZPZXu YK1+EfWBCG6qMxqFYGJPX1aDCXjkI+lOOErScqQDLA== X-Received: by 2002:a05:6808:171c:b0:334:9342:63ef with SMTP id bc28-20020a056808171c00b00334934263efmr1076539oib.63.1656116607321; Fri, 24 Jun 2022 17:23:27 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 24 Jun 2022 17:23:26 -0700 MIME-Version: 1.0 In-Reply-To: References: <1656090912-18074-1-git-send-email-quic_khsieh@quicinc.com> <326912ff-9771-0711-366d-79acd436908b@quicinc.com> <0ff3d6a3-dc5c-7c77-f8a1-6c4f6c1a3215@quicinc.com> <66ff4642-f268-f5b0-7e28-b196368c508a@quicinc.com> <5cf094cf-343a-82d7-91c4-1284683f9748@quicinc.com> From: Stephen Boyd User-Agent: alot/0.10 Date: Fri, 24 Jun 2022 17:23:26 -0700 Message-ID: Subject: Re: [PATCH v1 2/3] drm/msm/dp: decoupling dp->id out of dp controller_id at scxxxx_dp_cfg table To: Abhinav Kumar , Kuogee Hsieh , agross@kernel.org, airlied@linux.ie, bjorn.andersson@linaro.org, daniel@ffwll.ch, dianders@chromium.org, dmitry.baryshkov@linaro.org, dri-devel@lists.freedesktop.org, robdclark@gmail.com, sean@poorly.run, vkoul@kernel.org Cc: quic_aravindh@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.7 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,T_SCC_BODY_TEXT_LINE 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 Stephen Boyd (2022-06-24 17:11:01) > Quoting Abhinav Kumar (2022-06-24 17:03:37) > > > > So let me try to explain this as this is what i understood from the > > patch and how kuogee explained me. > > > > The ordering of the array still matters here and thats what he is trying > > to address with the second change. > > The order of the array should not matter. That's the problem. It seems like somewhere else the order of the array matters, presumably while setting up encoders? > > > > > So as per him, he tried to swap the order of entries like below and that > > did not work and that is incorrect behavior because he still retained > > the MSM_DP_CONTROLLER_x field for the table like below: > > > > diff --git a/drivers/gpu/drm/msm/dp/dp_display.c > > b/drivers/gpu/drm/msm/dp/dp_display.c > > index dcd80c8a794c..7816e82452ca 100644 > > --- a/drivers/gpu/drm/msm/dp/dp_display.c > > +++ b/drivers/gpu/drm/msm/dp/dp_display.c > > @@ -140,8 +140,8 @@ static const struct msm_dp_config sc7180_dp_cfg = { > > > > static const struct msm_dp_config sc7280_dp_cfg = { > > .descs = (const struct msm_dp_desc[]) { > > - [MSM_DP_CONTROLLER_0] = { .io_start = 0x0ae90000, > > .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, > > [MSM_DP_CONTROLLER_1] = { .io_start = 0x0aea0000, > > .connector_type = DRM_MODE_CONNECTOR_eDP, .wide_bus_en = true }, > > + [MSM_DP_CONTROLLER_0] = { .io_start = 0x0ae90000, > > .connector_type = DRM_MODE_CONNECTOR_DisplayPort, .wide_bus_en = true }, > > }, > > .num_descs = 2, > > }; > > > > > > The reason order is important is because in this function below, even > > though it matches the address to find which one to use it loops through > > the array and so the value of *id will change depending on which one is > > located where. > > > > static const struct msm_dp_desc *dp_display_get_desc(struct > > platform_device *pdev, > > unsigned int *id) > > Thanks! We should fix this function to not overwrite the id. > Ah nevermind. I mixed up dp->id and h_tile_instance thinking one was overwriting the other but that doesn't make any sense.