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 3D43AC433FE for ; Wed, 5 Oct 2022 14:54:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230102AbiJEOx7 (ORCPT ); Wed, 5 Oct 2022 10:53:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229829AbiJEOxy (ORCPT ); Wed, 5 Oct 2022 10:53:54 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 440EA7C1D0 for ; Wed, 5 Oct 2022 07:53:53 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id x40so8338822ljq.9 for ; Wed, 05 Oct 2022 07:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=gRO3O8xi78oTZptPglDpaTcSvMIXolMC3hbGjTWLEkE=; b=rkd0hforclQhcWpTHlD5y8YCglbsV1/nuc3zv9uCelABf1vBJ1LqFZ4I+qy4C98y/D wYR5H7xXkWZjWIZFtIW0tlS0NDcrkm2c3kuUcNg0JXqBsjJ4CSDL8WijhX1lDrseh8i/ W9fWE4EsOuWnLondke0Ky8FJZCOoFu7LZCM7otnHxNRafjATWM8gGK4mqhPVuQoZnvgs mq2nbNDqwHfdSaakOwFlKOdhqNx0X+4JzmoAeBZjE7fb0oITN3Z+TPhnozzalJTjHvYF 7qKGHcFjEAWhz3zaO2h80PDy4pTX1QoXrQdUodADI4fo0/KCLiHAybrIX10rDpQERn52 GGGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=gRO3O8xi78oTZptPglDpaTcSvMIXolMC3hbGjTWLEkE=; b=lCVJZA24VIntx0fI6rMDM9vqJ2JgNhRgWgvh4J/ZSw3R87cj3h/wfvgY3EiL69UhA6 mjdH56L1KwqgMKOJa0qUBP8rR+Bs/9zW1PBdYpZ+DqRXUOC4c6nVeLKo2bMa14TkfleM C56DcznzYmrSNCz23GNlGuWxI5jMzLnq9flLsXQ41yxR0avjCYV/mjhxmqU9jTjfVKxj ubODMieIPoXpIOm5M0iIqwf8c5aZMlW4H/7UIUvLX7/neOjn1oprgiBgm+8AB3rJCB1M TrE8qvWxPBcZWp5Ec1zcuBykJDYsnmeP+hg2LVHwEKchYkOBdr431GFq7rFCXfO8ouLv TsAg== X-Gm-Message-State: ACrzQf3TfuTCOhk8GK92hyzcRMxrLkuxBmII1+jPCAchRiOoRY1M4YQT 8VuhWCLV1A7K1piRf+MKpf1UxnAcNiNPRQ== X-Google-Smtp-Source: AMsMyM60sctRdKk2qXd9pHiqWJZhc+vjTpzAps80DCC6YisbGJKbNLJWVROzlZaDH/ZO0THjDUZAjQ== X-Received: by 2002:a2e:9649:0:b0:26d:e740:ea5 with SMTP id z9-20020a2e9649000000b0026de7400ea5mr5117ljh.363.1664981631600; Wed, 05 Oct 2022 07:53:51 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id b24-20020a05651c033800b0026dce0a5ca9sm1333111ljp.70.2022.10.05.07.53.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Oct 2022 07:53:51 -0700 (PDT) Message-ID: Date: Wed, 5 Oct 2022 16:53:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v1 17/17] drm/mediatek: Add mt8195-dpi support to drm_drv Content-Language: en-US To: Guillaume Ranquet , Chun-Kuang Hu , 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 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 References: <20220919-v1-0-4844816c9808@baylibre.com> <20220919-v1-17-4844816c9808@baylibre.com> <49daae86-e922-9a17-ebed-2a33a5eeb18e@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/10/2022 11:34, Guillaume Ranquet wrote: > On Tue, 04 Oct 2022 17:05, Krzysztof Kozlowski > wrote: >> On 04/10/2022 13:55, Guillaume Ranquet wrote: >>>> 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] >> >> But you do not have specifics of mt8195. I wrote it in the beginning. >> >>> >>> I then need to add that compatible to the "list" here in mtk_drm_drv. >> >> No, you do not... I checked the driver and there is no single need... or >> convince me you need. >> >>> I don't see a way around this unless I rewrite the way mtk_drm_drv works? >> >> Why rewrite? You have all compatibles in place. >> >>> >>> Maybe if I declare a new compatible that is generic to all mediatek >>> dpi variants? >> >> You were asked to use fallback. Don't create some fake fallbacks. Use >> existing ones. >> >>> 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"; >> >> I don't know what's this but certainly looks odd. Some wild-card >> compatible in front (not fallback) and none are documented. >> >>> ... >>> } >>> >>> 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? >> >> Use fallback of compatible device. That's the common pattern. >> Everywhere, Mediatek as well. >> > > I'm unsure about what a "fallback of compatible device" is. > But from what I can gather, you'd have me write the dts as: > > dpi@xxx { > compatible = "mediatek,mt8195-dpi", "mediatek,mt2701-dpi"; > ... > } Sounds reasonable. Just someone should check whether devices are actually compatible, because driver is just a hint. > > so that the mtk_dpi driver will use the specific mt8195 dpi config and > the mtk_drm driver will fallback to mt2701 to find the compatible it needs. > > Would you like me to use this pattern for all the other compatibles declared > in the mtk_ddp_comp_ids array in separate patches? Could be for consistency, but it is up to you. Best regards, Krzysztof 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 86264C433F5 for ; Wed, 5 Oct 2022 14:54:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 61FC110E274; Wed, 5 Oct 2022 14:53:59 +0000 (UTC) Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id A599410E25C for ; Wed, 5 Oct 2022 14:53:53 +0000 (UTC) Received: by mail-lj1-x233.google.com with SMTP id p5so18975937ljc.13 for ; Wed, 05 Oct 2022 07:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=gRO3O8xi78oTZptPglDpaTcSvMIXolMC3hbGjTWLEkE=; b=rkd0hforclQhcWpTHlD5y8YCglbsV1/nuc3zv9uCelABf1vBJ1LqFZ4I+qy4C98y/D wYR5H7xXkWZjWIZFtIW0tlS0NDcrkm2c3kuUcNg0JXqBsjJ4CSDL8WijhX1lDrseh8i/ W9fWE4EsOuWnLondke0Ky8FJZCOoFu7LZCM7otnHxNRafjATWM8gGK4mqhPVuQoZnvgs mq2nbNDqwHfdSaakOwFlKOdhqNx0X+4JzmoAeBZjE7fb0oITN3Z+TPhnozzalJTjHvYF 7qKGHcFjEAWhz3zaO2h80PDy4pTX1QoXrQdUodADI4fo0/KCLiHAybrIX10rDpQERn52 GGGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=gRO3O8xi78oTZptPglDpaTcSvMIXolMC3hbGjTWLEkE=; b=I7iYizOfBFCru/02JmGOOr+Vu0hRNoqNRpVC85XbWdm/tbcQZvZ83upD+a40ZEt9e/ f5See9ETRYx3mLJkMrFowzZk7AM5maDJndrIKTGA9jKcr7fP8+2HGNpmOtma9N8X1O5h WvtxHduGMTx/gr7PRjpL0eAOZW32P2ReaMViN3VbRrkaSkrPTQCnAOtujr16gk5xbIxZ aREF8m6bhZu8F/p8vjWz3vYg460UNBkuGQRa1yxPJBe4FMP631uU9IfAjjD3XbEpBLv8 LiH1Fn9hId+NZsPTGcrTipcT1EJjD8zTHT6vT252w4yNUtLGuzmEi94h+PHyYaQvWC7l w4Aw== X-Gm-Message-State: ACrzQf1QLCi4baAo6kfpHhHgTsFDS5rHjcuBCqPlCZav5Zg76Rd5yTUo y5QqkD6Y/OZr80tRjn2PfoWISQ== X-Google-Smtp-Source: AMsMyM60sctRdKk2qXd9pHiqWJZhc+vjTpzAps80DCC6YisbGJKbNLJWVROzlZaDH/ZO0THjDUZAjQ== X-Received: by 2002:a2e:9649:0:b0:26d:e740:ea5 with SMTP id z9-20020a2e9649000000b0026de7400ea5mr5117ljh.363.1664981631600; Wed, 05 Oct 2022 07:53:51 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id b24-20020a05651c033800b0026dce0a5ca9sm1333111ljp.70.2022.10.05.07.53.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Oct 2022 07:53:51 -0700 (PDT) Message-ID: Date: Wed, 5 Oct 2022 16:53:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v1 17/17] drm/mediatek: Add mt8195-dpi support to drm_drv Content-Language: en-US To: Guillaume Ranquet , Chun-Kuang Hu , 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 References: <20220919-v1-0-4844816c9808@baylibre.com> <20220919-v1-17-4844816c9808@baylibre.com> <49daae86-e922-9a17-ebed-2a33a5eeb18e@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 05/10/2022 11:34, Guillaume Ranquet wrote: > On Tue, 04 Oct 2022 17:05, Krzysztof Kozlowski > wrote: >> On 04/10/2022 13:55, Guillaume Ranquet wrote: >>>> 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] >> >> But you do not have specifics of mt8195. I wrote it in the beginning. >> >>> >>> I then need to add that compatible to the "list" here in mtk_drm_drv. >> >> No, you do not... I checked the driver and there is no single need... or >> convince me you need. >> >>> I don't see a way around this unless I rewrite the way mtk_drm_drv works? >> >> Why rewrite? You have all compatibles in place. >> >>> >>> Maybe if I declare a new compatible that is generic to all mediatek >>> dpi variants? >> >> You were asked to use fallback. Don't create some fake fallbacks. Use >> existing ones. >> >>> 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"; >> >> I don't know what's this but certainly looks odd. Some wild-card >> compatible in front (not fallback) and none are documented. >> >>> ... >>> } >>> >>> 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? >> >> Use fallback of compatible device. That's the common pattern. >> Everywhere, Mediatek as well. >> > > I'm unsure about what a "fallback of compatible device" is. > But from what I can gather, you'd have me write the dts as: > > dpi@xxx { > compatible = "mediatek,mt8195-dpi", "mediatek,mt2701-dpi"; > ... > } Sounds reasonable. Just someone should check whether devices are actually compatible, because driver is just a hint. > > so that the mtk_dpi driver will use the specific mt8195 dpi config and > the mtk_drm driver will fallback to mt2701 to find the compatible it needs. > > Would you like me to use this pattern for all the other compatibles declared > in the mtk_ddp_comp_ids array in separate patches? Could be for consistency, but it is up to you. Best regards, Krzysztof 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 29D72C433F5 for ; Wed, 5 Oct 2022 14:53:57 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xuTRestvfCfSRwN+c3+7UZgZyGZoaoWKE8Ov+Y7xLzs=; b=XMA0wtrWYEdzxb 7fVaHYbY2DSXf2fCnK3xxx9v8N7UC12c6zeQcAd22iJZgVRL38PjkOgjxUSivGJnyKCjqomXfWt4B W4MUM1ztmmrVdbvuPJkS8as7ZqIgnThU9wSEUSt3r2mDSqHzGdzigER5gQzQfDRIFe+zwA+hYg+W1 Rd6bHgAsdVn8dgDwwmwFfOmxcZ7CmZDy0i5VbVNm1UrpBtgxZDtUInlw7FNW6n27Ic2GmHs7N0OE+ QYZq/+AB3Hl+oX4l2Ng44m9erQQM1g0FYhje51twBlHEC65U9R0s6iRLzFvy/v6h0d4VcDZP5hg2o yT251TUguF2QFnI/cqqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1og5mW-00EgZG-Ia; Wed, 05 Oct 2022 14:53:56 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1og5mT-00EgYC-TI for linux-phy@lists.infradead.org; Wed, 05 Oct 2022 14:53:55 +0000 Received: by mail-lj1-x233.google.com with SMTP id bs18so17406234ljb.1 for ; Wed, 05 Oct 2022 07:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=gRO3O8xi78oTZptPglDpaTcSvMIXolMC3hbGjTWLEkE=; b=rkd0hforclQhcWpTHlD5y8YCglbsV1/nuc3zv9uCelABf1vBJ1LqFZ4I+qy4C98y/D wYR5H7xXkWZjWIZFtIW0tlS0NDcrkm2c3kuUcNg0JXqBsjJ4CSDL8WijhX1lDrseh8i/ W9fWE4EsOuWnLondke0Ky8FJZCOoFu7LZCM7otnHxNRafjATWM8gGK4mqhPVuQoZnvgs mq2nbNDqwHfdSaakOwFlKOdhqNx0X+4JzmoAeBZjE7fb0oITN3Z+TPhnozzalJTjHvYF 7qKGHcFjEAWhz3zaO2h80PDy4pTX1QoXrQdUodADI4fo0/KCLiHAybrIX10rDpQERn52 GGGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=gRO3O8xi78oTZptPglDpaTcSvMIXolMC3hbGjTWLEkE=; b=iL8O5zRaz3j6eWtW+KNOdVKRR07CYnftFrSG5WthK4jgJqUvj+8WXZwERkQ05ocRSG hMM+7+Oojjtgw8TlUfC3mZAZ2+MNe6ZG5ADfiYyjHxA1BOmtr7UjnEfj2PvrO+zNK0cn bMt/Pf7ZtabgsQG7hcMt3K6Xao7Q9VMevhM7zAfpFrGYRbWhJVvjHjVKgChc4cG+Kz/N BTe0oLFnTTgAtFvczJ2O7ho+3qYKvJNS+GN174x1ehW5+qXrgtPW0BBOdESTeEPMjJfK h7BqZNWjEOCMtRjgjNCf3K/SlvgkP/rGqJMJKposMQG6mG6BwWtMSXNrfM4ZWuC/ZH+p cR3Q== X-Gm-Message-State: ACrzQf27cSS3p5sBp0HJ1Vvr1SFtHQjbjcs3cwrUOFdZnKhbJQwqD7ih IDO2XqmY+zuiWYDUpDGPskOplw== X-Google-Smtp-Source: AMsMyM60sctRdKk2qXd9pHiqWJZhc+vjTpzAps80DCC6YisbGJKbNLJWVROzlZaDH/ZO0THjDUZAjQ== X-Received: by 2002:a2e:9649:0:b0:26d:e740:ea5 with SMTP id z9-20020a2e9649000000b0026de7400ea5mr5117ljh.363.1664981631600; Wed, 05 Oct 2022 07:53:51 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id b24-20020a05651c033800b0026dce0a5ca9sm1333111ljp.70.2022.10.05.07.53.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Oct 2022 07:53:51 -0700 (PDT) Message-ID: Date: Wed, 5 Oct 2022 16:53:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v1 17/17] drm/mediatek: Add mt8195-dpi support to drm_drv Content-Language: en-US To: Guillaume Ranquet , Chun-Kuang Hu , 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 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 References: <20220919-v1-0-4844816c9808@baylibre.com> <20220919-v1-17-4844816c9808@baylibre.com> <49daae86-e922-9a17-ebed-2a33a5eeb18e@linaro.org> From: Krzysztof Kozlowski In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221005_075353_979463_FA9AF1E4 X-CRM114-Status: GOOD ( 23.90 ) 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 05/10/2022 11:34, Guillaume Ranquet wrote: > On Tue, 04 Oct 2022 17:05, Krzysztof Kozlowski > wrote: >> On 04/10/2022 13:55, Guillaume Ranquet wrote: >>>> 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] >> >> But you do not have specifics of mt8195. I wrote it in the beginning. >> >>> >>> I then need to add that compatible to the "list" here in mtk_drm_drv. >> >> No, you do not... I checked the driver and there is no single need... or >> convince me you need. >> >>> I don't see a way around this unless I rewrite the way mtk_drm_drv works? >> >> Why rewrite? You have all compatibles in place. >> >>> >>> Maybe if I declare a new compatible that is generic to all mediatek >>> dpi variants? >> >> You were asked to use fallback. Don't create some fake fallbacks. Use >> existing ones. >> >>> 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"; >> >> I don't know what's this but certainly looks odd. Some wild-card >> compatible in front (not fallback) and none are documented. >> >>> ... >>> } >>> >>> 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? >> >> Use fallback of compatible device. That's the common pattern. >> Everywhere, Mediatek as well. >> > > I'm unsure about what a "fallback of compatible device" is. > But from what I can gather, you'd have me write the dts as: > > dpi@xxx { > compatible = "mediatek,mt8195-dpi", "mediatek,mt2701-dpi"; > ... > } Sounds reasonable. Just someone should check whether devices are actually compatible, because driver is just a hint. > > so that the mtk_dpi driver will use the specific mt8195 dpi config and > the mtk_drm driver will fallback to mt2701 to find the compatible it needs. > > Would you like me to use this pattern for all the other compatibles declared > in the mtk_ddp_comp_ids array in separate patches? Could be for consistency, but it is up to you. Best regards, Krzysztof -- 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 43F93C433F5 for ; Wed, 5 Oct 2022 14:55:01 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BD0aJPLVBJG0AWqyoXICUFvyzhD2tT+LaJZ3oUoUTDs=; b=is+WVJCkT9F8/v fhdYqpPVWklEDmZwoPa4EkMVI7N6SJ6hTGztRNn3sUUnvPW26un+YECaCmGihvPw0p4Y5HcmGLF9u YTmMNRQAxvQh33tgjWSRWio45ykhPOQx+n4szOiflFqy4M1tPwhgGaR1DfiD67Svhofn1PgnCH+iF z5v6DDAdRkU5V7B476an/jrYf3Sq3pYxICSznmg1IUeRSaWHpr3dlkaYnCT7RCbgU2F2TeWhxp0Lb G/1GupamBFxYaXlVMLrJvaFs8/rJlBLEfnuUGLcBZoAbHmO3k5Rrh4vwPMvq1W3h2xlepK81Yrgft 3dvbmVXxzo+ZGWJVFw4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1og5mY-00EgZn-11; Wed, 05 Oct 2022 14:53:58 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1og5mU-00EgYD-Hz for linux-arm-kernel@lists.infradead.org; Wed, 05 Oct 2022 14:53:56 +0000 Received: by mail-lj1-x22e.google.com with SMTP id q17so18994963lji.11 for ; Wed, 05 Oct 2022 07:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=gRO3O8xi78oTZptPglDpaTcSvMIXolMC3hbGjTWLEkE=; b=rkd0hforclQhcWpTHlD5y8YCglbsV1/nuc3zv9uCelABf1vBJ1LqFZ4I+qy4C98y/D wYR5H7xXkWZjWIZFtIW0tlS0NDcrkm2c3kuUcNg0JXqBsjJ4CSDL8WijhX1lDrseh8i/ W9fWE4EsOuWnLondke0Ky8FJZCOoFu7LZCM7otnHxNRafjATWM8gGK4mqhPVuQoZnvgs mq2nbNDqwHfdSaakOwFlKOdhqNx0X+4JzmoAeBZjE7fb0oITN3Z+TPhnozzalJTjHvYF 7qKGHcFjEAWhz3zaO2h80PDy4pTX1QoXrQdUodADI4fo0/KCLiHAybrIX10rDpQERn52 GGGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=gRO3O8xi78oTZptPglDpaTcSvMIXolMC3hbGjTWLEkE=; b=InSxBK1e6nm8ICclNzVqYBld8SDBRTFu8bxDzMkr24SEt88EF7YJ+MuiZ5tq4FAFMN TUOk0VP+kJbpfLlfrXv78qkYhWY0W/cNMu16ly7WKnJyj+8ep57NruHs6f/iyPo67pZL vmYbSFS/oIx8znW82+sk+zkIgH2Ozqx6a4n8wthiQtyWuOtc8kIbwTnA1BoSVqabZBXt 7NF4sNOeLfKHMba5Ej2KhJoQ/DXb4lcKOfuqlScaywAXaCWRG+uwpiUxtSNDyqBPnmJd HSwFlGDzS3wa35cD3dF157xfOhG5acokICMiXKVuvTa3gr5m+SZrsSgUB0kt1N+zx1+y BlOQ== X-Gm-Message-State: ACrzQf3/FG4UnNlsVQ1Knwpv1ii5dL2gx4KIoV5BYOerg13A0Km2zrnj LhGyJpqiZGvhZmkyOFhZVW3R0g== X-Google-Smtp-Source: AMsMyM60sctRdKk2qXd9pHiqWJZhc+vjTpzAps80DCC6YisbGJKbNLJWVROzlZaDH/ZO0THjDUZAjQ== X-Received: by 2002:a2e:9649:0:b0:26d:e740:ea5 with SMTP id z9-20020a2e9649000000b0026de7400ea5mr5117ljh.363.1664981631600; Wed, 05 Oct 2022 07:53:51 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id b24-20020a05651c033800b0026dce0a5ca9sm1333111ljp.70.2022.10.05.07.53.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Oct 2022 07:53:51 -0700 (PDT) Message-ID: Date: Wed, 5 Oct 2022 16:53:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v1 17/17] drm/mediatek: Add mt8195-dpi support to drm_drv Content-Language: en-US To: Guillaume Ranquet , Chun-Kuang Hu , 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 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 References: <20220919-v1-0-4844816c9808@baylibre.com> <20220919-v1-17-4844816c9808@baylibre.com> <49daae86-e922-9a17-ebed-2a33a5eeb18e@linaro.org> From: Krzysztof Kozlowski In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221005_075354_601977_FA9557DE X-CRM114-Status: GOOD ( 25.60 ) 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 05/10/2022 11:34, Guillaume Ranquet wrote: > On Tue, 04 Oct 2022 17:05, Krzysztof Kozlowski > wrote: >> On 04/10/2022 13:55, Guillaume Ranquet wrote: >>>> 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] >> >> But you do not have specifics of mt8195. I wrote it in the beginning. >> >>> >>> I then need to add that compatible to the "list" here in mtk_drm_drv. >> >> No, you do not... I checked the driver and there is no single need... or >> convince me you need. >> >>> I don't see a way around this unless I rewrite the way mtk_drm_drv works? >> >> Why rewrite? You have all compatibles in place. >> >>> >>> Maybe if I declare a new compatible that is generic to all mediatek >>> dpi variants? >> >> You were asked to use fallback. Don't create some fake fallbacks. Use >> existing ones. >> >>> 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"; >> >> I don't know what's this but certainly looks odd. Some wild-card >> compatible in front (not fallback) and none are documented. >> >>> ... >>> } >>> >>> 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? >> >> Use fallback of compatible device. That's the common pattern. >> Everywhere, Mediatek as well. >> > > I'm unsure about what a "fallback of compatible device" is. > But from what I can gather, you'd have me write the dts as: > > dpi@xxx { > compatible = "mediatek,mt8195-dpi", "mediatek,mt2701-dpi"; > ... > } Sounds reasonable. Just someone should check whether devices are actually compatible, because driver is just a hint. > > so that the mtk_dpi driver will use the specific mt8195 dpi config and > the mtk_drm driver will fallback to mt2701 to find the compatible it needs. > > Would you like me to use this pattern for all the other compatibles declared > in the mtk_ddp_comp_ids array in separate patches? Could be for consistency, but it is up to you. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel