Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1279093pxa; Fri, 28 Aug 2020 08:26:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT44kgeKEsIDPjju4o02WC1nXFpe0WYJ+Rc7WCSi70nclbf/PA+PVA1lzRdpneMYnEsuW4 X-Received: by 2002:a17:906:140e:: with SMTP id p14mr2393084ejc.430.1598628395814; Fri, 28 Aug 2020 08:26:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598628395; cv=none; d=google.com; s=arc-20160816; b=bj762qusfRdHOw30xmjSWEu4/fFVAal+xlye5tH1IoVH7Yftj5powEnYaWAt2YsIzK mwX4y+WAC5jMkzv73RB3iEbhpo3ciArkwUDbJdr748xvhZ35hkh3r/916AMc4N4n0LR9 3RI7nr446QmbdjNztyseutLqaqUIopYDWTTysmWQ0PmHCCuCYHS2YeRhCEQTbRYKyljo cks6tdxGeN1ZBYw1xKT6jx3g4pp+FGgcpoAGUMo87wxYGc1xZdgE7z6rXWL3TLNewxVY wxESfhwYeiVRqAszsAu1DCcSUV7UDZYKjbCWZybcZoWXHE/FdR3i6DbnfzU4x3DaitFW GxcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=RqoAt0RuSE5IFRqbcpkPtQM/Iij1LwOiF/6zqK5n/V4=; b=wSiUIa1MpzE20b8W+BtAQKUNJe1Unk7v1VzzsEhGw5qqjgH5O31nF6EmZIdL/iidb9 2sGvdT4JCgPS9MQd1jQe/aumoy8k4qrxHxEaA4BdcKjxQePF6jJb5pTTYnkhEBgCXTqX w+W7FHyIiwb7lbYKuZp75uxbJ40HgqEQTOiCTz10FWwdc3ZXV77hNVswCxQxTcbdiJLH umwjRZcYPmPgRMTgcX+i9rlFNRXsUciwfBxjaJvUBY8AyqtGJ7OkpoRJbAa70685jWgD Pd0gdqCjW/xx9gg0gtBxcNbeT0F3IL57sEM2x6B/ODyrEVN+cryaDwipPo0sov09KptZ z5XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=grW6SQeM; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=CgyIiWZg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec15si843285ejb.416.2020.08.28.08.26.08; Fri, 28 Aug 2020 08:26:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=grW6SQeM; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=CgyIiWZg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727957AbgH1PZX (ORCPT + 99 others); Fri, 28 Aug 2020 11:25:23 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:51345 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726321AbgH1PZT (ORCPT ); Fri, 28 Aug 2020 11:25:19 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 8B4075805D7; Fri, 28 Aug 2020 11:25:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 28 Aug 2020 11:25:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=RqoAt0RuSE5IFRqbcpkPtQM/Iij 1LwOiF/6zqK5n/V4=; b=grW6SQeML44qSyhis9PDrPnAgY0BosM51+qqBluKJkg 4hJdkFWyY8ROrnQtrzlBaVX8vYaZ3PAsVWDZLAjinbVJYHaocwAsEzONs++z9qra pL9BO5UqwQ0qXyhKiyrIKSvzk/qNEVC6FDI5OEcpMfsMVaCgfz+tnnT+qRi6tXvy es475fouKEHevXZDmYVnM1vJLhiGXkti84i9IwpqsXjRJXJz2LtWoQBHT6Hq7jt7 z2uvy6mHrfDDbYZAHrMZ690YqoVUHO5cj+RNQAi5Rcvg10X5SSMWPKOPiUB/VFqO YnJJHYnnlpXeYugCN/xutDZgk2UtZcJBCUFJMx0Hhog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=RqoAt0 RuSE5IFRqbcpkPtQM/Iij1LwOiF/6zqK5n/V4=; b=CgyIiWZgzOuuXVB7crnSc8 DybFnI+rNTJtoh5O0IVfLV0q/R71u1bd3M/2W4QP65cWJ7YenWAOJvPR+RSwfFBO cw9lBctzKeK0FCBMH4OMZI7duwGwltoQKGxTrtB4fA28dfYY+RCppO2Brnh1yh7D OIkR7ymyF28V4G2uS6Gfa/B+TgaAqA23/PajBmCJXW4ZkeByRAox1hqr++Gghufi wWLRpHsJ6gw/3niZasAvy/JYVyzApt4n7toZ/aWL2g/8XElF4TYcfq04SbdHNYZY QYp9iW8LbpCUVmPF6y+cbNFTOlQQlBS+dX9pMNNqTfVPSRzVk2LynPiTlPoq8fBQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddvkedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddunecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepudefgffhkedvheelhfejjeffffefgffhgfeggeegudfgvdfhkeefgeejtdel fedtnecuffhomhgrihhnpeihrghmlhdrhihouhdphigrmhhlrdhmhienucfkphepledtrd ekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 1B50A3280059; Fri, 28 Aug 2020 11:25:13 -0400 (EDT) Date: Fri, 28 Aug 2020 17:25:10 +0200 From: Maxime Ripard To: Stefan Wahren Cc: Hoegeun Kwon , nsaenzjulienne@suse.de, eric@anholt.net, devicetree@vger.kernel.org, tim.gover@raspberrypi.com, kdasu.kdev@gmail.com, sboyd@kernel.org, mturquette@baylibre.com, dave.stevenson@raspberrypi.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, phil@raspberrypi.com, robh+dt@kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 3/3] drm/vc4: hdmi: Add pixel bvb clock control Message-ID: <20200828152510.jhhqvka6fmouozff@gilmour.lan> References: <20200821071045.24501-1-hoegeun.kwon@samsung.com> <20200821071045.24501-4-hoegeun.kwon@samsung.com> <61c199bf-852f-82d3-089a-a0a435343acf@i2se.com> <80749dcd-d4b2-68a1-f3ca-c19a120f6f7b@samsung.com> <84c423e8-25a6-8f23-cc80-7a17ce03fd1d@i2se.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ix4evhq5byu57ys6" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ix4evhq5byu57ys6 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Aug 28, 2020 at 02:45:49PM +0200, Stefan Wahren wrote: > Am 28.08.20 um 08:30 schrieb Hoegeun Kwon: > > On 8/27/20 6:49 PM, Stefan Wahren wrote: > >> Am 27.08.20 um 06:35 schrieb Hoegeun Kwon: > >>> Hi Stefan, > >>> > >>> Thank you for your review. > >>> > >>> > >>> On 8/26/20 7:04 PM, Stefan Wahren wrote: > >>>> Hi Hoeguen, > >>>> > >>>> Am 21.08.20 um 09:10 schrieb Hoegeun Kwon: > >>>>> There is a problem that the output does not work at a resolution > >>>>> exceeding FHD. To solve this, we need to adjust the bvb clock at a > >>>>> resolution exceeding FHD. > >>>> this patch introduces a mandatory clock, please update > >>>> brcm,bcm2835-hdmi.yaml first. > >>>> > >>>> Is this clock physically available on BCM283x or only on BCM2711? > >>> As far as I know, BCM2711 raspberry pi 4 supports 4k, > >>> > >>> don't supported on pi 3 and pi 3+. > >>> > >>> Since 4k is not supported in versions prior to Raspberry Pi 4, > >>> > >>> I don't think we need to modify the bvb clock. > >>> > >>> > >>> So I think it is better to update 'brcm,bcm2711-hdmi.yaml' > >>> > >>> instead of 'brcm,bcm2835-hdmi.yaml'. > >> You are correct please update only brcm,bcm2711-hdmi.yaml. > >> > >> My concern was that the function vc4_hdmi_encoder_pre_crtc_configure() > >> is called on a non-bcm2711 platform or on a Raspberry Pi 4 with an old= er > >> DTB. So making the BVB clock optional might be better? > > You are right, if use old dtb, we have a problem with the hdmi driver. > > > > So how about modifying it like this? > > > > @@ -1614,8 +1614,8 @@ static int vc5_hdmi_init_resources(struct vc4_hdm= i=20 > > *vc4_hdmi) > > > > =A0=A0=A0=A0=A0=A0=A0 vc4_hdmi->pixel_bvb_clock =3D devm_clk_get(dev, = "bvb"); > > =A0=A0=A0=A0=A0=A0=A0 if (IS_ERR(vc4_hdmi->pixel_bvb_clock)) { > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DRM_ERROR("Failed to get pi= xel bvb clock\n"); > > -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return PTR_ERR(vc4_hdmi->pi= xel_bvb_clock); > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DRM_WARN("Failed to get pix= el bvb clock\n"); > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 vc4_hdmi->pixel_bvb_clock = =3D NULL; > > =A0=A0=A0=A0=A0=A0=A0 } >=20 > i think the better solution would be devm_clk_get_optional(), which > return NULL in case the clock doesn't exist. It's not really optional though. BCM2711 will require it in order to run properly (as Hoegeun experienced), and the previous SoCs won't. If we use clk_get_optional and that the DT is missing the clock on the BCM2711, we will silently ignore it which doesn't sound great. Maxime --ix4evhq5byu57ys6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX0kh1gAKCRDj7w1vZxhR xazQAQCSvVaDf3qmDFvhw1r1oJ8a32YED7NWtNS1A3o11Be4HAEAkpKQVp8yK7ux G+EKAf+v6chTEQybgsmOJD6baC36/Qs= =1z+V -----END PGP SIGNATURE----- --ix4evhq5byu57ys6--