From: Daniel Vetter <daniel@ffwll.ch>
To: Sonika Jindal <sonika.jindal@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Check live status before reading edid
Date: Mon, 13 Jul 2015 16:55:57 +0200 [thread overview]
Message-ID: <20150713145557.GS3736@phenom.ffwll.local> (raw)
In-Reply-To: <1436785500-26353-1-git-send-email-sonika.jindal@intel.com>
On Mon, Jul 13, 2015 at 04:35:00PM +0530, Sonika Jindal wrote:
> Adding this for SKL onwards.
>
> v2: Adding checks for VLV/CHV as well. Reusing old ibx and g4x functions
> to check digital port status. Adding a separate function to get bxt live
> status (Daniel)
>
> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 4 ++--
> drivers/gpu/drm/i915/intel_drv.h | 2 ++
> drivers/gpu/drm/i915/intel_hdmi.c | 42 +++++++++++++++++++++++++++++++++----
> 3 files changed, 42 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 4ebfc3a..7b54b9d 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4443,8 +4443,8 @@ ironlake_dp_detect(struct intel_dp *intel_dp)
> return intel_dp_detect_dpcd(intel_dp);
> }
>
> -static int g4x_digital_port_connected(struct drm_device *dev,
> - struct intel_digital_port *intel_dig_port)
> +int g4x_digital_port_connected(struct drm_device *dev,
> + struct intel_digital_port *intel_dig_port)
> {
> struct drm_i915_private *dev_priv = dev->dev_private;
> uint32_t bit;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index a47fbc3..30c8dd6 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1187,6 +1187,8 @@ void intel_edp_drrs_disable(struct intel_dp *intel_dp);
> void intel_edp_drrs_invalidate(struct drm_device *dev,
> unsigned frontbuffer_bits);
> void intel_edp_drrs_flush(struct drm_device *dev, unsigned frontbuffer_bits);
> +int g4x_digital_port_connected(struct drm_device *dev,
> + struct intel_digital_port *intel_dig_port);
>
> /* intel_dp_mst.c */
> int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id);
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 1fb6919..7eb0d0e 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1300,6 +1300,39 @@ intel_hdmi_unset_edid(struct drm_connector *connector)
> to_intel_connector(connector)->detect_edid = NULL;
> }
>
> +static bool bxt_port_connected(struct drm_i915_private *dev_priv,
> + struct intel_digital_port *port)
> +{
> + u32 temp = I915_READ(GEN8_DE_PORT_ISR);
> +
> + switch (port->port) {
> + case PORT_B:
> + return temp & BXT_DE_PORT_HP_DDIB;
> +
> + case PORT_C:
> + return temp & BXT_DE_PORT_HP_DDIC;
> +
> + default:
> + return false;
> +
> + }
> +}
> +
> +static bool intel_hdmi_live_status(struct intel_digital_port *intel_dig_port)
> +{
> + struct drm_device *dev = intel_dig_port->base.base.dev;
> + struct drm_i915_private *dev_priv = to_i915(dev);
> +
> + if (IS_VALLEYVIEW(dev))
> + return g4x_digital_port_connected(dev, intel_dig_port);
> + else if (IS_SKYLAKE(dev))
> + return ibx_digital_port_connected(dev_priv, intel_dig_port);
> + else if (IS_BROXTON(dev))
> + return bxt_port_connected(dev_priv, intel_dig_port);
Really I want this to be rolled out for all platforms, together with the
fix for handling hpd interrupts. Together with a reference to the old
commits we had to revert because it didn't work.
I want to test this on my ivb (since that's the machine where I can
readily reproduce this bug), and if it still doesn't work there I won't
take this.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-07-13 14:53 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 12:04 [PATCH 0/5] HDMI optimization series Sonika Jindal
2015-07-09 12:04 ` [PATCH 1/5] drm/i915: add attached connector to hdmi container Sonika Jindal
2015-07-09 12:04 ` [PATCH 2/5] drm/i915: Add HDMI probe function Sonika Jindal
2015-07-09 12:04 ` [PATCH 3/5] drm/i915: Read HDMI EDID only when required Sonika Jindal
2015-07-09 12:04 ` [PATCH 4/5] drm/i915: Check live status before reading edid Sonika Jindal
2015-07-09 17:27 ` Daniel Vetter
2015-07-10 4:31 ` Jindal, Sonika
2015-07-13 11:05 ` [PATCH] " Sonika Jindal
2015-07-13 14:55 ` Daniel Vetter [this message]
2015-07-14 4:46 ` Jindal, Sonika
2015-07-14 7:55 ` Daniel Vetter
2016-07-12 11:39 ` [PATCH 4/5] " David Weinehall
2016-07-13 11:59 ` Daniel Vetter
2016-07-13 12:09 ` Chris Wilson
2016-07-13 12:17 ` Chris Wilson
2016-07-14 17:42 ` David Weinehall
2016-08-01 10:09 ` Chris Wilson
2016-08-02 14:32 ` Chris Wilson
2016-08-02 15:04 ` Jindal, Sonika
2015-07-09 12:04 ` [PATCH 5/5] drm/i915: Set edid from detect only if forced Sonika Jindal
2015-07-09 15:24 ` shuang.he
2015-07-13 10:49 ` [PATCH] drm/i915: Set edid from init and not from detect Sonika Jindal
2015-07-13 11:40 ` Chris Wilson
2015-07-13 11:59 ` Jindal, Sonika
2015-07-13 14:57 ` Daniel Vetter
2015-07-14 3:48 ` Sharma, Shashank
2015-07-14 7:59 ` Daniel Vetter
2015-07-14 8:09 ` Sharma, Shashank
2015-07-14 9:03 ` Daniel Vetter
2015-07-14 11:33 ` Sharma, Shashank
-- strict thread matches above, loose matches on Subject: below --
2015-09-04 14:49 [PATCH 4/6] drm/i915: drm/i915: Check live status before reading edid Daniel Vetter
2015-09-07 5:02 ` [PATCH] " Sonika Jindal
2015-09-08 11:21 ` Sonika Jindal
2015-09-09 19:11 [PATCH 4/6] drm/i915: " Rodrigo Vivi
2015-09-11 11:26 ` [PATCH] " Sonika Jindal
2015-09-11 17:56 ` Rodrigo Vivi
2015-09-14 8:42 ` Daniel Vetter
2015-09-14 9:14 ` Jindal, Sonika
2015-09-14 9:36 ` Daniel Vetter
2015-09-15 4:14 ` Sonika Jindal
2015-09-23 8:18 ` Daniel Vetter
2016-03-08 21:03 ` Chris Wilson
2016-03-09 5:52 ` Jindal, Sonika
2016-03-09 5:55 ` Sharma, Shashank
2016-03-10 11:37 ` 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=20150713145557.GS3736@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=sonika.jindal@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