Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp309000iob; Thu, 28 Apr 2022 02:58:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYyG0Y96XS+RBrc3nWFbqJ7oX9chsiQi5ZlQuxyvuXM25AfRwdKpFZ2s2ajgoVGBvh+Oxa X-Received: by 2002:a17:906:5cb:b0:6cf:954:d84d with SMTP id t11-20020a17090605cb00b006cf0954d84dmr31652769ejt.560.1651139901374; Thu, 28 Apr 2022 02:58:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651139901; cv=none; d=google.com; s=arc-20160816; b=F7vcz3Pa5AjktqZnFWCbjf/tio/Pu7rRbLEpEfuXn5JVFV3/055poUaADs4wvAIQcE ZeTsCPC+PVSQOIV28rgP49ckMwdLca2BplhbgJffFwRYkpyHdRdsiAhItw5Ogt00CwhN xjIKPijMWdUm0rLT5jx5qe9jcoBhTWNd5zETurrgq0HTUa2cvbs4k9cYcECHxf3N7c0m MUkCq1L0CA7WQZh97nKG44qvCx1a5vzl1YfpED8cTPi+W8ZmDpblXphaviSY3BnsbVSi f7y3dlVzG2Gc+06WlFJ4jPczHBuqONe7buhWZbr3kqzgjz5k83NuF5qFlq3HetJW0dxa QTBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fUZA2yYwOsCIYeXG2swRkQA9QKkCCzru628+oHSAMQ0=; b=obbhYnUxhrHknKuSGqRoOFUMHdleBMT05+J77WcoWML/g51eAtJHxRd0cMQaOCNc7l ma15xQiyLZ55xVoFIPB7+g7roycSVNOUbdEs4OIOQ0iKKmar7rvuInNdp8jb6C97ahVv qMdQmQQE8BaNEPUPAi8hjsCyCHP67fosLPrwF2PxT67KASc0q1vcIT1FDBMsUpKwiuvU DYNpDBlWc/pX8fCZlwY8NxK2kR4o2Ug+1CjbUjns3/Kt6aWi0arxxpoeLLccdE3goqW6 jouvPK1ddbFY2iTKWeMzVZ1CA9jXnYq6+VtmVX9lchNYUBWJva1AOPxTM9ZUH6Zdcrm6 YiWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=NyJiVq2b; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f9-20020a170906c08900b006f37a0e4737si3512031ejz.381.2022.04.28.02.57.57; Thu, 28 Apr 2022 02:58:21 -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=@quicinc.com header.s=qcdkim header.b=NyJiVq2b; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229592AbiD0VYH (ORCPT + 99 others); Wed, 27 Apr 2022 17:24:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237914AbiD0VYA (ORCPT ); Wed, 27 Apr 2022 17:24:00 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A1F56EB04; Wed, 27 Apr 2022 14:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651094447; x=1682630447; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=fUZA2yYwOsCIYeXG2swRkQA9QKkCCzru628+oHSAMQ0=; b=NyJiVq2bwkNvoy4TvfGrOSRF+cdpgSG4+OjZ5qD4+Sr0MY7dLZwS1UtC N3xNsQayS0zmL3jn19oTM1LY3QXmkMT8TIxnjvX+yAC8K0qCZOePHN8QG 8UvmP5JcaiDe01w0xnbMBcPAdw5AUjYGUnq4NnUds/5deC+01HTciPn0n s=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 27 Apr 2022 14:20:47 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2022 14:20:46 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 27 Apr 2022 14:20:46 -0700 Received: from [10.110.125.173] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 27 Apr 2022 14:20:45 -0700 Message-ID: <33abb8cd-728b-3843-0b06-e4891f5d3005@quicinc.com> Date: Wed, 27 Apr 2022 14:20:44 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [RFC PATCH] drm/edid: drm_add_modes_noedid() should set lowest resolution as preferred Content-Language: en-US To: Abhinav Kumar , Doug Anderson CC: Sankeerth Billakanti , Thomas Zimmermann , David Airlie , linux-arm-msm , LKML , dri-devel , Stephen Boyd , Dmitry Baryshkov , "Aravind Venkateswaran (QUIC)" References: <20220426132121.RFC.1.I31ec454f8d4ffce51a7708a8092f8a6f9c929092@changeid> <61d98a8a-1c0f-346a-1e66-2e647d2f3088@quicinc.com> From: Kuogee Hsieh In-Reply-To: <61d98a8a-1c0f-346a-1e66-2e647d2f3088@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 Tested-by: Kuogee Hsieh On 4/26/2022 2:21 PM, Abhinav Kumar wrote: > > > On 4/26/2022 1:52 PM, Doug Anderson wrote: >> 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 > > Alright, agreed. The way the API is today, I dont see anything getting > broken with this. > > So typically, as per spec, when a preferred mode is not set by the > sink, the first entry becomes the preferred mode. > > This also aligns with that expectation. > > So FWIW, > > Reviewed-by: Abhinav Kumar > > We will test this one also out with our equipment, then give tested-by > tags. > > Thanks > > Abhinav >