Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1971849rdf; Mon, 6 Nov 2023 00:06:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUnQuJdIFAAAnltexBi+Lw2uU+qXW4dJxMK5s441n6GynEkJp2/UbZjdR+6TSyWQ3vMNvf X-Received: by 2002:a05:6a20:7d83:b0:15e:9923:3e35 with SMTP id v3-20020a056a207d8300b0015e99233e35mr14361177pzj.19.1699258017379; Mon, 06 Nov 2023 00:06:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699258017; cv=none; d=google.com; s=arc-20160816; b=Q1PYXgzz4bO9C5KzaqpJMR5mK0LXg/DTNVRt5BCeVhBZWt47ocP+RargOz8uRZCyxF 6PJg9uyg8ISQkIlj8zQnD1KdLUUsI7WaKSkaVQ5tH54q7sMUmT/DU3jC2MR7/hR8PHyN B/pvjbCX/YbTLMtoqmKDOc6LUZ10W3vfxx4OccowcKwraDSrX1ehPWiBbiuYcbQ2Nv1i fy6/Gfc58ujeebTHS4POnnFitQYbZFAy6wwxDCQAeif/SnW220100UC0YwdqP8ttc0nI fEpNEaVM86KWn89luxm9mgKKpsvNJqPaT9rF/yw+/D1pMTnP6N8cpnFGrLHeFrcHos+c zmsg== 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:dkim-signature; bh=Whd5oMeK1I9z/RUheGQ8JiStxsgf9qTYIkZSz85OYdI=; fh=brnCF6933a9qivRIEXMf5Bt6j0deRCMegXD2aIlitmc=; b=curCGCtlO4ryp/LhtkRlPk0jE2com6evvjUYQRjlXcr3eqOOwm3ngCYLIFtt19pUHC ytlZg/pNJhj1nCT0HAzSFR/+O4TDtR4m8p3W4lc7h0cYVistT7EEKkTJ32SLGeX6f5Mm /tb7UQ5feqsDVV5ra954FcolVdeGyHmNPzdFQKN/Jo71cYlQLSYLkpGFwU99jXBOh7hN r20TtYure7Q0TUcNrXwov4WMiAbLeNFTNVbN2NIWrMzx1hs0FcFkVxSCVocfPQ4WX+A7 bxEj1/USEbmH6UP4EQR8fvVAH8cby+nRdExOPxDfEE4RqiDYOb7UzQc3r41edUw7wcQT PqXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PNdxyDS3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id h62-20020a638341000000b005bd2b87d75fsi7194509pge.669.2023.11.06.00.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 00:06:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PNdxyDS3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 058DE804AF78; Mon, 6 Nov 2023 00:06:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230520AbjKFIGs (ORCPT + 99 others); Mon, 6 Nov 2023 03:06:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230497AbjKFIGq (ORCPT ); Mon, 6 Nov 2023 03:06:46 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A417E1 for ; Mon, 6 Nov 2023 00:06:44 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67A2DC433C7; Mon, 6 Nov 2023 08:06:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699258003; bh=Whd5oMeK1I9z/RUheGQ8JiStxsgf9qTYIkZSz85OYdI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PNdxyDS3jworj1+C0NH2REiaGfzncqug8QtE6qfBuuUIVF8DSAPW/gJmDozHtomCa gMo9aGUD6TEcDQp610EUrhWJZnMx/QVRPkCRoy9JLgmkuNSpItEaOFwdrusQQn8Y4m SC9zIcjtG2MD5oh+KFoH/2SvdULeQHPtZ/DIPtp9J28OPmZ3wqLnNUUsg+KkvmEaLa ljyebD1W8HLi4uOB51GNcTAqxdiV1Du+uQ7FQeeJsagrF+t/saZwBfE4siAaP/IV9H 10ZgVLZRE5+dNlDjzlm4yMh1OW0GlpGkbQp5xIqbMQxZfI9j/A3vl/Mwl4vCU2h4hL PURoXRQv7gq1g== Date: Mon, 6 Nov 2023 09:06:41 +0100 From: Maxime Ripard To: Doug Anderson Cc: Dmitry Baryshkov , Hsin-Yi Wang , Neil Armstrong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Jessica Zhang , Sam Ravnborg Subject: Re: [PATCH 3/3] drm/panel-edp: Choose correct preferred mode Message-ID: References: <20231101212604.1636517-1-hsinyi@chromium.org> <20231101212604.1636517-4-hsinyi@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="p2nzhnzkeentgd7g" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 06 Nov 2023 00:06:55 -0800 (PST) --p2nzhnzkeentgd7g Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 02, 2023 at 07:33:48AM -0700, Doug Anderson wrote: > Hi, >=20 > On Wed, Nov 1, 2023 at 11:31=E2=80=AFPM Dmitry Baryshkov > wrote: > > > > On Wed, 1 Nov 2023 at 23:26, Hsin-Yi Wang wrote: > > > > > > If a non generic edp-panel is under aux-bus, the mode read from edid = would > > > still be selected as preferred and results in multiple preferred mode= s, > > > which is ambiguous. > > > > > > If a hard-coded mode is present, unset the preferred bit of the modes= read > > > from edid. > > > > Can we skip the EDID completely if the hardcoded override is present? >=20 > Yeah, I wondered about that too. The blending of the hardcoded with > the EDID predates my involvement with the driver. You can see even as > of commit 280921de7241 ("drm/panel: Add simple panel support") that > the driver would start with the EDID modes (if it had them) and then > go onto add the hardcoded modes. At least for eDP panels, though, > nobody (or almost nobody?) actually provided panel-simple a DDC bus at > the same time it was given a hardcoded panel. >=20 > I guess I could go either way, but I have a slight bias to adding the > extra modes and just making it clear to userspace that none of them > are "preferred". That seems like it would give userspace the most > flexibility I disagree. "Flexibility" here just means "the way to shoot itself in the foot without knowing it's aiming at its foot". If a mode is broken, we shouldn't expose it, just like we don't for all modes that require a maximum frequency higher than what the controller can provide on HDMI for example. > and also is closer to what we've historically done (though, > historically, we just allowed there to be more than one "preferred" > mode). I have no idea what history you're referring to here > One thing we definitely want to do, though, is to still expose the > EDID to userspace even if we're using a hardcoded mode. I believe > that, at least on ChromeOS, there are some tools that look at the EDID > directly for some reason or another. If the EDID is known to be broken and unreliable, what's the point? Maxime --p2nzhnzkeentgd7g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZUiekQAKCRDj7w1vZxhR xR1VAQCofZ+KM2NOqwhY9yNFvg4GhfbYs4dwJhQgF3RshcktIgD9Ehj8YqDSWbBH P1yONCZAX6hgfJfa9PsZWOv8UxAyPg8= =L+kT -----END PGP SIGNATURE----- --p2nzhnzkeentgd7g--