aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/job.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2019-10-28 13:37:13 +0100
committerThierry Reding <treding@nvidia.com>2019-10-29 15:04:35 +0100
commitaf1cbfb9bf0fe079ca328231451fd4db8b3eafec (patch)
tree136ba6066a4ed6b84181e5850e76dc751aeda168 /drivers/gpu/host1x/job.h
parentgpu: host1x: Allocate gather copy for host1x (diff)
downloadlinux-dev-af1cbfb9bf0fe079ca328231451fd4db8b3eafec.tar.xz
linux-dev-af1cbfb9bf0fe079ca328231451fd4db8b3eafec.zip
gpu: host1x: Support DMA mapping of buffers
If host1x_bo_pin() returns an SG table, create a DMA mapping for the buffer. For buffers that the host1x client has already mapped itself, host1x_bo_pin() returns NULL and the existing DMA address is used. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/job.h')
-rw-r--r--drivers/gpu/host1x/job.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/job.h b/drivers/gpu/host1x/job.h
index 62b8805e6b35..94bc2e4ae241 100644
--- a/drivers/gpu/host1x/job.h
+++ b/drivers/gpu/host1x/job.h
@@ -8,6 +8,8 @@
#ifndef __HOST1X_JOB_H
#define __HOST1X_JOB_H
+#include <linux/dma-direction.h>
+
struct host1x_job_gather {
unsigned int words;
dma_addr_t base;
@@ -19,7 +21,9 @@ struct host1x_job_gather {
struct host1x_job_unpin_data {
struct host1x_bo *bo;
struct sg_table *sgt;
+ struct device *dev;
size_t size;
+ enum dma_data_direction dir;
};
/*