Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+6
+2
drivers/gpu/drm/tegra/drm.c
··· 149 149 if (err < 0) 150 150 return err; 151 151 152 + dest->flags = HOST1X_RELOC_READ | HOST1X_RELOC_WRITE; 153 + 152 154 dest->cmdbuf.bo = host1x_bo_lookup(file, cmdbuf); 153 155 if (!dest->cmdbuf.bo) 154 156 return -ENOENT;
+4
include/linux/host1x.h
··· 173 173 * host1x job 174 174 */ 175 175 176 + #define HOST1X_RELOC_READ (1 << 0) 177 + #define HOST1X_RELOC_WRITE (1 << 1) 178 + 176 179 struct host1x_reloc { 177 180 struct { 178 181 struct host1x_bo *bo; ··· 186 183 unsigned long offset; 187 184 } target; 188 185 unsigned long shift; 186 + unsigned long flags; 189 187 }; 190 188 191 189 struct host1x_job {