summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-10-25 12:56:09 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-29 14:02:15 -0400
commit4d2d890c01b94d10ad55643a4c2c159a98419efe (patch)
tree1043316e5e0dc163da79ae17c089b7818dc54d4b /drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h
parenta681c505c96dba58231ac050e4c8f4f81d79540f (diff)
gpu: nvgpu: Move ctxsw_trace_gk20a.c to common/linux
Migrate ctxsw_trace_gk20a.c to common/linux/ctxsw_trace.c. This has been done becasue the ctxsw tracing code is currently too tightly tied to the Linux OS due to usage of a couple system calls: - poll() - mmap() And general Linux driver framework code. As a result pulling the logic out of the FECS tracing code is simply too large a scope for time time being. Instead the code was just copied as much as possible. The HAL ops for the FECS code was hidden behind the FECS tracing config so that the vm_area_struct is not used when QNX does not define said config. All other non-HAL functions called by the FECS ctxsw tracing code ha now also been hidden by this config. This is not pretty but for the time being it seems like the way to go. JIRA NVGPU-287 Change-Id: Ib880ab237f4abd330dc66998692c86c4507149c2 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1586547 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h
index b270581b..dddb8603 100644
--- a/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/ctxsw_trace_gk20a.h
@@ -23,6 +23,8 @@
23#ifndef __CTXSW_TRACE_GK20A_H 23#ifndef __CTXSW_TRACE_GK20A_H
24#define __CTXSW_TRACE_GK20A_H 24#define __CTXSW_TRACE_GK20A_H
25 25
26#include <nvgpu/types.h>
27
26#define GK20A_CTXSW_TRACE_NUM_DEVS 1 28#define GK20A_CTXSW_TRACE_NUM_DEVS 1
27 29
28struct file; 30struct file;
@@ -41,20 +43,22 @@ int gk20a_ctxsw_dev_release(struct inode *inode, struct file *filp);
41int gk20a_ctxsw_dev_open(struct inode *inode, struct file *filp); 43int gk20a_ctxsw_dev_open(struct inode *inode, struct file *filp);
42long gk20a_ctxsw_dev_ioctl(struct file *filp, 44long gk20a_ctxsw_dev_ioctl(struct file *filp,
43 unsigned int cmd, unsigned long arg); 45 unsigned int cmd, unsigned long arg);
44ssize_t gk20a_ctxsw_dev_read(struct file *, char __user *, size_t, loff_t *); 46ssize_t gk20a_ctxsw_dev_read(struct file *filp, char __user *buf,
45unsigned int gk20a_ctxsw_dev_poll(struct file *, struct poll_table_struct *); 47 size_t size, loff_t *offs);
46int gk20a_ctxsw_dev_mmap(struct file *, struct vm_area_struct *); 48unsigned int gk20a_ctxsw_dev_poll(struct file *filp,
49 struct poll_table_struct *pts);
50int gk20a_ctxsw_dev_mmap(struct file *filp, struct vm_area_struct *vma);
47int gk20a_ctxsw_dev_ring_alloc(struct gk20a *g, void **buf, size_t *size); 51int gk20a_ctxsw_dev_ring_alloc(struct gk20a *g, void **buf, size_t *size);
48int gk20a_ctxsw_dev_ring_free(struct gk20a *g); 52int gk20a_ctxsw_dev_ring_free(struct gk20a *g);
49int gk20a_ctxsw_dev_mmap_buffer(struct gk20a *g, struct vm_area_struct *vma); 53int gk20a_ctxsw_dev_mmap_buffer(struct gk20a *g, struct vm_area_struct *vma);
50 54
51int gk20a_ctxsw_trace_init(struct gk20a *); 55int gk20a_ctxsw_trace_init(struct gk20a *g);
52void gk20a_ctxsw_trace_cleanup(struct gk20a *); 56void gk20a_ctxsw_trace_cleanup(struct gk20a *g);
53int gk20a_ctxsw_trace_write(struct gk20a *, struct nvgpu_ctxsw_trace_entry *); 57int gk20a_ctxsw_trace_write(struct gk20a *g,
58 struct nvgpu_ctxsw_trace_entry *entry);
54void gk20a_ctxsw_trace_wake_up(struct gk20a *g, int vmid); 59void gk20a_ctxsw_trace_wake_up(struct gk20a *g, int vmid);
55 60
56void gk20a_ctxsw_trace_channel_reset(struct gk20a *g, struct channel_gk20a *ch); 61void gk20a_ctxsw_trace_channel_reset(struct gk20a *g, struct channel_gk20a *ch);
57void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg); 62void gk20a_ctxsw_trace_tsg_reset(struct gk20a *g, struct tsg_gk20a *tsg);
58 63
59
60#endif /* __CTXSW_TRACE_GK20A_H */ 64#endif /* __CTXSW_TRACE_GK20A_H */