From: Kuogee Hsieh <quic_khsieh@quicinc.com>
To: Abhinav Kumar <quic_abhinavk@quicinc.com>,
Doug Anderson <dianders@chromium.org>
Cc: Sankeerth Billakanti <quic_sbillaka@quicinc.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@linux.ie>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
Stephen Boyd <swboyd@chromium.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
"Aravind Venkateswaran (QUIC)" <quic_aravindh@quicinc.com>
Subject: Re: [RFC PATCH] drm/edid: drm_add_modes_noedid() should set lowest resolution as preferred
Date: Wed, 27 Apr 2022 14:20:44 -0700 [thread overview]
Message-ID: <33abb8cd-728b-3843-0b06-e4891f5d3005@quicinc.com> (raw)
In-Reply-To: <61d98a8a-1c0f-346a-1e66-2e647d2f3088@quicinc.com>
Tested-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
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
>> <quic_abhinavk@quicinc.com> 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 <dianders@chromium.org>
>>>
>>> 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 <quic_abhinavk@quicinc.com>
>
> We will test this one also out with our equipment, then give tested-by
> tags.
>
> Thanks
>
> Abhinav
>
next prev parent reply other threads:[~2022-04-27 21:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 20:21 [RFC PATCH] drm/edid: drm_add_modes_noedid() should set lowest resolution as preferred Douglas Anderson
2022-04-26 20:45 ` Abhinav Kumar
2022-04-26 20:52 ` Doug Anderson
2022-04-26 21:21 ` Abhinav Kumar
2022-04-27 21:20 ` Kuogee Hsieh [this message]
2022-05-05 15:44 ` Doug Anderson
2022-05-06 11:16 ` Jani Nikula
2022-05-06 16:33 ` Abhinav Kumar
2022-05-10 20:53 ` Doug Anderson
2022-05-10 21:33 ` Abhinav Kumar
2022-05-10 21:41 ` Doug Anderson
2022-05-11 0:03 ` Abhinav Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33abb8cd-728b-3843-0b06-e4891f5d3005@quicinc.com \
--to=quic_khsieh@quicinc.com \
--cc=airlied@linux.ie \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_aravindh@quicinc.com \
--cc=quic_sbillaka@quicinc.com \
--cc=swboyd@chromium.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox