From: Daniel Vetter <daniel@ffwll.ch>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/6] drm/i915: Deal with video overlay on GPU reset
Date: Tue, 25 Nov 2014 13:35:50 +0100 [thread overview]
Message-ID: <20141125123550.GE25711@phenom.ffwll.local> (raw)
In-Reply-To: <1416846529-7252-1-git-send-email-ville.syrjala@linux.intel.com>
On Mon, Nov 24, 2014 at 06:28:49PM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Clear the video overlay state on GPU reset. Any pending overlay request
> in the ring has been nuked, and the display itself gets reset. So we
> pretty much lose all state here. Adjust the software state to match so
> that the next "putimage" will restore things to working order.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 2 ++
> drivers/gpu/drm/i915/intel_drv.h | 1 +
> drivers/gpu/drm/i915/intel_overlay.c | 16 ++++++++++++++++
> 3 files changed, 19 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 1e9c136..71be3c9 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -838,6 +838,8 @@ int i915_reset(struct drm_device *dev)
> return ret;
> }
>
> + intel_overlay_reset(dev_priv);
> +
> /* Ok, now get things going again... */
>
> /*
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 25fdbb1..1c38c88 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1083,6 +1083,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data,
> struct drm_file *file_priv);
> int intel_overlay_attrs(struct drm_device *dev, void *data,
> struct drm_file *file_priv);
> +void intel_overlay_reset(struct drm_i915_private *dev_priv);
>
>
> /* intel_panel.c */
> diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
> index dc2f4f2..24501eb 100644
> --- a/drivers/gpu/drm/i915/intel_overlay.c
> +++ b/drivers/gpu/drm/i915/intel_overlay.c
> @@ -422,6 +422,22 @@ static int intel_overlay_release_old_vid(struct intel_overlay *overlay)
> return 0;
> }
>
> +void intel_overlay_reset(struct drm_i915_private *dev_priv)
> +{
> + struct intel_overlay *overlay = dev_priv->overlay;
> +
> + if (!overlay)
> + return;
Some locking checks here would be nice. Since the overlay code currently
holds both dev->struct_mutex and all the modeset locks just a check for
dev->struct_mutex should be good enough. Maybe even add that to
intel_overlay_release_old_vid.
-Daniel
> +
> + intel_overlay_release_old_vid(overlay);
> +
> + overlay->last_flip_req = 0;
> + overlay->old_xscale = 0;
> + overlay->old_yscale = 0;
> + overlay->crtc = NULL;
> + overlay->active = false;
> +}
> +
> struct put_image_params {
> int format;
> short dst_x;
> --
> 2.0.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - 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:[~2014-11-25 12:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 19:54 [PATCH 0/6] drm/i915: Implement gen3/4 GPU reset ville.syrjala
2014-11-21 19:54 ` [PATCH 1/6] drm/i915: Fix gen4 " ville.syrjala
2014-11-22 11:05 ` Chris Wilson
2014-11-24 12:57 ` Ville Syrjälä
2014-11-21 19:54 ` [PATCH 2/6] drm/i915: Restore the display config after a GPU reset on gen4 ville.syrjala
2014-11-21 19:54 ` [PATCH 3/6] drm/i915: Implement GPU reset for 915/945 ville.syrjala
2014-11-25 12:54 ` Daniel Vetter
2014-11-21 19:54 ` [PATCH 4/6] drm/i915: Implement GPU reset for g33 ville.syrjala
2014-11-21 19:54 ` [PATCH 5/6] drm/i915: Grab modeset locks for GPU rest on pre-ctg ville.syrjala
2014-11-21 20:49 ` Daniel Vetter
2014-11-21 21:10 ` Ville Syrjälä
2014-11-24 9:34 ` Daniel Vetter
2014-11-24 13:17 ` Ville Syrjälä
2014-11-24 16:28 ` [PATCH v2 " ville.syrjala
2014-11-21 19:54 ` [PATCH 6/6] drm/i915: Disable crtcs gracefully before GPU reset on gen3/4 ville.syrjala
2014-11-24 10:02 ` [PATCH 6/6] drm/i915: Disable crtcs gracefully before shuang.he
2014-11-24 16:28 ` [PATCH 7/6] drm/i915: Deal with video overlay on GPU reset ville.syrjala
2014-11-25 12:35 ` Daniel Vetter [this message]
2014-11-26 15:07 ` [PATCH v2 " ville.syrjala
2014-11-26 18:10 ` Daniel Vetter
2014-11-27 12:04 ` Dave Gordon
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=20141125123550.GE25711@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox