Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/fb-helper: Disable cursors and planes when restoring fbdev mode
Date: Tue, 4 Jun 2013 11:39:56 +0200	[thread overview]
Message-ID: <20130604093956.GV15743@phenom.ffwll.local> (raw)
In-Reply-To: <1370265042-13969-4-git-send-email-ville.syrjala@linux.intel.com>

On Mon, Jun 03, 2013 at 04:10:42PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Cursors and plane can obscure whatever fbdev wants to show the user.
> Disable them all in drm_fb_helper_restore_fbdev_mode.
> 
> After the cursors and planes have been disabled, user space needs to
> explicitly re-enable them to make them visible again.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Yeah, I like that color ;-) For the series:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/drm_fb_helper.c | 18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 0df0ebb..3d13ca6e2 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -287,13 +287,27 @@ EXPORT_SYMBOL(drm_fb_helper_debug_leave);
>   */
>  bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper)
>  {
> +	struct drm_device *dev = fb_helper->dev;
> +	struct drm_plane *plane;
>  	bool error = false;
> -	int i, ret;
> +	int i;
> +
> +	drm_warn_on_modeset_not_all_locked(dev);
>  
> -	drm_warn_on_modeset_not_all_locked(fb_helper->dev);
> +	list_for_each_entry(plane, &dev->mode_config.plane_list, head)
> +		drm_plane_force_disable(plane);
>  
>  	for (i = 0; i < fb_helper->crtc_count; i++) {
>  		struct drm_mode_set *mode_set = &fb_helper->crtc_info[i].mode_set;
> +		struct drm_crtc *crtc = mode_set->crtc;
> +		int ret;
> +
> +		if (crtc->funcs->cursor_set) {
> +			ret = crtc->funcs->cursor_set(crtc, NULL, 0, 0, 0);
> +			if (ret)
> +				error = true;
> +		}
> +
>  		ret = drm_mode_set_config_internal(mode_set);
>  		if (ret)
>  			error = true;
> -- 
> 1.8.1.5
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

      reply	other threads:[~2013-06-04  9:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 13:10 [PATCH 0/3] drm: fbdev mode restoration improvements v3 ville.syrjala
2013-06-03 13:10 ` [PATCH v2 1/3] drm: Add drm_plane_force_disable() ville.syrjala
2013-06-04  1:37   ` Laurent Pinchart
2013-06-04  7:58     ` [PATCH] drm: Add kernel-doc for plane functions ville.syrjala
2013-06-05  2:13       ` Laurent Pinchart
2013-06-05 11:52         ` Ville Syrjälä
2013-06-05 12:39         ` [PATCH 1/2] drm: Improve drm_crtc documentation ville.syrjala
2013-06-05 12:39           ` [PATCH v2 2/2] drm: Add kernel-doc for plane functions ville.syrjala
2013-06-05 12:56           ` [PATCH 1/2] drm: Improve drm_crtc documentation Alex Deucher
2013-06-03 13:10 ` [PATCH 2/3] drm/vmwgfx: Don't access file_priv in cursor_set when handle==0 ville.syrjala
2013-06-03 14:52   ` Jakob Bornecrantz
2013-06-03 13:10 ` [PATCH 3/3] drm/fb-helper: Disable cursors and planes when restoring fbdev mode ville.syrjala
2013-06-04  9:39   ` Daniel Vetter [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=20130604093956.GV15743@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --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