[Intel-gfx] [PATCH 2/7] drm/i915: Don't enable cursors or sprites for fbdev

Daniel Vetter daniel at ffwll.ch
Fri May 24 02:20:21 PDT 2013


On Wed, May 08, 2013 at 12:55:17PM +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Check if the CRTC framebuffer matches the fbdev helper's framebuffer,
> and if it does, doen't enable cursors/sprites.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

This one here had conflicts. But it also feels redundant with patch 3,
since that one should make sure that we won't ever have a cursor/sprite
stuck around forever.

Of course it's a bit ugly since the cursor might flash shortly, but for
now I'll brush that off with our lack of atomic modesetting.

Or did I miss something subtly?
-Daniel
> ---
>  drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 94d6604..cfe2803 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3264,12 +3264,23 @@ static void ironlake_pfit_enable(struct intel_crtc *crtc)
>  	}
>  }
>  
> +static bool fbdev_active_on_crtc(const struct drm_crtc *crtc)
> +{
> +	const struct drm_i915_private *dev_priv = crtc->dev->dev_private;
> +
> +	return dev_priv->fbdev && dev_priv->fbdev->helper.fb == crtc->fb;
> +}
> +
>  static void intel_enable_planes(struct drm_crtc *crtc)
>  {
>  	struct drm_device *dev = crtc->dev;
>  	enum pipe pipe = to_intel_crtc(crtc)->pipe;
>  	struct intel_plane *intel_plane;
>  
> +	/* don't enable sprite planes for fbdev */
> +	if (fbdev_active_on_crtc(crtc))
> +		return;
> +
>  	list_for_each_entry(intel_plane, &dev->mode_config.plane_list, base.head)
>  		if (intel_plane->pipe == pipe)
>  			intel_plane_restore(&intel_plane->base);
> @@ -6522,6 +6533,10 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
>  	u32 base, pos;
>  	bool visible;
>  
> +	/* don't enable cursors for fbdev */
> +	if (on && fbdev_active_on_crtc(crtc))
> +		return;
> +
>  	pos = 0;
>  
>  	if (on && crtc->enabled && crtc->fb) {
> -- 
> 1.8.1.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at 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


More information about the dri-devel mailing list