From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: clinton.a.taylor@intel.com
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: eDP HPD connected check to reduce T3 time
Date: Tue, 22 Sep 2015 20:27:53 +0300 [thread overview]
Message-ID: <20150922172753.GT26517@intel.com> (raw)
In-Reply-To: <1442941779-13633-1-git-send-email-clinton.a.taylor@intel.com>
On Tue, Sep 22, 2015 at 10:09:39AM -0700, clinton.a.taylor@intel.com wrote:
> From: Clint Taylor <clinton.a.taylor@intel.com>
>
> To reduce eDP T3 time check for digital port connected instead of
> msleep. Maintain VBT time if HPD is not asserted on the port.
>
> Current eDP T3 time is an msleep for the panel_power_up time specified
> in VBT. The eDP specification allows maximum T3 time of 200ms.
> Typically panels raise HPD from 70ms-105ms and are ready for AUX traffic
> and training. Reading HPD will reduce power-on and resume times by over
> 100ms on systems with eDP HPD connected.
>
> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 77e4115..7caf3ab 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -129,6 +129,8 @@ static void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync);
> static void vlv_init_panel_power_sequencer(struct intel_dp *intel_dp);
> static void vlv_steal_power_sequencer(struct drm_device *dev,
> enum pipe pipe);
> +static bool intel_digital_port_connected(struct drm_i915_private *dev_priv,
> + struct intel_digital_port *port);
>
> static unsigned int intel_dp_unused_lane_mask(int lane_count)
> {
> @@ -1772,6 +1774,7 @@ static bool edp_panel_vdd_on(struct intel_dp *intel_dp)
> u32 pp;
> u32 pp_stat_reg, pp_ctrl_reg;
> bool need_to_disable = !intel_dp->want_panel_vdd;
> + int i, step = 0;
>
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> @@ -1809,7 +1812,15 @@ static bool edp_panel_vdd_on(struct intel_dp *intel_dp)
> if (!edp_have_panel_power(intel_dp)) {
> DRM_DEBUG_KMS("eDP port %c panel power wasn't enabled\n",
> port_name(intel_dig_port->port));
> - msleep(intel_dp->panel_power_up_delay);
> + step = intel_dp->panel_power_up_delay / 10;
> + for (i=0; i < intel_dp->panel_power_up_delay; i+=step) {
> + if (intel_digital_port_connected(dev_priv, intel_dig_port)) {
> + DRM_DEBUG_KMS("Port %c HPD detected\n",
> + port_name(intel_dig_port->port));
> + break;
> + }
> + msleep(10);
> + }
We have the HPD irq wired up for all ports now, so we could even do
this without polling.
There is a slight concern that what if the HPD line is noisy (happened
on BSW RVP due wrong pullup settings at least) we could start link
training before the panel is powered up. But I have no good solution for
that, other than maybe blacklisting bad machines, which would require
that we detect them somehow in the first place. Maybe we should have
some kind of check in case the HPD is raised suspiciously soon, we would
fall back to the full msleep method?
Another thing I didn't think about fully is how the power sequencer fits
into this sort of thing. It seems we always enable the vdd force override
before starting the panel on sequence, so i suppose we should be able
to program the panel power on delay to 0 (or whatever the min is), and
just rely on the driver to do the delays?
> }
>
> return need_to_disable;
> --
> 1.7.9.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-09-22 17:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 17:09 [PATCH] drm/i915: eDP HPD connected check to reduce T3 time clinton.a.taylor
2015-09-22 17:27 ` Ville Syrjälä [this message]
2015-09-22 21:34 ` Clint Taylor
2015-09-23 11:26 ` Ville Syrjälä
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=20150922172753.GT26517@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=clinton.a.taylor@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