From: Daniel Vetter <daniel@ffwll.ch>
To: Ramalingam C <ramalingam.c@intel.com>
Cc: intel-gfx@lists.freedesktop.org, shashank.sharma@intel.com
Subject: Re: [PATCH 0/2] Optimization on intel HDMI detect and get_modes
Date: Mon, 13 Jan 2014 08:29:11 +0100 [thread overview]
Message-ID: <20140113072911.GM4770@phenom.ffwll.local> (raw)
In-Reply-To: <1389595914-23141-1-git-send-email-ramalingam.c@intel.com>
On Mon, Jan 13, 2014 at 12:21:52PM +0530, Ramalingam C wrote:
> On slow HDMI hotplug out, because of the physical interface design,
> DDC remains active for short duration even when HPD live status is
> indicating the disconnect state. Because of this on VLV and HSW,
> slow hotplug out events are not captured.
>
> Hence this change uses the HPD pins live status to identify the
> HDMI connector status.
>
> Multiple forced detect and read modes calls come from
> user space for different connectors, which can be handled
> with connector status and previous detect event's cached EDID.
> With this approach for hot pluggable displays, EDID retrieval
> is required only when there is a real hot-plug events.
>
> This change also includes:
> 1. A logic to optimize those multiple calls, by re-using
> cached data from previous detect and get_mode calls.
> 2. Store HDMI EDID, and re-use it in read modes.
> 3. Read live status reg to suppress spurious interrupts
>
> These two changes will optimize the access to the DDC and also the
> CPU cycles burned by intel_hdmi_detect and intel_hdmi_get_modes.
>
> Ramalingam C (1):
> drm/i915: HDMI detection based on HPD pin live status
>
> Shashank Sharma (1):
> drm/i915: Optimize EDID retrival on detect and get_modes
>
> drivers/gpu/drm/i915/intel_drv.h | 12 +++
> drivers/gpu/drm/i915/intel_hdmi.c | 149 ++++++++++++++++++++++++++++++++-----
> 2 files changed, 144 insertions(+), 17 deletions(-)
Nak.
We've had code to use the hpd live status register on all platforms, but
had to take it out again on all platforms due to broken hardware: The live
status simply doesn't work sometimes, resulting in angry users reporting
black screens. So as-is patch 1 can't go into upstream. I know that it'd
be really useful if we could rely on the hpd live status but, but thus far
I couldn't come up with a good idea to make it work. Git history should
have all the details.
Also note that machines with noisy interrupt lines (see the interrupt
storm handling code in i915_irq.c) complicate this further.
This means that patch 2 is also a no-go since we really can't rely upon
the hpd stuff for hdmi detection. But we can save EDID caching if we
automatically invalidate the cached edid after 1-2 seconds or the next hpd
interrupt (whichever is first). 1-2 seconds should be long enough for
userspace to read the EDID a few times and change the output
configuration, but not long enough for users to get pissed. Note that the
caching interval should be shorter than the polling interval, which we use
as a fallback if the hpd lines are noise and atm is at 10 seconds.
Also this EDID caching and invalidation code should imo be a generic
helper with data structures (for the invalidation work and cached edid) in
struct intel_output. That way we can also wire it up for e.g. VGA or any
other output that'll benefit from EDID caching.
Aside: On DP the hpd pins seem to be reliable thus far, but I'm not sure
whether that's just lack of test coverage (since DP screens are less
common) or because it actually works ...
Cheers, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-01-13 7:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <yes>
2014-01-13 6:51 ` [PATCH 0/2] Optimization on intel HDMI detect and get_modes Ramalingam C
2014-01-13 6:51 ` [PATCH 1/2] drm/i915: HDMI detection based on HPD pin live status Ramalingam C
2014-01-13 6:51 ` [PATCH 2/2] drm/i915: Optimize EDID retrival on detect and get_modes Ramalingam C
2014-01-13 7:29 ` Daniel Vetter [this message]
2014-01-13 9:39 ` [PATCH 0/2] Optimization on intel HDMI " Sharma, Shashank
2014-01-13 13:26 ` Daniel Vetter
2014-01-13 17:19 ` Sharma, Shashank
2014-04-09 6:19 ` Wang, Quanxian
2014-04-09 6:50 ` Sharma, Shashank
2014-04-10 6:46 ` Sharma, Shashank
2014-04-10 8:08 ` Daniel Vetter
2014-04-10 8:10 ` Sharma, Shashank
2014-04-10 10:42 ` Wang, Quanxian
[not found] ` <FF3DDC77922A8A4BB08A3BC48A1EA8CB01692A7B@BGSMSX101.gar.corp.intel.com>
2014-04-11 12:58 ` Daniel Vetter
2014-04-11 13:23 ` Sharma, Shashank
2014-04-11 14:22 ` Daniel Vetter
2014-04-11 14:48 ` Sharma, Shashank
2014-07-16 14:29 ` Kumar, Shobhit
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=20140113072911.GM4770@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ramalingam.c@intel.com \
--cc=shashank.sharma@intel.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