Re: [PATCH 6/7] accel/qaic: Create a function to initialize BO

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

 



On Fri, Sep 01, 2023 at 11:22:46AM -0600, Jeffrey Hugo wrote:
> From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@xxxxxxxxxxx>
> 
> This makes sure that we have a single place to initialize and
> re-initialize BO.
> 
> Use this new API to cleanup release_dbc()
> 
> We will need this for next patch to detach slicing to a BO.
> 
> Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@xxxxxxxxxxx>
> Reviewed-by: Jeffrey Hugo <quic_jhugo@xxxxxxxxxxx>
> Signed-off-by: Jeffrey Hugo <quic_jhugo@xxxxxxxxxxx>
> ---
>  drivers/accel/qaic/qaic_data.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c
> index 6e44e00937af..2acb9dbac88b 100644
> --- a/drivers/accel/qaic/qaic_data.c
> +++ b/drivers/accel/qaic/qaic_data.c
> @@ -635,6 +635,18 @@ static const struct drm_gem_object_funcs qaic_gem_funcs = {
>  	.vm_ops = &drm_vm_ops,
>  };
>  
> +static void qaic_init_bo(struct qaic_bo *bo, bool reinit)
> +{
> +	if (reinit) {
> +		bo->sliced = false;
> +		reinit_completion(&bo->xfer_done);
> +	} else {
> +		init_completion(&bo->xfer_done);
> +	}
> +	complete_all(&bo->xfer_done);
Why do you need complete_all() here ? 

Regards
Stanislaw



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux