I made a patch as attached. I'm not sure how to make patch as your proposal, Could you make a
patch for that if mine isn't enough? On 2019年04月24日 15:12, Christian König
wrote:
|
>From 184941165665d80ad1992179e7652d7e4d739b2e Mon Sep 17 00:00:00 2001 From: Chunming Zhou <david1.zhou@xxxxxxx> Date: Wed, 24 Apr 2019 11:35:29 +0800 Subject: [PATCH] ttm: return EBUSY to user EBUSY means there is no idle BO on LRU which can be evicted, the error is meaningful to user. Change-Id: I3857c4b99859c9d2f354cf2c486dbacb8520d0ed Signed-off-by: Chunming Zhou <david1.zhou@xxxxxxx> --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 7c484729f9b2..dce90053f29e 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1000,7 +1000,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, return -EINVAL; } - return (has_erestartsys) ? -ERESTARTSYS : -ENOMEM; + return ret == -EBUSY ? ret : (has_erestartsys) ? -ERESTARTSYS : -ENOMEM; } EXPORT_SYMBOL(ttm_bo_mem_space); -- 2.17.1
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel