From: Jani Nikula <jani.nikula@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Use drm_crtc_vblank_wait_one_vblank instead the legacy one.
Date: Thu, 04 Aug 2016 10:38:02 +0300 [thread overview]
Message-ID: <87lh0doug5.fsf@intel.com> (raw)
In-Reply-To: <1470259054-23444-1-git-send-email-rodrigo.vivi@intel.com>
On Thu, 04 Aug 2016, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> No functional change.
>
> This is the last user of legacy function so we will be able
> to clean up drm_irq.c a bit.
>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/intel_drv.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 50cdc89..37a3ae8 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1202,7 +1202,10 @@ intel_crtc_has_dp_encoder(const struct intel_crtc_state *crtc_state)
> static inline void
> intel_wait_for_vblank(struct drm_device *dev, int pipe)
> {
> - drm_wait_one_vblank(dev, pipe);
> + struct drm_i915_private *dev_priv = to_i915(dev);
> + struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe];
> +
> + drm_crtc_wait_one_vblank(crtc);
With these changes, in almost all intel_wait_for_vblank() call paths
we'll have crtc available, so we end up calling
intel_wait_for_vblank(intel_crtc->pipe), which will then be converted
back to drm_crtc via dev_priv->pipe_to_crtc_mapping[pipe], and again to
pipe using drm_crtc_index(crtc)...
I'm tempted to say we should *first* replace all intel_wait_for_vblank()
calls with drm_crtc_wait_one_vblank() where possible. After that, we
might just call
drm_crtc_wait_one_vblank(dev_priv->pipe_to_crtc_mapping[pipe])
everywhere else.
BR,
Jani.
> }
> static inline void
> intel_wait_for_vblank_if_active(struct drm_device *dev, int pipe)
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-08-04 7:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 21:17 [PATCH 1/2] drm/i915: Use drm_crtc_vblank_wait_one_vblank instead the legacy one Rodrigo Vivi
2016-08-03 21:17 ` [PATCH 2/2] drm: Remove legacy drm_wait_one_vblank(dev, pipe) Rodrigo Vivi
2016-08-04 5:40 ` ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915: Use drm_crtc_vblank_wait_one_vblank instead the legacy one Patchwork
2016-08-04 7:38 ` Jani Nikula [this message]
2016-08-04 7:52 ` [PATCH 1/2] " 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=87lh0doug5.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@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