提交 ab4f81bf 编写于 作者: T Thierry Reding

gpu: host1x: Add direction flags to relocations

Add direction flags to host1x relocations performed during job pinning.
These flags indicate the kinds of accesses that hardware is allowed to
perform on the relocated buffers.
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 44156eee
...@@ -149,6 +149,8 @@ static int host1x_reloc_copy_from_user(struct host1x_reloc *dest, ...@@ -149,6 +149,8 @@ static int host1x_reloc_copy_from_user(struct host1x_reloc *dest,
if (err < 0) if (err < 0)
return err; return err;
dest->flags = HOST1X_RELOC_READ | HOST1X_RELOC_WRITE;
dest->cmdbuf.bo = host1x_bo_lookup(file, cmdbuf); dest->cmdbuf.bo = host1x_bo_lookup(file, cmdbuf);
if (!dest->cmdbuf.bo) if (!dest->cmdbuf.bo)
return -ENOENT; return -ENOENT;
......
...@@ -173,6 +173,9 @@ int host1x_job_submit(struct host1x_job *job); ...@@ -173,6 +173,9 @@ int host1x_job_submit(struct host1x_job *job);
* host1x job * host1x job
*/ */
#define HOST1X_RELOC_READ (1 << 0)
#define HOST1X_RELOC_WRITE (1 << 1)
struct host1x_reloc { struct host1x_reloc {
struct { struct {
struct host1x_bo *bo; struct host1x_bo *bo;
...@@ -183,6 +186,7 @@ struct host1x_reloc { ...@@ -183,6 +186,7 @@ struct host1x_reloc {
unsigned long offset; unsigned long offset;
} target; } target;
unsigned long shift; unsigned long shift;
unsigned long flags;
}; };
struct host1x_job { struct host1x_job {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册