From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Paul Menzel <paulepanter@users.sourceforge.net>,
dri-devel@lists.freedesktop.org
Subject: Re: Caching of EDID for X server to decrease startup time of X server
Date: Mon, 10 Aug 2015 15:46:38 +0100 [thread overview]
Message-ID: <20150810144638.GU7557@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20150810130148.GE1262@ulmo.nvidia.com>
On Mon, Aug 10, 2015 at 03:01:49PM +0200, Thierry Reding wrote:
> On Sat, Aug 08, 2015 at 10:18:57PM +0200, Paul Menzel wrote:
> > Is it correct, that EDID is probed for both outputs? Is that necessary?
> > I assume during startup the Linux kernel for example already collected
> > this information and if no change of monitor/output is detected, the
> > EDID should be the same, right?
> >
> > Is that already implement and I just need to apply the correct
> > configuration?
> >
> > Any suggestions on how to decrease the startup time for the X server
> > are much appreciated.
>
> Russell and Sascha were discussing this kind of caching in the i.MX
> driver recently. Adding both for visibility. Also not trimming the quote
> in case they don't have the original.
>
> It sounds like this could be useful to have in the core.
Yes, as I mentioned in the discussion between Sascha and myself, I think
this should be implemented in the DRM core rather than each and every
driver.
My reasoning is that the pretense for caching the EDID is basically one
of performance: we don't want to keep on performing the time consuming
I2C bus cycles to read it. However,
drm_helper_probe_single_connector_modes_merge_bits() itself can be very
expensive - it can call out to drm_load_edid_firmware(), which can
involve requesting EDID firmware - which results in calling out to
userspace.
So, if we're concerned about performance, I think it would be better
to solve all the performance problems in this path in a generic way
which covers both issues.
> As I understand
> it, hotplug detection is pretty well specified for more modern display
> interfaces (like HDMI and DisplayPort), so I think caching of this sort
> could work for those. However, I think some older interfaces such as VGA
> (or perhaps even DVI as well) don't have reliable hotplug detection and
> hence would need to be able to force reading the EDID.
Yes, I think I've seen code in DRM which does hotplug-detection-by-EDID.
Those are normally doing so in their ->detect callback, and using the
presence of EDID to report whether there's a device connected. I'd
suggest these remain separate from this caching as it's serving a
different purpose.
> Still, perhaps a connector flag could be introduced to enable caching on
> a per-connector basis, and then we should be able to deal with this in
> the DRM core, rather than have per-driver quirks.
I agree, and I think a lot of it can be handled entirely within DRM for
most cases if we:
- arrange for a new connector "modes_invalid" flag which is set initially
- arrange for drm_helper_probe_single_connector_modes_merge_bits to test
this flag to determine whether it needs to re-read the modes and/or load
EDID.
- have drm_helper_probe_single_connector_modes_merge_bits clear this
flag if caching is enabled and we successfully read the modes from the
connector and/or loaded EDID.
- set this flag whenever we see the connector transition from a
non-connected state to a connected state.
I'm trying not to talk myself into writing another patch at the moment...
my latency for getting development work into the kernel seems to be getting
on for 2 years judging by the state of my dwhdmi audio and CEC patches,
though I'm pretty sure that's just because they're fairly low-priority for
me. :(
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-08-10 14:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-08 20:18 Caching of EDID for X server to decrease startup time of X server Paul Menzel
2015-08-10 13:01 ` Thierry Reding
2015-08-10 13:13 ` Chris Wilson
2015-08-10 13:36 ` Thierry Reding
2015-08-10 14:26 ` Daniel Vetter
2015-08-10 14:46 ` Russell King - ARM Linux [this message]
2015-08-10 15:25 ` Sharma, Shashank
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=20150810144638.GU7557@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=paulepanter@users.sourceforge.net \
--cc=thierry.reding@gmail.com \
/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