Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp359599rwb; Tue, 4 Oct 2022 05:13:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7+sx+VjAabReWpCgTGzdjxfycnKTNyHUDa2PpbuC0zW3kmKFaFPKDMkHridSyKidBs2au/ X-Received: by 2002:a05:6402:1cc3:b0:458:211d:cbe5 with SMTP id ds3-20020a0564021cc300b00458211dcbe5mr24245790edb.221.1664885595679; Tue, 04 Oct 2022 05:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664885595; cv=none; d=google.com; s=arc-20160816; b=0hhQNmx7mOi522HZZz7qfHKKn7MRjq55SluySKcG4WqlixcbzBFIaqVgl4DRa1H47D yEQL0uh8/Cua777QPGlKfwJw4a39eGcaxH+G6giuQgox7AihfFFF/K0afPZ0laBTHxhr hE5rIqA/OEiHe9wxIxUreBAFjZOmRnUGT4v41rJ7dpdKVINEWbcrd8ntqwYm6/ZEC6Cc DyyWTgfYWH3I742aRY3OePnRq8xcrdCC0Uw8LRL0jiNlheqxctO00ELqeS+31LLFLGj9 2vv5Of8h02W6xIxcY8NlKxYEjjdRxGG8gzEFgYGd3LEObSSL1vzy462OG8OWMQkbnwDk gBvA== 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:mime-version :in-reply-to:references:user-agent:from:dkim-signature; bh=AVHgfeK+0yXNwYMJqLB3RuEuq3zMmGUnN/V4RFLasQ8=; b=LOR62RIVjcIKk5QwzjCpsFSpSHWK3aleVW3sPY3GwyY/tncqknuauN657cfZfnBIe8 JWKkR0o2IWyOVU7/Xtr8xO+z6p4m03rBrV4FWSQlBI+hmvIpFuC9ECR3umfWJ4KkEz+w R+srE3uDLfxstVPAUkMNHfW0+nYuG+mrE/lIqoIfN8uZWQh91cLcriBEWOi9NriKRHvy ex+IbYOgOqANFffdGVYq9yo4BAgABeB6WdBCvBpxRdTrhZ+Zm8gfmzZk5fSDcSimOuJ2 Z7JuPwU8KygpAZN0OEQKO+hMtC5yJiPkkaWgREQIzzfwCOYaVr4z702zwFsYJ5IJOKft vxqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=HCraqwA4; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e13-20020a056402148d00b00458a22ec887si8220577edv.276.2022.10.04.05.12.23; Tue, 04 Oct 2022 05:13:15 -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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=HCraqwA4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229744AbiJDLzW (ORCPT + 99 others); Tue, 4 Oct 2022 07:55:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbiJDLzO (ORCPT ); Tue, 4 Oct 2022 07:55:14 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1467D11C0B for ; Tue, 4 Oct 2022 04:55:12 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id g1so20745289lfu.12 for ; Tue, 04 Oct 2022 04:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:in-reply-to:references :user-agent:from:from:to:cc:subject:date; bh=AVHgfeK+0yXNwYMJqLB3RuEuq3zMmGUnN/V4RFLasQ8=; b=HCraqwA4dmNVerhXpmAuHLH4r2VSVcfXCEXH9CybnppQCmsY4LWHa0k0aB34ps+YJh D0FCBE7aw2MjUV0uur4XGgPoQ+QSzmM9HHhfdqDSG1s+xvs4O3W5qunm3BtDzZJSuY0u atHJpYrSENjx/q+LeBwFD/q3EUd4D6MtToFTnDGC56yykmwQKeCUxnfhgeJSRsusknmk 5QTgbwRmJsAEpECIgtW2tn0jLsRksRyDmpr40kHA82vkMhu4WLJVFFVVO3Ek9nYL7w0v jv4ujvhJiLhHm6GueGGupHX7HtNZhEaqeHSwTAdwcPOlX/QIGWXNIJtMftYwAj5M+A49 V8VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:in-reply-to:references :user-agent:from:x-gm-message-state:from:to:cc:subject:date; bh=AVHgfeK+0yXNwYMJqLB3RuEuq3zMmGUnN/V4RFLasQ8=; b=R0ho3U3NvByDWvP7sP/IR0svnshqHPgHyszL1TWF+FjHiREylNd2wFCkCCA4p8cCDw tWCzzOpNUhi8mV8VF402YvaODR0PblTUm9gkdaD/rTi0RUjvNN32bKo9cPBu/MKjOios /6hh2fq0FtGEDBjg2H5YbqPsH0t34rGsEOrRdr4Y+GhDtCsaH3pmwAroc5P6/TSz3SZL igTJMu3PWssVbFGXv6muyLrO95qao4AnwFHqDdvvBjPmTPOu5ZV4hwgtXCrfOX79z48I AeRGbb/dt2JB1dPrRn7OZlMxOUroL7ZLsipmXbxq0ktM01HAvI+y2DtLheXe3TicF/r0 iz8g== X-Gm-Message-State: ACrzQf0kwshMc6yYCamDu1M+FczBvnPH/6L1JNEWR27xkJLQmEWLTllG 5gmVKG1aBYI31MfDXyXhWuKA78QZv4Rsryo6URfHbg== X-Received: by 2002:ac2:44b6:0:b0:4a2:5084:6163 with SMTP id c22-20020ac244b6000000b004a250846163mr1242968lfm.446.1664884510269; Tue, 04 Oct 2022 04:55:10 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 4 Oct 2022 04:55:07 -0700 From: Guillaume Ranquet User-Agent: meli 0.7.2 References: <20220919-v1-0-4844816c9808@baylibre.com> <20220919-v1-17-4844816c9808@baylibre.com> In-Reply-To: MIME-Version: 1.0 Date: Tue, 4 Oct 2022 04:55:07 -0700 Message-ID: Subject: Re: [PATCH v1 17/17] drm/mediatek: Add mt8195-dpi support to drm_drv To: Krzysztof Kozlowski , Michael Turquette , Kishon Vijay Abraham I , Matthias Brugger , Vinod Koul , Stephen Boyd , David Airlie , Rob Herring , Philipp Zabel , Krzysztof Kozlowski , Daniel Vetter , Chunfeng Yun , CK Hu , Jitao shi , Chun-Kuang Hu Cc: linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, Pablo Sun , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Mattijs Korpershoek , linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Tue, 04 Oct 2022 12:49, Krzysztof Kozlowski wrote: >On 03/10/2022 17:29, Guillaume Ranquet wrote: >> On Tue, 27 Sep 2022 16:28, Krzysztof Kozlowski >> wrote: >>> On 27/09/2022 15:04, Guillaume Ranquet wrote: >>>> On Thu, 22 Sep 2022 09:20, Krzysztof Kozlowski >>>> wrote: >>>>> On 19/09/2022 18:56, Guillaume Ranquet wrote: >>>>>> Add dpi support to enable the HDMI path. >>>>>> >>>>>> Signed-off-by: Guillaume Ranquet >>>>>> >>>>>> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c >>>>>> index 72049a530ae1..27f029ca760b 100644 >>>>>> --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c >>>>>> +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c >>>>>> @@ -820,6 +820,8 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = { >>>>>> .data = (void *)MTK_DPI }, >>>>>> { .compatible = "mediatek,mt8192-dpi", >>>>>> .data = (void *)MTK_DPI }, >>>>>> + { .compatible = "mediatek,mt8195-dpi", >>>>>> + .data = (void *)MTK_DPI }, >>>>> >>>>> It's compatible with the others. You don't need more compatibles. >>>> >>>> Hi Krzysztof, >>>> >>>> It's a bit confusing, because this compatible is used in both >>>> mtk_drm_drv.c and in mtk_dpi.c >>>> >>>> Albeit it's entirely the same thing regarding the mtk_drm_drv module, >>>> it's pretty different >>>> regarding the mtk_dpi module. >>> >>> Sure, but this does not explain why do you need these entries here in >>> mtk_drm_drv. >>> >>> Best regards, >>> Krzysztof >>> >> >> Hi Krzysztof, >> >> Sorry for the late answer. >> The mtk_drm_drv is the component master of the full mediatek drm stack. >> >> it "binds" all of the crtc/dpi/ovl/mutex/merge... components of the stack. >> >> That mtk_ddp_comp_dt_ids array is iterated over to find all of the components >> from the device tree. > >No. You said what the code is doing. I think I understand this. You >still do not need more compatibles. Your sentence did not clarify it >because it did not answer at all to question "why". Why do you need it? > >Sorry, the change looks not correct. > >Best regards, >Krzysztof > I need a new compatible to adress the specifics of mt8195 in the mtk_dpi driver, the change is in this series with: [PATCH v1 16/17] drm/mediatek: dpi: Add mt8195 hdmi to DPI driver [1] I then need to add that compatible to the "list" here in mtk_drm_drv. I don't see a way around this unless I rewrite the way mtk_drm_drv works? Maybe if I declare a new compatible that is generic to all mediatek dpi variants? and have all the dts specify the node with both the generic dpi and the specific compatible? dpi@xxx { compatible = "mediatek,dpi", "mediatek,mt8195-dpi"; ... } Then I can "collapse" all the dpi related nodes in mtk_drm_drv under "mediatek,dpi" ? I guess would have to do the change for all other components that are needed in mtk_drm_drv (mmsys, aal, ccor, color, dither, dsc, gamma, mutex...). That's the only trivial way I can think of implementing this with the current status of the mtk_drm stack. Do you have any other ideas in mind? Thx, Guillaume. [1] : https://lore.kernel.org/all/20220919-v1-16-4844816c9808@baylibre.com/