Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp302370lqt; Thu, 6 Jun 2024 04:17:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWsmHs3fpO+/Y+kUjPPhOF+iyYFGAgFUOOfvPU4uIpAkKHgFG+aCDOt/fuTrvatMzn+7UJwnl5nF5o9ABb+HfEWwOgMM5aVvPvNpUXjTA== X-Google-Smtp-Source: AGHT+IH7U/QtGcySjqduzROBG4GDwOkbjK85/29cL0ELBWbGHLbgUOFCG66Ph/MsTNeIIcQefu++ X-Received: by 2002:a05:6358:2609:b0:199:2b63:9f42 with SMTP id e5c5f4694b2df-19c6c68a2femr614922755d.10.1717672641496; Thu, 06 Jun 2024 04:17:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717672641; cv=pass; d=google.com; s=arc-20160816; b=HXPmfTMru8tJ6OA+tDnhhXhoFaboWd0ml6/BxeKWk/gt8E10xC+fq52uoXpJvwmwlk a3Dr7b9smbaPnze7FvH4ZbPEVuvQvqwmD31LQduoMQnqb0njMiVb7FX+cbwRUqLl6h5x nC06F9flN5zVtX7eExK+8Su7rtihGwnySBy5vNq3p5UtriYpPHafAmRRnhfHGUnoL1hB 5SdRbNVLQkrnsSpNia6I6rTldmQP2M8fRTgTu+nvjFFAgWHh0pwlGW5KEZbHC/sQUfFU UY+uCyyjRQCA1heoKzi7mwEEZ+YwCOa4J1jLsaIobioUq6TcigcijA9a63DbqZqmvDYS FSAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=RSZUHBAYaHL3BMvGmdMY1lDKdN8dvOSdJXvo60NyG/Y=; fh=l7mE4QUekHYqbjrpkUH9Y63VAg7LsV1hYEM+Wfkmykg=; b=N+sWOZfSCV6glIvSre0CXauWHPSRbY87LeHcixLY8o5SKHy0l1gkp8yr3weg/r2xhF NagVKw3ZlJFh9FS59xTVodtiNbstB+uv7u1QhBKyK/ZnU48TjQ8TFhGeg1Cftggrc3hb oRz88j/B1bxWs3voKyVBpc0+ZU/ACie1z56ITiG57EfrEDE96gZxJzlEBzUekRHQcZcS YZvDX9PiuC+6puOM6+ZJDHnJnbUwMRAqfjK7dcmi/HrY0zVICwaI6HzVGxvsadIAnZFC vsz7oXv7HXrY2sAlDjqj/6L5fo8cIas9Bx37QaAsmojkZFBk81FM/qpxVs34QKCN1Nsf YcGQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=4GoOi8sn; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-204164-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204164-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2a280d14si976082a12.795.2024.06.06.04.17.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 04:17:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204164-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=4GoOi8sn; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-204164-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204164-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 038EB283502 for ; Thu, 6 Jun 2024 11:17:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3B9D19539A; Thu, 6 Jun 2024 11:17:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="4GoOi8sn" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E057315216D; Thu, 6 Jun 2024 11:17:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717672633; cv=none; b=ZnEasmueEQmCHCNGLcDY88JlwGM6TNpYkIWhgJJlhfRe3fI0cNRte8/hVGspZzsHjUxHPecR8zDQE3fWIkQ/U5/15SZWD+a7v4b5vQR0coU23kkCu1Eyzaujd5Okh6GDAlJevkwQSQyAXvVNuztvmvqwi1roVOtDCI1XWKc0f88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717672633; c=relaxed/simple; bh=oeA5U1dOP1fkZuCJTDBmCrBPiCffZl7cApyojpOoeKA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=GYhlXSxPzfDZ0b5bAeoa82Ur8F6PqGkAFIbdhXNdhY+8W0GxYeAf1F75ktrUYjqH7yyEyABkV+FxQ2x7E6N8/IE/o8ozFhGEzmhUjPXapD+DPp0b+BAxfXkTN5Pdr3ybkt8yv9/8v+R8hkTtlwhPDO7apW1sMBWHNqDoHG/b9F4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=4GoOi8sn; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1717672630; bh=oeA5U1dOP1fkZuCJTDBmCrBPiCffZl7cApyojpOoeKA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=4GoOi8snV8Yb/VuOTJ5QixOhvORfiktqnLBtl0DCGL1cm6Wp6wRqRoSMQ8qbqllOV P8CMtQgmIQjkgkqX5g79flLvzr5rvaiSSyrnK8sswcfSDKg2wHxltGGHba6Wf4To5N AkmLmJlrZirdWzGE3I5UIXq9OUurbm8YgDqBhONEEH4S22RkSar96DF+EFuJOQWeXT lb5t2H/9zNQeAejsLTBSeIvF3jadA7vGo4JixiM8a4iEqVzQOpvW/ItuiBwqTr86nQ t3UlI0xoUF1xFbEI3AwLOy3X9/6BifNtjxQGSrMQkgqD+1JgBAeXyWY/jVycW2Omi3 CNxPgsrOi8vqQ== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 82FB7378061A; Thu, 6 Jun 2024 11:17:08 +0000 (UTC) Message-ID: <7f1b4a45-04cf-4b6d-878a-5bd0054a9ac0@collabora.com> Date: Thu, 6 Jun 2024 13:17:07 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 2/3] dt-bindings: arm: mediatek: mmsys: Add OF graph support for board path To: Chen-Yu Tsai Cc: =?UTF-8?B?Q0sgSHUgKOiDoeS/iuWFiSk=?= , "chunkuang.hu@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "devicetree@vger.kernel.org" , "tzimmermann@suse.de" , =?UTF-8?B?U2hhd24gU3VuZyAo5a6L5a2d6KyZKQ==?= , "mripard@kernel.org" , =?UTF-8?B?Sml0YW8gU2hpICjnn7PorrDmtpsp?= , "daniel@ffwll.ch" , "p.zabel@pengutronix.de" , "conor+dt@kernel.org" , "maarten.lankhorst@linux.intel.com" , "robh@kernel.org" , "dri-devel@lists.freedesktop.org" , "airlied@gmail.com" , "krzysztof.kozlowski+dt@linaro.org" , "kernel@collabora.com" , "matthias.bgg@gmail.com" , =?UTF-8?B?WXUtY2hhbmcgTGVlICjmnY7nprnnkosp?= , "linux-arm-kernel@lists.infradead.org" , "amergnat@baylibre.com" References: <20240521075717.50330-1-angelogioacchino.delregno@collabora.com> <20240521075717.50330-3-angelogioacchino.delregno@collabora.com> <0e0fe86c-92da-43f5-89d7-8084274a908a@collabora.com> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Il 06/06/24 08:46, Chen-Yu Tsai ha scritto: > On Wed, Jun 5, 2024 at 7:15 PM AngeloGioacchino Del Regno > wrote: >> >> Il 05/06/24 03:38, CK Hu (胡俊光) ha scritto: >>> Hi, Angelo: >>> >>> On Tue, 2024-05-21 at 09:57 +0200, AngeloGioacchino Del Regno wrote: >>>> Document OF graph on MMSYS/VDOSYS: this supports up to three DDP paths >>>> per HW instance (so potentially up to six displays for multi-vdo SoCs). >>>> >>>> The MMSYS or VDOSYS is always the first component in the DDP pipeline, >>>> so it only supports an output port with multiple endpoints - where each >>>> endpoint defines the starting point for one of the (currently three) >>>> possible hardware paths. >>>> >>>> Reviewed-by: Rob Herring (Arm) >>>> Reviewed-by: Alexandre Mergnat >>>> Tested-by: Alexandre Mergnat >>>> Signed-off-by: AngeloGioacchino Del Regno >>>> --- >>>> .../bindings/arm/mediatek/mediatek,mmsys.yaml | 28 +++++++++++++++++++ >>>> 1 file changed, 28 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml >>>> index b3c6888c1457..0ef67ca4122b 100644 >>>> --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml >>>> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml >>>> @@ -93,6 +93,34 @@ properties: >>>> '#reset-cells': >>>> const: 1 >>>> >>>> + port: >>>> + $ref: /schemas/graph.yaml#/properties/port >>>> + description: >>>> + Output port node. This port connects the MMSYS/VDOSYS output to >>>> + the first component of one display pipeline, for example one of >>>> + the available OVL or RDMA blocks. >>>> + Some MediaTek SoCs support multiple display outputs per MMSYS. >>> >>> This patch looks good to me. Just want to share another information for you. >>> Here is an example that mmsys/vdosys could point to the display interface node. >>> >>> vdosys0: syscon@1c01a000 { >>> mmsys-display-interface = <&dsi0>, <&dsi1>, <&dp_intf0>; >>> }; >>> >>> vdosys1: syscon@1c100000 { >>> mmsys-display-interface = <&dp_intf1>; >>> }; >>> >>> There is no conflict that mmsys/vdosys point to first component of one display pipeline or point to display interface. >>> Both could co-exist. >>> >> >> Hey CK, >> >> yes, this could be an alternative to the OF graphs, and I'm sure that it'd work, >> even though this kind of solution would still require partial hardcoding of the >> display paths up until mmsys-display-interface (so, up until DSI0, or DSI1, etc). > > I think you might be misunderstanding CK's proposal? He's simply saying that > instead of pointing to the start of the pipeline, point to the end instead. > You can still use the OF graph and work backwards from the output. > Oh, well, if I'm misunderstanding, sorry about that! Though, OF Graphs are describing a "sequence of stuff" (sorry for the suboptimal wording) and, well, the data goes from A to C with B in the middle, so the graph starts at A, goes to B, then goes to C. Starting from A, going to C, then backwards to B would be actually wrong, as that appears to describe that the pipeline goes A->C->B instead of A->B->C. >> The problem with a solution like this is that, well, even though it would work, >> even if we ignore the suboptimal partial hardcoding, OF graphs are something >> generic, while the mmsys-display-interface would be a MediaTek specific/custom >> property. >> >> In the end, reusing generic kernel apis/interfaces/etc is always preferred >> compared to custom solutions, especially in this case, in which the generic >> stuff is on-par (or actually, depending purely on personal opinions, superior). > > Here you are mixing hardware descriptions and kernel implementation details. > Not really. I'm saying that OF Graph would be preferred compared to a custom propety, when they both do the same. But again, I might have misunderstood what CK was trying to say, so just leave it. > I think this goes back to whether the mmsys/vdosys is actually part of the > graph or not. It certainly controls the muxes within the graph. But that > doesn't mean it has to be within the graph itself. It can just have pointers > to entry points of the graph (for which you would have a couple lines of > custom code [1]). If the data doesn't flow through the mmsys/vdosys, then ^^^ [1] is a link I think? You missed it! :-) > I would argue that it is not part of the graph. It's part of the graph, because it is setting up the pipeline - and it's doing that in hardware, by doing the muxing as you said. I could even go on arguing that the data does actually pass through that, but I don't want to start any big deal around that, so I won't. > > I would also argue that the data path should be fully described in the > device tree, not hardcoding paths based on board usage. Yes, that's what I also said (perhaps I should've been clearer) since the very beginning, and it's exactly what made me put effort in making this series, so we are totally agreeing on this point. Cheers, Angelo > The latter is > a policy / design decision, not a hardware capability. > > > ChenYu > >> As for the two to co-exist, I'm not sure that this is actually needed, as the >> OF graphs are already (at the end of the graph) pointing to the display interface. >> >> In any case, just as a reminder: if there will be any need to add any custom >> MediaTek specific properties later, it's ok and we can do that at any time. >> >> Cheers! >> Angelo >> >>> Regards, >>> CK >>> >>>> + properties: >>>> + endpoint@0: >>>> + $ref: /schemas/graph.yaml#/properties/endpoint >>>> + description: Output to the primary display pipeline >>>> + >>>> + endpoint@1: >>>> + $ref: /schemas/graph.yaml#/properties/endpoint >>>> + description: Output to the secondary display pipeline >>>> + >>>> + endpoint@2: >>>> + $ref: /schemas/graph.yaml#/properties/endpoint >>>> + description: Output to the tertiary display pipeline >>>> + >>>> + anyOf: >>>> + - required: >>>> + - endpoint@0 >>>> + - required: >>>> + - endpoint@1 >>>> + - required: >>>> + - endpoint@2 >>>> + >>>> required: >>>> - compatible >>>> - reg >> >>