From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"pablodebiase@nanalysis.com" <pablodebiase@nanalysis.com>
Subject: Re: [PATCH] drm/i915: Improve DP downstream HPD handling
Date: Fri, 27 Oct 2017 12:39:57 +0300 [thread overview]
Message-ID: <20171027093957.GY10981@intel.com> (raw)
In-Reply-To: <1509066685.14402.34.camel@dk-H97M-D3H>
On Fri, Oct 27, 2017 at 12:48:39AM +0000, Pandiyan, Dhinakaran wrote:
>
> On Thu, 2017-10-26 at 22:41 +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > DP dongles may signal downstream HPD via short HPD pulses. Setting the
> > sink to DPMS off apparently kills the downstream HPD (at least on my
> > DP->VGA dongle), so skip the DPMS off for such dongles when we turn
> > off the port.
> >
> > Cc: David Woodhouse <dwmw2@infradead.org>
> > Cc: Imre Deak <imre.deak@intel.com>
> > Cc: Pablo <pablodebiase@nanalysis.com>
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103472
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99114
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_dp.c | 18 +++++++++++++++++-
> > 1 file changed, 17 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index aa75f55eeb61..6ecc1b532f15 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -2673,6 +2673,21 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
> > }
> > }
> >
> > +static bool downstream_hpd_needs_d0(struct intel_dp *intel_dp)
> > +{
> > + /*
> > + * DPCD 1.2 should support BRANCH_DEVICE_CTRL, and thus
> > + * be capable of signalling downstream hpd with a long pulse.
> > + * Whether or not that means D3 is safe to use is not clear,
> > + * but let's assume so until proven otherwise.
> > + *
> > + * FIXME should really check all downstream ports...
> > + */
> > + return intel_dp->dpcd[DP_DPCD_REV] == 0x11 &&
> > + intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT &&
> > + intel_dp->downstream_ports[0] & DP_DS_PORT_HPD;
> > +}
> > +
> > static void intel_disable_dp(struct intel_encoder *encoder,
> > const struct intel_crtc_state *old_crtc_state,
> > const struct drm_connector_state *old_conn_state)
> > @@ -2686,7 +2701,8 @@ static void intel_disable_dp(struct intel_encoder *encoder,
>
> It's not clear why the DDI counterpart is missing.
Because I forgot we have the same code in two places ;) v2 coming up...
>
> > * ensure that we have vdd while we switch off the panel. */
> > intel_edp_panel_vdd_on(intel_dp);
> > intel_edp_backlight_off(old_conn_state);
> > - intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
> > + if (!downstream_hpd_needs_d0(intel_dp))
> > + intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
> > intel_edp_panel_off(intel_dp);
> > }
> >
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-27 9:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 19:41 [PATCH] drm/i915: Improve DP downstream HPD handling Ville Syrjala
2017-10-26 20:05 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-10-27 0:48 ` [PATCH] " Pandiyan, Dhinakaran
2017-10-27 9:39 ` Ville Syrjälä [this message]
2017-10-27 9:45 ` [PATCH v2] " Ville Syrjala
2017-10-27 10:02 ` Jani Nikula
2017-10-27 19:34 ` Ville Syrjälä
2017-10-27 10:22 ` ✗ Fi.CI.BAT: warning for drm/i915: Improve DP downstream HPD handling (rev2) Patchwork
2017-10-27 13:03 ` ✓ Fi.CI.BAT: success " Patchwork
2017-10-27 15:50 ` ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2015-07-06 12:12 [PATCH] drm/i915: Improve DP downstream HPD handling ville.syrjala
2015-07-07 9:56 ` Sivakumar Thulasimani
2015-07-07 11:10 ` Ville Syrjälä
2015-07-07 11:15 ` Sivakumar Thulasimani
2015-07-07 11:37 ` Ville Syrjälä
2015-07-07 11:54 ` Ville Syrjälä
2015-07-07 12:20 ` Sivakumar Thulasimani
2015-07-08 12:20 ` Sivakumar Thulasimani
2015-07-08 12:27 ` Ville Syrjälä
2015-07-07 11:23 ` shuang.he
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=20171027093957.GY10981@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dhinakaran.pandiyan@intel.com \
--cc=dwmw2@infradead.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=pablodebiase@nanalysis.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