Commit 98ae41ad authored by Thierry Reding's avatar Thierry Reding

gpu: host1x: Set DMA direction only for DMA-mapped buffer objects

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: default avatarThierry Reding <treding@nvidia.com>
Tested-by: default avatarDmitry Osipenko <digetx@gmail.com>
Reviewed-by: default avatarDmitry Osipenko <digetx@gmail.com>
parent 273da5a0
...@@ -248,6 +248,7 @@ static unsigned int pin_job(struct host1x *host, struct host1x_job *job) ...@@ -248,6 +248,7 @@ static unsigned int pin_job(struct host1x *host, struct host1x_job *job)
goto unpin; goto unpin;
} }
job->unpins[job->num_unpins].dir = DMA_TO_DEVICE;
job->unpins[job->num_unpins].dev = host->dev; job->unpins[job->num_unpins].dev = host->dev;
phys_addr = sg_dma_address(sgt->sgl); phys_addr = sg_dma_address(sgt->sgl);
} }
...@@ -255,7 +256,6 @@ static unsigned int pin_job(struct host1x *host, struct host1x_job *job) ...@@ -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->addr_phys[job->num_unpins] = phys_addr;
job->gather_addr_phys[i] = 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].bo = g->bo;
job->unpins[job->num_unpins].sgt = sgt; job->unpins[job->num_unpins].sgt = sgt;
job->num_unpins++; job->num_unpins++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment