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 C06C0C433FE for ; Tue, 4 Oct 2022 11:55:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbiJDLzX (ORCPT ); Tue, 4 Oct 2022 07:55:23 -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-Google-Smtp-Source: AMsMyM7T5HmFHtYzBToQIDw740pyxsyZD3CK3phoCdY5v6/uoVZEM5zyMYJH17SMmdaDtr3rE0uxWHutyCOz+oUYcFU= 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" 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/ 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80144C433FE for ; Tue, 4 Oct 2022 11:55:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF59D10E57E; Tue, 4 Oct 2022 11:55:14 +0000 (UTC) Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by gabe.freedesktop.org (Postfix) with ESMTPS id 01FD310E57E for ; Tue, 4 Oct 2022 11:55:11 +0000 (UTC) Received: by mail-lf1-x135.google.com with SMTP id g1so20745288lfu.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=ndO8ERNtXQeUOf9nS6bylG6lO3689zQE4NWzS6B4YMuuxOrUPDAQW35snnkZqa/nnY 2Y5QbmApE/j7x0WmxWamG9UBKyF/ejIUWwX8ldZMCXofs4fiVE0z4HA/KK/IQJA7OyFF kxfIHsJUhRteBAf4LHP7PEgrqh06dUShnLHLna5HvriGJWrr9fa6lbwxasVe3rmuATIt MpzlZe+CJpGFLN42Td4+m1oYLyF8oHYQMLvcf3Ez+tDpw96lxxwC8B6rBfDq831z6kFb Ml0XQylff94YosE/umw9ndeJZoOcg1VXAtpDM6+yNV9bOcqRP4cTE/6f9M5jCz4djKvc IjEA== X-Gm-Message-State: ACrzQf3VOLmZsiTC5a4L8MjooUuZu8eSuR+qJt147K02WKKJMy3tWnbl 2VcAWlIMuH6x8+EXgPwpO+SflLUJ0M3mf8wwQB48wg== X-Google-Smtp-Source: AMsMyM7T5HmFHtYzBToQIDw740pyxsyZD3CK3phoCdY5v6/uoVZEM5zyMYJH17SMmdaDtr3rE0uxWHutyCOz+oUYcFU= 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 Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Mattijs Korpershoek , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, Pablo Sun , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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/ 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1251AC433FE for ; Tue, 4 Oct 2022 11:55:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date: MIME-Version:In-Reply-To:References:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=qzSe3jtouRb8UIaMFhiDIdNkK8IT31vqausdhhxbAms=; b=VDA59VNGqIvSvH7rUTmlRWEOs1 gL3FMyq8sO8A3+wEPwrW1DK9gp+Ga8kgFjOHVs914RXfdzp1CRul8Jfpygs3rgBjPl7lI3t0TAMK9 gtW7AH0R+sDKrnKanqM145DgZrq1hqglLAjed0N7/NWiiZs/ZTKIwD2bMhMFtk31BbPS33AK0+RZ9 hcEzrOnmYgG9FlC3xjUsfCzQGGjEhaFkmcwVpgMFT13Afk1nPMGpJB/ocrzb8fy1AjRJOLDqVARTe BOPUTCFsDXSfZkX6NVpMzDA1K4FRoAHE5XWuyVETz0mkYZaNVyZlFMvdPVxt/ArGjsE/wBNQOvAmk STIfPKtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofgW6-009Yd8-Ht; Tue, 04 Oct 2022 11:55:18 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofgW2-009Yc7-Fo for linux-phy@lists.infradead.org; Tue, 04 Oct 2022 11:55:16 +0000 Received: by mail-lf1-x12a.google.com with SMTP id y5so1125157lfl.4 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=QRjQujsOiTLGjiZyd34pRf5PiMbZkVnlM/LQIEPKefvuuXuctWlso3R34yMaO5vGYk BmRR/ej+PGxJ4Xfo4xQOVtNx4JF3/ISD+K5KqiS5mbefsMLJVFhE6OJg2BpvlKT5GwSD zpaWhyfMkDi0ercKFe0NhYrsJwjVX7ek6hU0kCMhXUpn4ySzs5HTw9bIHKna5awbjjM/ AYrK01/yL0qMf81eIYVvK2B2POzlKuLETZvJzsEvxQr/bR6/ddHYiypb7yFzMW92KYCH nUgDCe2fEWOEU2G+2k9L3PlK3oBAObcmzYhaExLWMEs09PV0uls9E9mKBJIyOi/bCY81 APCw== X-Gm-Message-State: ACrzQf3wuhvgAhCp4zorhgL7+SyPzFRGL6G4NpOH8M2ZFqHOqDoQoxML 1dsdr0aomuLCURzGJspIG4lSHQgVmhrdtxruCDOFDA== X-Google-Smtp-Source: AMsMyM7T5HmFHtYzBToQIDw740pyxsyZD3CK3phoCdY5v6/uoVZEM5zyMYJH17SMmdaDtr3rE0uxWHutyCOz+oUYcFU= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221004_045514_534638_08A5A953 X-CRM114-Status: GOOD ( 19.72 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.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/ -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 243DEC433F5 for ; Tue, 4 Oct 2022 11:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date: MIME-Version:In-Reply-To:References:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Rf+GVFLaYE65tEdMsPpiBMEgSQMYh/H3raI/HbPiNJw=; b=h5jbiAppqbm43EGLpE0gmjyr0/ egJBSlgaV2zUuPVOidMyKCUf8r30NcWQGNNyzyQTub+PJTDl7NJKRXoi9ypNZ0oTRPtZOLzq3QI7r 9P0Y1xDVQw/CV8aIInNpKTi9BpqDI7sMD7B4jSOyV9QWw1TUFO/gloCtjgqUy2buGcrF/960DzMwY cdoImsjHzuFHYWa/h3ZkdlaKjrRVjjbNw4HX/xeNh/tBLun89UPQSzHj0DNpiwIYXL+iqvLx25gLJ hv7Gaor3vmnhZU1Eh/H8J2fzldoVLmanxoBZ299C3Mu/OVAUsug4osk+9Tn4YqWMn58M4ljdvzocF 9RJwlApQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofgW9-009YeH-Lw; Tue, 04 Oct 2022 11:55:21 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofgW6-009Yct-LE for linux-arm-kernel@lists.infradead.org; Tue, 04 Oct 2022 11:55:20 +0000 Received: by mail-lf1-x135.google.com with SMTP id b2so9828606lfp.6 for ; Tue, 04 Oct 2022 04:55:16 -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=Q1mjfzdom3M/8ZB0rnxZNO+x8MDUa0g8Kk0sMIBb1In7wXQh3fVFiBmNtvQaZVU/A+ 3U2pubAZ97ntkUqY/LQXoU7fqiQuBVhOEZe35ZVCDYdQtDLkEo3UBSY73Qohd+aMBZAl dm6ART6g8/zTGTJJxUYaUtUDxOIlTKaGjNKiOKPt6HmLV183LdhKfFgchYivN+CN/nKO /nijrpNwKApZ5SzQPrP31WlPkgFdKTHGEIAB1e/ru0tgzk1Sdd5GXaBhBSISfK40wQCM oM/hzL8rWIT40Gz1VpH+JvkLMlWP/6WLmugg2pmkZ3EhnuZ4cxg7Lyl/FCgDO9of2KCb Htlw== X-Gm-Message-State: ACrzQf1JNxE/hHSu/STTc6ifZo4OcHJlScZzyb7s3Xd8r85Tr1qgVuJx Jkqq0VFZlZ+xiDrUkH4Z+rcbFQrzfcCwxTYyh5nmnQ== X-Google-Smtp-Source: AMsMyM7T5HmFHtYzBToQIDw740pyxsyZD3CK3phoCdY5v6/uoVZEM5zyMYJH17SMmdaDtr3rE0uxWHutyCOz+oUYcFU= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221004_045518_703479_A87DB85F X-CRM114-Status: GOOD ( 21.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel