[Intel-gfx] [PATCH] drm/i915: Combine pinning with setting to the display plane

Daniel Vetter daniel at ffwll.ch
Sat Apr 16 12:52:35 CEST 2011


On Sat, Apr 16, 2011 at 07:27:31AM +0100, Chris Wilson wrote:
> We need to perform a few operations in order to move the object into the
> display plane (where it can be accessed coherently by the display
> engine) that are important for future safety to forbid whilst pinned. As a
> result, we want to need to perform some of the operations before pinning,
> but some are required once we have been bound into the GTT. So combine
> the pinning performed by all the callers with set_to_display_plane(), so
> this complication is contained within the single function.

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

One small comment-nitpick below.

> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 7271956..c73eeaf 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3095,40 +3095,55 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj,
>  }
>  
>  /*
> - * Prepare buffer for display plane. Use uninterruptible for possible flush
> - * wait, as in modesetting process we're not supposed to be interrupted.
> + * Prepare buffer for display plane (scanout, cursors, etc).
> + * Expects to be called from an uninterruptible phase (modesetting) and allows

Shouldn't that be "Can be called from uninterruptible ..." At least that's
the case for cursor setting and I think we could also change the pageflip
code to interruptible. User will then only see the old screen if we
interrupt and bail out, not a dying scanout engine.
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list