From: Lyude <cpaul@redhat.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915: Do CRT HPD force trigger only when needed
Date: Wed, 20 Apr 2016 11:45:50 -0400 [thread overview]
Message-ID: <1461167150.18906.2.camel@redhat.com> (raw)
In-Reply-To: <1460995405-6654-1-git-send-email-ville.syrjala@linux.intel.com>
Ironically I only started running into the hotplug loop issue you described once
I wrote some patches to enable hpd polling for vlv, so these came at the perfect
time. Anyway, tested these on an Intel NUC and reviewed them and they look good
to me.
For the whole series:
Reviewed-by: Lyude <cpaul@redhat.com>
On Mon, 2016-04-18 at 19:03 +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> There doesn't seem to be any need to for the force trigger trick every
> single time on VLV CRT output. Let's do it the same way as on ILK+, and
> do the force trigger only on the first detect after reset.
>
> This means we can actually just call the ILK+ code on VLV. The only
> difference between the two is the "turn DAC off" trick, but that's
> already conditional on HAS_PCH_SPLIT() so it won't be done on VLV.
>
> Cc: Lyude <cpaul@redhat.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_crt.c | 39 +--------------------------------------
> 1 file changed, 1 insertion(+), 38 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_crt.c
> b/drivers/gpu/drm/i915/intel_crt.c
> index a2a31fd01d1d..d10dea5bd08a 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -316,40 +316,6 @@ static bool intel_ironlake_crt_detect_hotplug(struct
> drm_connector *connector)
> return ret;
> }
>
> -static bool valleyview_crt_detect_hotplug(struct drm_connector *connector)
> -{
> - struct drm_device *dev = connector->dev;
> - struct intel_crt *crt = intel_attached_crt(connector);
> - struct drm_i915_private *dev_priv = dev->dev_private;
> - u32 adpa;
> - bool ret;
> - u32 save_adpa;
> -
> - save_adpa = adpa = I915_READ(crt->adpa_reg);
> - DRM_DEBUG_KMS("trigger hotplug detect cycle: adpa=0x%x\n", adpa);
> -
> - adpa |= ADPA_CRT_HOTPLUG_FORCE_TRIGGER;
> -
> - I915_WRITE(crt->adpa_reg, adpa);
> -
> - if (wait_for((I915_READ(crt->adpa_reg) &
> ADPA_CRT_HOTPLUG_FORCE_TRIGGER) == 0,
> - 1000)) {
> - DRM_DEBUG_KMS("timed out waiting for FORCE_TRIGGER");
> - I915_WRITE(crt->adpa_reg, save_adpa);
> - }
> -
> - /* Check the status to see if both blue and green are on now */
> - adpa = I915_READ(crt->adpa_reg);
> - if ((adpa & ADPA_CRT_HOTPLUG_MONITOR_MASK) != 0)
> - ret = true;
> - else
> - ret = false;
> -
> - DRM_DEBUG_KMS("valleyview hotplug adpa=0x%x, result %d\n", adpa,
> ret);
> -
> - return ret;
> -}
> -
> /**
> * Uses CRT_HOTPLUG_EN and CRT_HOTPLUG_STAT to detect CRT presence.
> *
> @@ -366,12 +332,9 @@ static bool intel_crt_detect_hotplug(struct drm_connector
> *connector)
> bool ret = false;
> int i, tries = 0;
>
> - if (HAS_PCH_SPLIT(dev))
> + if (HAS_PCH_SPLIT(dev) || IS_VALLEYVIEW(dev))
> return intel_ironlake_crt_detect_hotplug(connector);
>
> - if (IS_VALLEYVIEW(dev))
> - return valleyview_crt_detect_hotplug(connector);
> -
> /*
> * On 4 series desktop, CRT detect sequence need to be done twice
> * to get a reliable result.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2016-04-20 15:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 16:03 [PATCH 1/3] drm/i915: Do CRT HPD force trigger only when needed ville.syrjala
2016-04-18 16:03 ` [PATCH 2/3] drm/i915: Disable CRT HPD around force trigger ville.syrjala
2016-04-18 16:03 ` [PATCH 3/3] drm/i915: Always power on TX wells before CMN well on VLV ville.syrjala
2016-04-18 16:57 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Do CRT HPD force trigger only when needed Patchwork
2016-04-20 11:17 ` [PATCH 1/3] " Ville Syrjälä
2016-04-20 15:45 ` Lyude [this message]
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=1461167150.18906.2.camel@redhat.com \
--to=cpaul@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.