Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4450438ioa; Wed, 27 Apr 2022 04:16:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVKfLpMhBFwZOsBN/yuBmNjERzXn4QwIlxUjT6vJtOm1vJa2H5ZSdFtlVbZLgk4iINWlbM X-Received: by 2002:a17:90b:33c8:b0:1d9:8cda:fd70 with SMTP id lk8-20020a17090b33c800b001d98cdafd70mr14093348pjb.161.1651058164475; Wed, 27 Apr 2022 04:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651058164; cv=none; d=google.com; s=arc-20160816; b=qJCqPi+N6hXKbpxahLcILwldQTDkPR3xXZI/6521awMKzpK392EtyEHnU+amrWUIzu L/h5zgxfbfTTqI3bY6PwSL1zGIWPf+SWxvWRBOXY2y7XpJf7r/QpyIYxXJJxBqtbjv26 801LRR/tgxTBIRyPjLgYVsr2Sud1COA02H/m36V9ZyO6aVCkSMclCFG8ezKEYZG+pMRR XAJJFLDYIxTTFoVewokaO+Z0RIe68BTxW3qsLO6IG+P76dOk8jRo7g0UccXxdXrwtSAO lze9wMxOw6tjdMxHDRqGxyOgOkFvb70EzmDiZitnI85mgAR2t09Jnr10lTZLpJJAEdk0 LSsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=o+6smG6ZsaikM1dg09vZip/ZwNi93PfiwahWrVpAv9A=; b=fBTd2YMzMOZVOd/BWM1Uu/1mCRyzh3WhzZyxZc/eDuEwCU6IFhep6grO5rBDBeMizd 9E+ZBrmlZATK8jYnOTRcZ2mq1AVBH9PG9dvnjhsH0aC0tH2ww2N3KMxAg96BWvxNfNVY KNnQN4+uMgS++UaU4Bn1UiSVYiu/p71S8Xqbys3rF/mSM4vTepqJAh55QPaAFce5uKu8 povo2arasUwVb1dPU+eUh/9r/AnE2IS0uBYjGqX+L061u0pWGiaZmRYzgQwM1/avtKO5 2y3KSD0hjNIYoYHWWhO78dDcbeeryQvwVcLj8UvEev0npn/WN1M8pNU4mEIzTZkSlz3g NIPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hJIZi6xa; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l70-20020a638849000000b0039d3ce3030bsi1166157pgd.553.2022.04.27.04.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 04:16:04 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hJIZi6xa; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 02CAD4580DC; Wed, 27 Apr 2022 03:09:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355158AbiDZU4S (ORCPT + 99 others); Tue, 26 Apr 2022 16:56:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355145AbiDZU4R (ORCPT ); Tue, 26 Apr 2022 16:56:17 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84D0E48888 for ; Tue, 26 Apr 2022 13:53:08 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id y3so18108439ejo.12 for ; Tue, 26 Apr 2022 13:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o+6smG6ZsaikM1dg09vZip/ZwNi93PfiwahWrVpAv9A=; b=hJIZi6xaEIf7LJsIqr6G55r7hJou56/b/P3bACckDThw8eadVK4SdjrGaWfAee4zN4 6TeH/YbjnzVAyl/zOKMMRvgLHGPqu9gyRKWTE0HjuunYksv8Wkja294rzR9FVDeeMnC1 zb7rGNPS6Q8lK1WtG3/29Ko/NFQH0MCJEIteI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o+6smG6ZsaikM1dg09vZip/ZwNi93PfiwahWrVpAv9A=; b=zfx9FDEa1Q6+T+EQDdOEf7QaRDjmDveFefDIvEyusH5ndDleUltMLeW0gx+vLeSi2m qEqMZw4qSkw4AfdWborCA9y9TNrQ4Ud1aHZ20z0xaZ+Xtbtl/wxOF3BVDNham7TOZ5pf /FAfo3cjCkESM4PfiW5rdAXhM9KdFbMQZQGk/34CpIOSb5Z4063pyd9APacClYR9Ko3F BluTJjbUFlP85bZ1qyGALMZP71OjUViHT5NBF73E1dHpWsap4SPrVNgkCjxmRfHezZd1 WH6DmFSlz4jPwKeV9Eg+CXn6aMMW79hrlk0lsbC/vbnWnYIDusUW0JIoxunYUzseT+3D 3enQ== X-Gm-Message-State: AOAM530s7U5tKxbRszf2cIMW8qwRQLA9oBknvWc+avP8CKBdT8I1DxmM eDShH01e16v6iVHgqD7C4MUc0dhXGz2Fh3hB05E= X-Received: by 2002:a17:907:9811:b0:6f3:a389:a203 with SMTP id ji17-20020a170907981100b006f3a389a203mr8666178ejc.381.1651006386648; Tue, 26 Apr 2022 13:53:06 -0700 (PDT) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com. [209.85.128.44]) by smtp.gmail.com with ESMTPSA id ek21-20020a056402371500b0042025e47eddsm6522286edb.7.2022.04.26.13.53.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Apr 2022 13:53:05 -0700 (PDT) Received: by mail-wm1-f44.google.com with SMTP id n32-20020a05600c3ba000b00393ea7192faso24592wms.2 for ; Tue, 26 Apr 2022 13:53:05 -0700 (PDT) X-Received: by 2002:a05:600c:3d0e:b0:38f:f83b:e7dc with SMTP id bh14-20020a05600c3d0e00b0038ff83be7dcmr31516102wmb.29.1651006385011; Tue, 26 Apr 2022 13:53:05 -0700 (PDT) MIME-Version: 1.0 References: <20220426132121.RFC.1.I31ec454f8d4ffce51a7708a8092f8a6f9c929092@changeid> In-Reply-To: From: Doug Anderson Date: Tue, 26 Apr 2022 13:52:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] drm/edid: drm_add_modes_noedid() should set lowest resolution as preferred To: Abhinav Kumar Cc: dri-devel , Rob Clark , linux-arm-msm , "Kuogee Hsieh (QUIC)" , "Aravind Venkateswaran (QUIC)" , Stephen Boyd , Dmitry Baryshkov , Sankeerth Billakanti , Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Hi, On Tue, Apr 26, 2022 at 1:46 PM Abhinav Kumar wrote: > > On 4/26/2022 1:21 PM, Douglas Anderson wrote: > > If we're unable to read the EDID for a display because it's corrupt / > > bogus / invalid then we'll add a set of standard modes for the > > display. When userspace looks at these modes it doesn't really have a > > good concept for which mode to pick and it'll likely pick the highest > > resolution one by default. That's probably not ideal because the modes > > were purely guesses on the part of the Linux kernel. > > > > Let's instead set 640x480 as the "preferred" mode when we have no EDID. > > > > Signed-off-by: Douglas Anderson > > drm_dmt_modes array is sorted but you are also relying on this check to > eliminate the non-60fps modes > > 5611 if (drm_mode_vrefresh(ptr) > 61) > 5612 continue; > > I am not sure why we filter out the modes > 61 vrefresh. > > If that check will remain this is okay. > > If its not, its not reliable that the first mode will be 640x480@60 I suspect that the check will remain. I guess I could try to do something fancier if people want, but I'd be interested in _what_ fancier thing I should do if so. Do we want the rule to remain that we always prefer 640x480, or do we want to prefer the lowest resolution? ...do we want to prefer 60 Hz or the lowest refresh rate? Do we do this only for DP (which explicitly calls out 640x480 @60Hz as the best failsafe) or for everything? For now, the way it's coded up seems reasonable (to me). It's the lowest resolution _and_ it's 640x480 just because of the current values of the table. I suspect that extra lower resolution failsafe modes won't be added, but we can always change the rules here if/when they are. -Doug