Re: [PATCH 3/3] gpu: host1x: Set DMA direction only for DMA-mapped buffer objects

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

 



04.02.2020 16:59, Thierry Reding пишет:
> From: Thierry Reding <treding@xxxxxxxxxx>
> 
> The DMA direction is only used by the DMA API, so there is no use in
> setting it when a buffer object isn't mapped with the DMA API.
> 
> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
> ---
>  drivers/gpu/host1x/job.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
> index 8198a4d42c77..a10643aa89aa 100644
> --- a/drivers/gpu/host1x/job.c
> +++ b/drivers/gpu/host1x/job.c
> @@ -248,6 +248,7 @@ static unsigned int pin_job(struct host1x *host, struct host1x_job *job)
>  				goto unpin;
>  			}
>  
> +			job->unpins[job->num_unpins].dir = DMA_TO_DEVICE;
>  			job->unpins[job->num_unpins].dev = host->dev;
>  			phys_addr = sg_dma_address(sgt->sgl);
>  		}
> @@ -255,7 +256,6 @@ static unsigned int pin_job(struct host1x *host, struct host1x_job *job)
>  		job->addr_phys[job->num_unpins] = phys_addr;
>  		job->gather_addr_phys[i] = phys_addr;
>  
> -		job->unpins[job->num_unpins].dir = DMA_TO_DEVICE;
>  		job->unpins[job->num_unpins].bo = g->bo;
>  		job->unpins[job->num_unpins].sgt = sgt;
>  		job->num_unpins++;
> 


Reviewed-by: Dmitry Osipenko <digetx@xxxxxxxxx>
_______________________________________________
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