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 CBFAEC43219 for ; Wed, 5 Oct 2022 14:53:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230030AbiJEOx4 (ORCPT ); Wed, 5 Oct 2022 10:53:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbiJEOxz (ORCPT ); Wed, 5 Oct 2022 10:53:55 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 467E27CAA2 for ; Wed, 5 Oct 2022 07:53:53 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id q17so18994959lji.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=swUYhsq4Bj68ZFtfXIYNo+8WzGu4rxI8NH9axG8SLCuQeiCEHXNLqBNRsmPfbDcE+r mGtQaHnzsyH3ahOGnNdl/2LRwbcE60VfCxk4OkubPxWOyUzY/+T8uwjsE4w6VA1b9lfh CuM7vmkpekXk4i/wVBBP+fDmz+Q261UEKLEEZZxIdfy9KkMHPmBOwVjgovAFLw68hpe/ ygqU/YOYLzPoW/YTr7/3ecb8mZoTp42TpLL8GfC3oLVJ7tIx4GJ/qWR/xfBBPz+H0gQj GprLlBh8+pr+sbSYvzU8P82R4SBEE2mVPhuHq9VwHIUErFqJorp9REBvAuzj/bMp8/8e z1sg== X-Gm-Message-State: ACrzQf05h3UWNVnaISuWSBk0JSPbLlylatJ7/5lTLSaxsKXU933FRxWk WLXRVmfRrlgks8fbPWVrYw7xOA== 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: devicetree@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