[PATCH 1/8] drm/ttm: add operation ctx to ttm_bo_validate v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 17, 2017 at 11:49:28AM +0100, Christian König wrote:
> Give moving a BO into place an operation context to work with.
> 
> v2: rebased
> 
> Signed-off-by: Christian König <christian.koenig at amd.com>
> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
> diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
> index 833c3ad24091..097951e999bc 100644
> --- a/include/drm/ttm/ttm_bo_api.h
> +++ b/include/drm/ttm/ttm_bo_api.h
> @@ -259,6 +259,20 @@ struct ttm_bo_kmap_obj {
>  };
>  
>  /**
> + * struct ttm_operation_ctx
> + *
> + * @interruptible: Sleep interruptible if sleeping.
> + * @no_wait_gpu: Return immediately if the GPU is busy.
> + *
> + * Context for TTM operations like changing buffer placement or general memory
> + * allocation.
> + */
> +struct ttm_operation_ctx {
> +	bool interruptible;
> +	bool no_wait_gpu;

Random drive-by comment without looking at how this would work out, but
maybe embed the ww_acquire_ctx in here too? That's at least the design we
ended up with on the kms side for a (at a quick glance) fairly similar
problem. See struct drm_modeset_acquire_ctx.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux