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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C443C25B0E for ; Tue, 16 Aug 2022 12:22:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=suHf5cNfQf/8Y1C3QtywkJES1ybYeRprfHHGNZF8diM=; b=NNmQvHTOSuCkRU9IE84mV89+qC 3gq84cqRRy+CyJzbsKvQeybAlRSwvfL0rmxerwxg9UGp1iuCwYEkEywyHbq6za0GLzdcofomZu7oH PhD5srWSB3oGnU2h6HPiQIL/rYdRd+RsCCtLPcktOWJZDmAhVr+tX3UZ1To3MRi6Hxccz3y/6O61v bRBW5PVDDsUemARRLbRuHUcx5RGxw0lUNe1u4Q6LaloMeaaziObJ5KLz9H//5VyhK6r57N+4juzGU uwma3wFj6VF3ZYuEt/OZggOY//+CMBD6ILwEZ6lwHVV28USMulgjSc/2W+ygnzBoja01R0/I7b82h 4e6QUv1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNvZF-002DkI-IC; Tue, 16 Aug 2022 12:21:09 +0000 Received: from new3-smtp.messagingengine.com ([66.111.4.229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNvZ9-002Dd6-2G; Tue, 16 Aug 2022 12:21:07 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 1CB1158040B; Tue, 16 Aug 2022 08:21:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 16 Aug 2022 08:21:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1660652461; x=1660659661; bh=6XLImf6D+u ceaDHdtwK+6f06L2Vn5a6E/RxhQgeCM3Q=; b=kexpck3CQZ0ElJThDTOQn44AzH 8rR9jah9MWJU/TxAjZD3W5IdNrro8d3oe92deiJXvqX7ccuj0Zhl9rzStuw4KB/J 1WzDxddqdMma54Ujb/j4ldVoBl1tmqWrtu/dOS2orS6opeEIlWc+4a3Fpzc2J4eN hzUV9oHihVAuMbIDL/bTMMCKIF9GKt9BD+G0vbzXnTV5msk2B0C4k7j+uvfy1G/f 3ljZdqa0RXOVJYfuget5K31tpi1j/KokQBB4mLJkY5R4iTwu/6BZBzSPx5teuViE pUjiz2b+YukKvsNwW0lLgw7RZ59NIlZSQAvTvbz5EzR6JhopVseT581SnF3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1660652461; x=1660659661; bh=6XLImf6D+uceaDHdtwK+6f06L2Vn 5a6E/RxhQgeCM3Q=; b=RiG9AYB4Rh8oJH8nXRdnWyg1t8YNWMwRp+sCCYFHS43e ovLwo+W+rX2GTLM5PHUx+FmfE7VuI9padh5Clhf1WdBo+fYi/umQpjTQ3bOBK8lL zMKx75aSgPmoyPma/+DHD9V4RFym0Kne8Uzju3PvL1eeGz35Pp1H9/XBInor30U5 1GnHyEyIzjSoBVZc6XaYj+1GOA4gH5LBY31eTfABPb/MlPCoKptGssDwnBDTx1qs UJzE2gjPGjQtU6gAHBmhz2vZ16JreGBOKXFGlCdwHiuldjyTYj3UyP1ER+7+C29P LEY/PxqQoAyNF9yS/jZqos+H8NzqEqFXg443pSa4lw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehgedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpedtleekjeeiudefvdfhieffteelhfeivdeliefgieeugffhvdelieffjeei geetjeenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggt hh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Aug 2022 08:20:59 -0400 (EDT) Date: Tue, 16 Aug 2022 14:20:56 +0200 From: Maxime Ripard To: Geert Uytterhoeven Cc: Jernej Skrabec , Martin Blumenstingl , Chen-Yu Tsai , Philipp Zabel , Jerome Brunet , Samuel Holland , Thomas Zimmermann , Daniel Vetter , Emma Anholt , David Airlie , Maarten Lankhorst , Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Kevin Hilman , Neil Armstrong , linux-sunxi@lists.linux.dev, Linux Kernel Mailing List , Phil Elwell , Mateusz Kwiatkowski , Linux ARM , Dave Stevenson , "open list:ARM/Amlogic Meson..." , DRI Development , Dom Cobley Subject: Re: [PATCH v1 07/35] drm/modes: Only consider bpp and refresh before options Message-ID: <20220816122056.w6suecaizdoss2sv@houat> References: <20220728-rpi-analog-tv-properties-v1-0-3d53ae722097@cerno.tech> <20220728-rpi-analog-tv-properties-v1-7-3d53ae722097@cerno.tech> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220816_052103_416490_86DB3E95 X-CRM114-Status: GOOD ( 24.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0524218502794769236==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0524218502794769236== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="d5ua5726mqkqg3lm" Content-Disposition: inline --d5ua5726mqkqg3lm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Geert, Thanks for your review On Fri, Aug 12, 2022 at 03:25:39PM +0200, Geert Uytterhoeven wrote: > Hi Maxime, >=20 > On Fri, Jul 29, 2022 at 6:35 PM Maxime Ripard wrote: > > Some video=3D options might have a value that contains a dash. However,= the > > command line parsing mode considers all dashes as the separator between= the > > mode and the bpp count. > > > > Let's rework the parsing code a bit to only consider a dash as the bpp > > separator if it before a comma, the options separator. > > > > A follow-up patch will add a unit-test for this once such an option is > > introduced. > > > > Signed-off-by: Maxime Ripard >=20 > Thanks for your patch! >=20 > Reviewed-by: Geert Uytterhoeven >=20 > > --- a/drivers/gpu/drm/drm_modes.c > > +++ b/drivers/gpu/drm/drm_modes.c > > @@ -1819,20 +1819,22 @@ bool drm_mode_parse_command_line_for_connector(= const char *mode_option, > > > > name =3D mode_option; > > > > + /* Locate the start of named options */ > > + options_ptr =3D strchr(name, ','); > > + if (options_ptr) > > + options_off =3D options_ptr - name; > > + else > > + options_off =3D strlen(name); > > + > > /* Try to locate the bpp and refresh specifiers, if any */ > > - bpp_ptr =3D strchr(name, '-'); > > + bpp_ptr =3D strnchr(name, options_off, '-'); >=20 > Probably you still want to add a check that the next character > is actually a digit, cfr. my "[PATCH v2 5/5] drm/modes: > parse_cmdline: Add support for named modes containing dashes" > (https://lore.kernel.org/dri-devel/2eb205da88c3cb19ddf04d167ece4e16a33094= 8b.1657788997.git.geert@linux-m68k.org)? I think your patch is orthogonal, and we should merge it anyway. As a matter of fact, I initially wanted to do something similar but bailed out to deal with PAL-M and so on. If there's such modes already, then we should totally support it Maxime --d5ua5726mqkqg3lm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYvuLqAAKCRDj7w1vZxhR xS46AQCDoo68eNI5t/JZrITdAKWMGUwSBfFFuOU+V38x2GFqwQEA7EsamAC81DFp NHD21FgHcTvgUUUJaJo5pResSbjL5g0= =dh0z -----END PGP SIGNATURE----- --d5ua5726mqkqg3lm-- --===============0524218502794769236== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============0524218502794769236==--