Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1615419pxk; Tue, 1 Sep 2020 03:22:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZbb0+GrMkp8OoVMLj12Yitn4QRn21uNAT16zRfOD4tjL1ZNjmN+JYDgoZ5ooFfvdjWQGl X-Received: by 2002:a17:906:40c9:: with SMTP id a9mr824764ejk.3.1598955752559; Tue, 01 Sep 2020 03:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598955752; cv=none; d=google.com; s=arc-20160816; b=ko+TCXCj4Wrj2VYvUaEPg5odY3OAZDWfbuH5auToRcbn27SgobrwS3ftEYdf+YVs32 8PpdFM+TudPzHiD4PvIPoLGWjehO+h81zlYg6SpEXgY6dqlBUimZubMWQWJ3Bfowm+ud UzMOI/rekpTCCjM+vqUYeEvyAmuSgjFm8WIMvZrK7YoaQIU+HMj6IM0CCnUOHrud7Bc3 qTTVUqkf0lX0lgltpeqOTAxAgcD7kDG2QO40Magp+z9eS6Y+Twd7AZG85Z+lOMix59Ns AwECHY7mNuC21cTS58HBxIRheUDPE87XBjvfvxLWKiNdS/JYKAMrtSJQJuDhvlw3kIoD mCFw== 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=sUIriuDdEGEGb3qXjf0yLWBxBK6VbKbmpwiiPPnocWI=; b=sUGc3tGkQwhP3SG/Tf3OBVXYpvN/jYy05gDvrqccVfJ1WQFAlfDRkJbu+h5DF/jlTH VofuBWzJns1En4ojBPyalnqz459KxG/QRWfkh6HM6Mq/9BBUJQGLIlJxUv4tZbBhAWOC yaBdhFdp6Txf8BfVFWUb3tNuXhvgdfVKcGjJdB2LboddaAD31JzhIa+/6LN+ULqzs//N K8eMrXMXKcujNpZo0NrMZLfFOC+gyxQicjKEy7diU2bhsI6yrfYyPTG1qXY4jsgiC0Zy rdr0+aUyfGd32ZD1KjUDRcfSY5/xY51QTkdQ3gZWbR/CmnRj9/6lwj5qqUrWy5v3YcSk t1rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=j3o+sUFn; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=CN2MS3ME; 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 v3si323460edt.45.2020.09.01.03.22.09; Tue, 01 Sep 2020 03:22:32 -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=j3o+sUFn; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=CN2MS3ME; 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 S1726139AbgIAKTa (ORCPT + 99 others); Tue, 1 Sep 2020 06:19:30 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:56323 "EHLO wout5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgIAKT1 (ORCPT ); Tue, 1 Sep 2020 06:19:27 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1952CEB1; Tue, 1 Sep 2020 06:19:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 01 Sep 2020 06:19:26 -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=sUIriuDdEGEGb3qXjf0yLWBxBK6 VbKbmpwiiPPnocWI=; b=j3o+sUFnvkQTt37CkFXstCodCLKl0o84yDR4q71zpEk GXvHq6HEjdGACV1BaMQmMLrub7y+cEsgbPxYooUeCDhIuU/pF5kefFvZ0Bi82W+9 NFQOYfWg0C47cDsSQ2FyEPI0M9dI8qPT08UBY2brHey9eRJc8wAN5KGQD1L0+r5G 3ZI7+LVYKUdOeeVADs+t0DNCgY76KF3Q14ASbOqIcVJECLHt3jJHWTOjBfctccjE JWDAQcHIc5E/Wux+AXA9jgAzz0xRm5/645i1wCWTmLHc5rfHntHfbWGVS6BSns0O 6ToqZobbm5lDhn4bpLPZUN8I5YuNIiIyRi1Kd865B/Q== 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=sUIriu DdEGEGb3qXjf0yLWBxBK6VbKbmpwiiPPnocWI=; b=CN2MS3MEeKsFQO6hQP1aG+ kva8V4WhTtX3OEXc4vmGjDW+hZFMH38jVlksnyhhRztB4FTsYI5d9Ol4vzIWETNE CEPcgBYtI0N9PMUYfkw8etJuaQdBFnQnFR5EZb1EaOpF53lDZS+VyBGylRYNh3gf ieopMJUjb6RG+nLvoDxgGobtf8jtB5QrMHtgnqjP92abqFXTeBw20rkR0ZDq9e3+ 82NZOw2XpdIGGUtPfFhHIhP0QPioUaCKuHCIIWI6GyepjSlgFlNR/HJNwkX68jSR QlrCcp2Qg+DCAepmEu6MDUEKQdQZcSAA5E1gHJtlEmqu0sHMJmPSW86DIYeD42GQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudefjedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh 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 AC989328005E; Tue, 1 Sep 2020 06:19:24 -0400 (EDT) Date: Tue, 1 Sep 2020 12:19:23 +0200 From: Maxime Ripard To: Dave Stevenson Cc: Nicolas Saenz Julienne , Eric Anholt , DRI Development , linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, LKML , Tim Gover , Phil Elwell Subject: Re: [PATCH v4 77/78] drm/vc4: drv: Support BCM2711 Message-ID: <20200901101923.7e744qwtuvmnbtmn@gilmour.lan> References: <90c53367b289e9c0f9eeb97794a8d3b08d813884.1594230107.git-series.maxime@cerno.tech> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dozkezvx4o5iboho" 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 --dozkezvx4o5iboho Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Dave, On Tue, Jul 28, 2020 at 04:30:16PM +0100, Dave Stevenson wrote: > > @@ -681,10 +684,14 @@ int vc4_kms_load(struct drm_device *dev) > > struct vc4_load_tracker_state *load_state; > > int ret; > > > > - /* Start with the load tracker enabled. Can be disabled through= the > > - * debugfs load_tracker file. > > - */ > > - vc4->load_tracker_enabled =3D true; > > + if (!of_device_is_compatible(dev->dev->of_node, "brcm,bcm2711-v= c5")) { >=20 > Is it better to look up the compatible string, or pass something via > the .data element of the of_device_id table? Probably down to personal > preference? It's pretty much equivalent, so I'm not sure one is arguably better than the other. However, checking for the compatible can be pretty cumbersome when you have to do it repeatedly (like we do in the HDMI controller), and when you don't it a lot, having a structure associated to the compatible is also fairly cumbersome. > > + vc4->load_tracker_available =3D true; > > + > > + /* Start with the load tracker enabled. Can be > > + * disabled through the debugfs load_tracker file. > > + */ > > + vc4->load_tracker_enabled =3D true; > > + } > > > > sema_init(&vc4->async_modeset, 1); > > > > @@ -698,8 +705,14 @@ int vc4_kms_load(struct drm_device *dev) > > return ret; > > } > > > > - dev->mode_config.max_width =3D 2048; > > - dev->mode_config.max_height =3D 2048; > > + if (of_device_is_compatible(dev->dev->of_node, "brcm,bcm2711-vc= 5")) { >=20 > We're making the same of_device_is_compatible call twice within > vc4_kms_load. Set a flag based on it and check that instead? Good idea, thanks! Maxime --dozkezvx4o5iboho Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX04gKwAKCRDj7w1vZxhR xdjRAP9NRCUkLEG71G/PlhSmiqu8PAfDEFoqOIOabvM3/kj1GAEAxUSCGhv9XmUs ZhR7LLKC9pnKW5c295ozmuSloS08AQg= =s4r0 -----END PGP SIGNATURE----- --dozkezvx4o5iboho--