19952f691SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 26579324aSTerje Bergstrom /* 36579324aSTerje Bergstrom * Tegra host1x Job 46579324aSTerje Bergstrom * 56579324aSTerje Bergstrom * Copyright (c) 2011-2013, NVIDIA Corporation. 66579324aSTerje Bergstrom */ 76579324aSTerje Bergstrom 86579324aSTerje Bergstrom #ifndef __HOST1X_JOB_H 96579324aSTerje Bergstrom #define __HOST1X_JOB_H 106579324aSTerje Bergstrom 11af1cbfb9SThierry Reding #include <linux/dma-direction.h> 12af1cbfb9SThierry Reding 136579324aSTerje Bergstrom struct host1x_job_gather { 14326bbd79SThierry Reding unsigned int words; 156579324aSTerje Bergstrom dma_addr_t base; 166579324aSTerje Bergstrom struct host1x_bo *bo; 17326bbd79SThierry Reding unsigned int offset; 186579324aSTerje Bergstrom bool handled; 196579324aSTerje Bergstrom }; 206579324aSTerje Bergstrom 21e902585fSMikko Perttunen struct host1x_job_wait { 22e902585fSMikko Perttunen u32 id; 23e902585fSMikko Perttunen u32 threshold; 24e902585fSMikko Perttunen u32 next_class; 25e902585fSMikko Perttunen bool relative; 26e902585fSMikko Perttunen }; 27e902585fSMikko Perttunen 28e902585fSMikko Perttunen struct host1x_job_cmd { 29e902585fSMikko Perttunen bool is_wait; 30e902585fSMikko Perttunen 31e902585fSMikko Perttunen union { 32e902585fSMikko Perttunen struct host1x_job_gather gather; 33e902585fSMikko Perttunen struct host1x_job_wait wait; 34e902585fSMikko Perttunen }; 35e902585fSMikko Perttunen }; 36e902585fSMikko Perttunen 376579324aSTerje Bergstrom struct host1x_job_unpin_data { 38*c6aeaf56SThierry Reding struct host1x_bo_mapping *map; 396579324aSTerje Bergstrom }; 406579324aSTerje Bergstrom 416579324aSTerje Bergstrom /* 426579324aSTerje Bergstrom * Dump contents of job to debug output. 436579324aSTerje Bergstrom */ 446579324aSTerje Bergstrom void host1x_job_dump(struct device *dev, struct host1x_job *job); 456579324aSTerje Bergstrom 466579324aSTerje Bergstrom #endif 47