Skip to content

Commit ab4f81b

Browse files
committed
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: Thierry Reding <treding@nvidia.com>
1 parent 44156ee commit ab4f81b

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎drivers/gpu/drm/tegra/drm.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ static int host1x_reloc_copy_from_user(struct host1x_reloc *dest,
149149
if (err < 0)
150150
return err;
151151

152+
dest->flags = HOST1X_RELOC_READ | HOST1X_RELOC_WRITE;
153+
152154
dest->cmdbuf.bo = host1x_bo_lookup(file, cmdbuf);
153155
if (!dest->cmdbuf.bo)
154156
return -ENOENT;

‎include/linux/host1x.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ int host1x_job_submit(struct host1x_job *job);
173173
* host1x job
174174
*/
175175

176+
#define HOST1X_RELOC_READ (1 << 0)
177+
#define HOST1X_RELOC_WRITE (1 << 1)
178+
176179
struct host1x_reloc {
177180
struct {
178181
struct host1x_bo *bo;
@@ -183,6 +186,7 @@ struct host1x_reloc {
183186
unsigned long offset;
184187
} target;
185188
unsigned long shift;
189+
unsigned long flags;
186190
};
187191

188192
struct host1x_job {

0 commit comments

Comments
 (0)