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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 896ACC7618E for ; Tue, 14 Mar 2023 13:05:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230449AbjCNNFC (ORCPT ); Tue, 14 Mar 2023 09:05:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232427AbjCNNEp (ORCPT ); Tue, 14 Mar 2023 09:04:45 -0400 Received: from m-r1.th.seeweb.it (m-r1.th.seeweb.it [5.144.164.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 724E6A4B14 for ; Tue, 14 Mar 2023 06:00:59 -0700 (PDT) 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 3CF2C202F6; Tue, 14 Mar 2023 13:59:52 +0100 (CET) Date: Tue, 14 Mar 2023 13:59:50 +0100 From: Marijn Suijten To: Konrad Dybcio Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Krishna Manikandan , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Rob Herring , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 03/10] drm/msm/dsi: Fix DSI index detection when version clash occurs Message-ID: <20230314125950.a2qsrrkxdf37ww7d@SoMainline.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> <20230307-topic-dsi_qcm-v3-3-8bd7e1add38a@linaro.org> <20230313235109.u7cpusjr6t2xyxmk@SoMainline.org> <1eea079d-c0e8-b941-60d2-e0656cbb73be@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1eea079d-c0e8-b941-60d2-e0656cbb73be@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 2023-03-14 12:59:40, Konrad Dybcio wrote: > > > On 14.03.2023 00:51, Marijn Suijten wrote: > > On 2023-03-07 14:01:41, Konrad Dybcio wrote: > >> Currently, we allow for MAX_DSI entries in io_start to facilitate for > >> MAX_DSI number of DSI hosts at different addresses. The configuration > >> is matched against the DSI CTRL hardware revision read back from the > >> component. We need a way to resolve situations where multiple SoCs > >> with different register maps may use the same version of DSI CTRL. In > >> preparation to do so, make msm_dsi_config a 2d array where each entry > >> represents a set of configurations adequate for a given SoC. > > > > Note that this code isn't fool-proof against different SoCs sharing the > > same DSI host address but for different indices (for example, the > > address at variant 0 DSI 0 could be the same as variant 1 DSI 1) and the > > matching logic would wrongly return ID 0 instead of 1 for SoC variant 1, > > because that's the first matching address it finds. > I don't think we've had that happen yet, but if it ever does, that's out > of scope of this patchset. Sure, as long as we're at least aware of this. > >> This is totally fine to do, as the only differentiating factors > >> between same-version-different-SoCs configurations are the number of > >> DSI hosts (1 or 2, at least as of today) and the set of base registers. > >> The regulator setup is the same, because the DSI hardware is the same, > >> regardless of the SoC it was implemented in. > >> > >> In addition to that, update the matching logic such that it will loop > >> over VARIANTS_MAX variants, making sure they are all taken into account. > > > > "in addition to that" makes it sound like you're doing a separate new > > thing in this patch, when the match logic must in fact be updated to > > make it compatible with the change described above (as in, it doesn't > > compile if you don't account for the extra depth in the array). > I really think you're nitpicking here.. It's not, this genuinely had me confused for a while. Could have at least been addressed as part of v4 that had to be sent regardless. - Marijn