Re: [Intel-gfx] [PATCH v9 44/70] drm/i915/selftests: Prepare context tests for obj->mm.lock removal.

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

 



On Tue, Mar 23, 2021 at 04:50:33PM +0100, Maarten Lankhorst wrote:
> Straightforward conversion, just convert a bunch of calls to
> unlocked versions.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> Reviewed-by: Thomas Hellström <thomas.hellstrom@xxxxxxxxxxxxxxx>

Another one where I just picked your old version:

https://lore.kernel.org/intel-gfx/20210128162612.927917-45-maarten.lankhorst@xxxxxxxxxxxxxxx/

There was some functional changes in the test, so I figured that's the
safer path.
-Daniel

> ---
>  drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> index df949320f2b5..82d5d37e9b66 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
> @@ -1092,7 +1092,7 @@ __read_slice_count(struct intel_context *ce,
>  	if (ret < 0)
>  		return ret;
>  
> -	buf = i915_gem_object_pin_map(obj, I915_MAP_WB);
> +	buf = i915_gem_object_pin_map_unlocked(obj, I915_MAP_WB);
>  	if (IS_ERR(buf)) {
>  		ret = PTR_ERR(buf);
>  		return ret;
> @@ -1509,7 +1509,7 @@ static int write_to_scratch(struct i915_gem_context *ctx,
>  	if (IS_ERR(obj))
>  		return PTR_ERR(obj);
>  
> -	cmd = i915_gem_object_pin_map(obj, I915_MAP_WB);
> +	cmd = i915_gem_object_pin_map_unlocked(obj, I915_MAP_WB);
>  	if (IS_ERR(cmd)) {
>  		err = PTR_ERR(cmd);
>  		goto out;
> @@ -1620,7 +1620,7 @@ static int read_from_scratch(struct i915_gem_context *ctx,
>  		if (err)
>  			goto out_vm;
>  
> -		cmd = i915_gem_object_pin_map(obj, I915_MAP_WC);
> +		cmd = i915_gem_object_pin_map_unlocked(obj, I915_MAP_WC);
>  		if (IS_ERR(cmd)) {
>  			err = PTR_ERR(cmd);
>  			goto out;
> @@ -1656,7 +1656,7 @@ static int read_from_scratch(struct i915_gem_context *ctx,
>  		if (err)
>  			goto out_vm;
>  
> -		cmd = i915_gem_object_pin_map(obj, I915_MAP_WC);
> +		cmd = i915_gem_object_pin_map_unlocked(obj, I915_MAP_WC);
>  		if (IS_ERR(cmd)) {
>  			err = PTR_ERR(cmd);
>  			goto out;
> @@ -1715,7 +1715,7 @@ static int read_from_scratch(struct i915_gem_context *ctx,
>  	}
>  	i915_request_put(rq);
>  
> -	cmd = i915_gem_object_pin_map(obj, I915_MAP_WC);
> +	cmd = i915_gem_object_pin_map_unlocked(obj, I915_MAP_WC);
>  	if (IS_ERR(cmd)) {
>  		err = PTR_ERR(cmd);
>  		goto out_vm;
> -- 
> 2.31.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux