Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3591722rwb; Tue, 16 Aug 2022 05:54:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR7kBZRNvCFqkuvP4vf1BJMC8cvNenADX6tcU4uCwDpmETUQARBn28EnS+WIRl1DshgZWn/B X-Received: by 2002:a05:6402:43c4:b0:43b:c5eb:c9dd with SMTP id p4-20020a05640243c400b0043bc5ebc9ddmr18454709edc.402.1660654468629; Tue, 16 Aug 2022 05:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660654468; cv=none; d=google.com; s=arc-20160816; b=xr02rtT1mBYZIF7xh6cIEBdZpJhNrhHf45ClrkZIb44CG2Wl193Y5cVVSj6JIg5kuB r2mLSDKYVrAJqz5B3uYc2qlR+QobTOMrfYwaxjLelkwSCe0DhfsbJAXcZkTB7BWZ4aLW eQkRD1pGvC5yw6jAv724ALvSZZkdJ3HDTFSmr4MtiK0zRKRbBPEXCQ6RlLkHfXKJGXdY TpbiHkP4f9fkvGrqc/vV3kIppDenhOVnHcR/MOQfYtSfjj1gF/0SwlxyuCTvN1nGHzR/ z/n0NPdWK898T/Lj9eoDQXjafjkIaxVrI8OpaZhPEfXYYACrMY+KhzDp5moEGYjuiTZH UtSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=6XLImf6D+uceaDHdtwK+6f06L2Vn5a6E/RxhQgeCM3Q=; b=Gzs4YWPRw/1bZk6GH7NupSaLDfg7WtOQCrLt45FIVgENxMW3R/47JznVI3W9aEkOZd qUfblTuceKaN45XlaVZZjoospLDNv8JxogLrGHfDxNYIvsN/6lTO1mTDYXzwhA7W+qt/ Wa2iJlFz+J186IrLdeAJd9TVaWvuNkJdxZYm+rndCc91kNLeC2zORLKWJTKkwre6POIU 4iVQzfk6z7nrSqWiTGXAXqstyd6xCo/rZNwuu5kkxMtnbhp9z1ZzZlEHQPdKaTbcYIZV jpYlzDFWmTtPeC5+vamHDqIMzYtVU+pLB4WJzh/vZGPQif9GgdUwsQeWix5rOn56Jww1 3JrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=kexpck3C; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=RiG9AYB4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr24-20020a1709073f9800b007317ce725adsi11057185ejc.936.2022.08.16.05.54.01; Tue, 16 Aug 2022 05:54:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=kexpck3C; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=RiG9AYB4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233911AbiHPMVG (ORCPT + 99 others); Tue, 16 Aug 2022 08:21:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233446AbiHPMVF (ORCPT ); Tue, 16 Aug 2022 08:21:05 -0400 Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52C41BF4D for ; Tue, 16 Aug 2022 05:21:03 -0700 (PDT) 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 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="d5ua5726mqkqg3lm" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --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--