Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp805918lqj; Mon, 3 Jun 2024 00:51:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUy6WuFqQbxuG2VUmzJhF8ExI0OmLBp5ZEdsT9maRKh7BCtAifThDrD2+sDzdclYkmKQRjsVbRR3GvX0JXxXI0l4pT4dyaJwWPc04o5zA== X-Google-Smtp-Source: AGHT+IHZfadtKbcgQOiw86mew1et2YRV1y3GZ/gzpUmf2YB/S8VomTsviAcqH8TSn+77jj9sxgTK X-Received: by 2002:a05:6a20:1595:b0:1b2:4d49:4300 with SMTP id adf61e73a8af0-1b26f185713mr8754588637.33.1717401069674; Mon, 03 Jun 2024 00:51:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717401069; cv=pass; d=google.com; s=arc-20160816; b=rarYO48id47uzKeRJgo4/5BUIdYc1G0omOef0PkFW7Q8Zkkj8u/M7MgQ4szPWyGKVf /IBp3TGKI1RkQM+dSPdqCZWl3pNZjaA5fG6xX6I2YIbgdssdpnPib4d79bN3B7FO1WgZ JeZyOj60+TqR6+LLrGcEdtEhRhqfQgLCmLPtDTVE6Td945ptxvh60x9aqb86DOrXh0ZZ vh8uD4LccfIFHpr5UMTLRYHOASKJ3GsNa0UfM7VY4M35ySUO7aSvAA3LApxC0/hQbSke iKgJ6prKP8BUwL+wwcben9LtC/47dH9rbQA1idwS3nNnH3gOiPfG36FQxM6xJT+NXp1/ oTFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to :references:cc:subject:to:from:message-id:date:dkim-signature; bh=l/sXJWAR9U+t8PuJjd67PbuHh01c02nSqxd7Y8bCUpM=; fh=qF4fPDXE8GqrkPtPpgVG0p9L7TOQMjdbU/+Avnd+ZEk=; b=IaP2BcGmoKAfN1tFygDvRxx+cwbF/CPDoydp1W7puOfUc5rmgRIasGB6rkL6lYiUC3 mU50nvL32YdBzeeQnzu88+xugFLpuzFwYgubpVSdw4RzYePyfaRgGszSTQXVisqfvP8u gGzxK4XuBNCfYRY9unC0CSwQN4/gTJe6flDvDoTZklpQ1yklnopwar/mnBNfhjck0X+N nexvIEN6bij8GBZzB6IINjIFTJfaXSoT6aoO6TR05SXDUl0sTLBrYU2ka7zLpQun17Zp u+MjjoqJMZ1YH0nIhmgdVLrInOHWn2rmtAAfpQgXOj2vB0fQ4HjaKDI2frtuP8Ykv639 s5lA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=mKfgfIw0; arc=pass (i=1 spf=pass spfdomain=walle.cc dkim=pass dkdomain=walle.cc dmarc=pass fromdomain=walle.cc); spf=pass (google.com: domain of linux-kernel+bounces-198735-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35b40c932si6195876a12.582.2024.06.03.00.51.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 00:51:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198735-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=mKfgfIw0; arc=pass (i=1 spf=pass spfdomain=walle.cc dkim=pass dkdomain=walle.cc dmarc=pass fromdomain=walle.cc); spf=pass (google.com: domain of linux-kernel+bounces-198735-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7AB49B2192D for ; Mon, 3 Jun 2024 07:49:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C3004CB23; Mon, 3 Jun 2024 07:49:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=walle.cc header.i=@walle.cc header.b="mKfgfIw0" Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) (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 B6A2915E88; Mon, 3 Jun 2024 07:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.201.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717400952; cv=none; b=LTtS4GjSGh5VnqFUwvRGxzrBAP/IWut8LfcX0DkWBK2ckK15if5wuM+YYQdaum3vhbomePnAty7ami4CZK4deq3lD4mGbrqOUjd7vzaPDjzWIRE96XQOKB6M6QS1uZlvXdh5AeSxWDFKOHHowywqISA3GLE8Li2hmElIoqRLD/A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717400952; c=relaxed/simple; bh=l/sXJWAR9U+t8PuJjd67PbuHh01c02nSqxd7Y8bCUpM=; h=Content-Type:Date:Message-Id:From:To:Subject:Cc:References: In-Reply-To; b=iYTWTcFKXHUxV+BzKoQghOkZIizoJ47xmR+UZRomZh9TOB4JpXf1sBZ4ViUFQuG+g3WVfeG3dPodkEFa2RgENvgqX5QF60jfroPs/B3K0HEVSDwyDuHtb4+yQYo/DKp9AJGuBjGR2znTEGbon130N4XC6CAmFdHVOefthSF0UeI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=walle.cc; spf=pass smtp.mailfrom=walle.cc; dkim=pass (2048-bit key) header.d=walle.cc header.i=@walle.cc header.b=mKfgfIw0; arc=none smtp.client-ip=159.69.201.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=walle.cc Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=walle.cc Received: from localhost (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 30CEA136A; Mon, 3 Jun 2024 09:42:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1717400554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=l/sXJWAR9U+t8PuJjd67PbuHh01c02nSqxd7Y8bCUpM=; b=mKfgfIw0rVXzUB2hP0B2WxtTyKBz9VHQ5GW0H/acJGDGO7XYNyllK5U2aU0laMQOncMNxb 63+o3L3cwsC9BhAZl30ZY1W9aOEIKA0BadMQEvJfy28XQnJ6+Ag1UrmyyEpsPO+vKug+un VIOmTj0ewguhvmUIc59KofVhqUsJ34y4Vz9XPQBBUgMTDGUnRQXFk6+nrb3CaP/4hXmPHs bCgss0RdUhLImzMiLhXc+o9Y5G8Q2Shz99/HZYYA3JDlD/Bysg/DzDX2nPvCthzELAPQCH N2RKaKynB4Z4wd5LO7zIxX5MplhmoRaMzAQ9NZNTakTdQUCwqGCiLUgX0z004g== Content-Type: multipart/signed; boundary=3ed5ea633b485a24b502befa1bea475237ec606cb99637397be66d7a74b8; micalg=pgp-sha384; protocol="application/pgp-signature" Date: Mon, 03 Jun 2024 09:42:31 +0200 Message-Id: From: "Michael Walle" To: "AngeloGioacchino Del Regno" , Subject: Re: [PATCH v4 3/3] drm/mediatek: Implement OF graphs support for display paths Cc: , , , , , , , , , , , , , , , , , , , , X-Mailer: aerc 0.16.0 References: <20240516081104.83458-1-angelogioacchino.delregno@collabora.com> <20240516081104.83458-4-angelogioacchino.delregno@collabora.com> <84cd0ac7-99d9-42cb-af79-a0fba09c1ebb@collabora.com> In-Reply-To: <84cd0ac7-99d9-42cb-af79-a0fba09c1ebb@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: --3ed5ea633b485a24b502befa1bea475237ec606cb99637397be66d7a74b8 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hi Angelo, > >> Implement OF graphs support to the mediatek-drm drivers, allowing to > >> stop hardcoding the paths, and preventing this driver to get a huge > >> amount of arrays for each board and SoC combination, also paving the > >> way to share the same mtk_mmsys_driver_data between multiple SoCs, > >> making it more straightforward to add support for new chips. > >=20 > > paths might be optional, see comment in mtk_drm_kms_init(). But with > > this patch, you'll get an -EINVAL with a disabled path. See my > > proposals how to fix that below. > > I might not be understanding the reason behind allowing that but, per my = logic, if > a board does have a path, then it's written in devicetree and enabled - o= therwise, > it should not be there at all, in principle. > > > Can you explain a bit more extensively the reason(s) why we need to accou= nt > for disabled paths? Paths should be (and this was already supported before this patch with the hardcoded paths) disabled with the status property. This way you can have a common board configuration where all the paths are already described but are disabled. An overlay (or maybe another dts variant) can then just enable the pipeline/output port by overwriting the status property. Also, this is the usual DT usage, as a node with status =3D "disabled" should just be skipped. Without handling this, the current code will return -EINVAL during probe (IIRC, my vacation might have reset my memory :o). -michael --3ed5ea633b485a24b502befa1bea475237ec606cb99637397be66d7a74b8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iKcEABMJAC8WIQTIVZIcOo5wfU/AngkSJzzuPgIf+AUCZl1z6BEcbWljaGFlbEB3 YWxsZS5jYwAKCRASJzzuPgIf+EuiAYCiS0ktYeqW3WREzRyRaWz/fZqG9E+chTLp Eq2F71PR2kPsrQjcJqjw9P8PJP1Tb7IBf1Xo00KNX/YZCxZd7B2+oCO6cjri7/ym ZBbCHMlAM8XqJvXrDFXC1OxZkA8QuPDVng== =F2kN -----END PGP SIGNATURE----- --3ed5ea633b485a24b502befa1bea475237ec606cb99637397be66d7a74b8--