[PATCH] drm/xe/client: bo->client does not need bos_lock
Nirmoy Das
nirmoy.das at linux.intel.com
Mon Feb 10 13:12:06 UTC 2025
Reviewed-by: Nirmoy Das <nirmoy.das at intel.com>
RB-ed and merged to drm-xe-next.
Thanks
On 2/5/2025 6:10 AM, Tejas Upadhyay wrote:
> bos_lock is to protect list of bos used by client, it is
> not required to protect bo->client so bring it outside of
> bos_lock.
>
> Fixes: b27970f3e11c ("drm/xe: Add tracking support for bos per client")
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
> ---
> drivers/gpu/drm/xe/xe_drm_client.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
> index 63f30b6df70b..2d4874d2b922 100644
> --- a/drivers/gpu/drm/xe/xe_drm_client.c
> +++ b/drivers/gpu/drm/xe/xe_drm_client.c
> @@ -135,8 +135,8 @@ void xe_drm_client_add_bo(struct xe_drm_client *client,
> XE_WARN_ON(bo->client);
> XE_WARN_ON(!list_empty(&bo->client_link));
>
> - spin_lock(&client->bos_lock);
> bo->client = xe_drm_client_get(client);
> + spin_lock(&client->bos_lock);
> list_add_tail(&bo->client_link, &client->bos_list);
> spin_unlock(&client->bos_lock);
> }
More information about the Intel-xe
mailing list