From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Remove vblank wait from haswell_write_eld
Date: Wed, 16 Apr 2014 18:53:09 +0300 [thread overview]
Message-ID: <20140416155309.GK18465@intel.com> (raw)
In-Reply-To: <1397660169-4964-1-git-send-email-daniel.vetter@ffwll.ch>
On Wed, Apr 16, 2014 at 04:56:09PM +0200, Daniel Vetter wrote:
> The pipe is off at that point in time, so a vblank wait is simply a
> 50ms wait. Caught by Jesse's verbose "make vblank wait timeouts WARN"
> patch. We've probably had a few versions of this float around already.
>
> To document assumptions put a pipe assert into the same place. And
> also add a posting read.
>
> If we ever decide to update the eld and infoframes while the pipe is
> already on (e.g. for fastboot) then there's lots of work to do. So
> better properly document all the hidden assumptions.
IIRC the docs might say that eld (or some audio stuff) can't be enabled
until one or two vblanks after the pipe has been enabled (or something
to that effect). So we're probably doing it all wrong and we should
move the audio stuff to some vblank work thingy eventually.
But as this is currently done while the pipe is off, the vblank wait
is just a nop, and so we should just kill it.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/intel_display.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 8b623a623f9c..82ad84eefc8d 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7371,7 +7371,6 @@ static void haswell_write_eld(struct drm_connector *connector,
> {
> struct drm_i915_private *dev_priv = connector->dev->dev_private;
> uint8_t *eld = connector->eld;
> - struct drm_device *dev = crtc->dev;
> uint32_t eldv;
> uint32_t i;
> int len;
> @@ -7388,9 +7387,9 @@ static void haswell_write_eld(struct drm_connector *connector,
> tmp = I915_READ(aud_cntrl_st2);
> tmp |= (AUDIO_OUTPUT_ENABLE_A << (pipe * 4));
> I915_WRITE(aud_cntrl_st2, tmp);
> + POSTING_READ(aud_cntrl_st2);
>
> - /* Wait for 1 vertical blank */
> - intel_wait_for_vblank(dev, pipe);
> + assert_pipe_disabled(dev_priv, to_intel_crtc(crtc)->pipe);
>
> /* Set ELD valid state */
> tmp = I915_READ(aud_cntrl_st2);
> --
> 1.8.4.rc3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
prev parent reply other threads:[~2014-04-16 15:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-16 14:56 [PATCH] drm/i915: Remove vblank wait from haswell_write_eld Daniel Vetter
2014-04-16 15:53 ` Ville Syrjälä [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=20140416155309.GK18465@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
/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