Re: [PATCH 3/7] drm/ttm: allow reserve more than one shared slot

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

 



The shortlog should say "allow reserving more than one shared fence
slot", same as patch 2.


On 2018-09-24 1:58 p.m., Christian König wrote:
> Let's support simultaneous submissions to multiple engines.
> 
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>
> ---
>  drivers/gpu/drm/ttm/ttm_execbuf_util.c | 6 ++++--
>  include/drm/ttm/ttm_execbuf_util.h     | 2 +-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> index e493edb0d3e7..9b842884530a 100644
> --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> @@ -129,7 +129,8 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,
>  			if (!entry->shared)
>  				continue;
>  
> -			ret = reservation_object_reserve_shared(bo->resv, 1);
> +			ret = reservation_object_reserve_shared(bo->resv,
> +								entry->shared);
>  			if (!ret)
>  				continue;
>  		}
> @@ -151,7 +152,8 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket,
>  		}
>  
>  		if (!ret && entry->shared)
> -			ret = reservation_object_reserve_shared(bo->resv, 1);
> +			ret = reservation_object_reserve_shared(bo->resv,
> +								entry->shared);
>  
>  		if (unlikely(ret != 0)) {
>  			if (ret == -EINTR)
> diff --git a/include/drm/ttm/ttm_execbuf_util.h b/include/drm/ttm/ttm_execbuf_util.h
> index b0fdd1980034..3b16dda9bd08 100644
> --- a/include/drm/ttm/ttm_execbuf_util.h
> +++ b/include/drm/ttm/ttm_execbuf_util.h
> @@ -46,7 +46,7 @@
>  struct ttm_validate_buffer {
>  	struct list_head head;
>  	struct ttm_buffer_object *bo;
> -	bool shared;
> +	unsigned int shared;
>  };
>  
>  /**
> 

It would be better to change the name of the field to something more
descriptive, e.g. "num_shared_fence_contexts", and fix up all users
accordingly in this patch (which will get rid of one hunk in patch 4).


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




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

  Powered by Linux