summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.h
diff options
context:
space:
mode:
authorAingara Paramakuru <aparamakuru@nvidia.com>2016-02-22 12:35:49 -0500
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-03-15 19:23:44 -0400
commit2a58d3c27b45ca9d0d9dc2136377b7a41b9ed82d (patch)
tree9d7464bfd0eea8e4b65f591996db59a98f4070e2 /drivers/gpu/nvgpu/gk20a/gk20a.h
parentf07a046a52e7a8074bd1572a12ac65747d3f827d (diff)
gpu: nvgpu: improve channel interleave support
Previously, only "high" priority bare channels were interleaved between all other bare channels and TSGs. This patch decouples priority from interleaving and introduces 3 levels for interleaving a bare channel or TSG: high, medium, and low. The levels define the number of times a channel or TSG will appear on a runlist (see nvgpu.h for details). By default, all bare channels and TSGs are set to interleave level low. Userspace can then request the interleave level to be increased via the CHANNEL_SET_RUNLIST_INTERLEAVE ioctl (TSG-specific ioctl will be added later). As timeslice settings will soon be coming from userspace, the default timeslice for "high" priority channels has been restored. JIRA VFND-1302 Bug 1729664 Change-Id: I178bc1cecda23f5002fec6d791e6dcaedfa05c0c Signed-off-by: Aingara Paramakuru <aparamakuru@nvidia.com> Reviewed-on: http://git-master/r/1014962 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index afdbeef7..faccf04a 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -54,8 +54,6 @@ struct acr_gm20b;
54 32 ns is the resolution of ptimer. */ 54 32 ns is the resolution of ptimer. */
55#define PTIMER_REF_FREQ_HZ 31250000 55#define PTIMER_REF_FREQ_HZ 31250000
56 56
57#define MAX_INTERLEAVED_CHANNELS 32
58
59struct cooling_device_gk20a { 57struct cooling_device_gk20a {
60 struct thermal_cooling_device *gk20a_cooling_dev; 58 struct thermal_cooling_device *gk20a_cooling_dev;
61 unsigned int gk20a_freq_state; 59 unsigned int gk20a_freq_state;
@@ -268,6 +266,9 @@ struct gpu_ops {
268 u32 (*get_num_fifos)(struct gk20a *g); 266 u32 (*get_num_fifos)(struct gk20a *g);
269 u32 (*get_pbdma_signature)(struct gk20a *g); 267 u32 (*get_pbdma_signature)(struct gk20a *g);
270 int (*channel_set_priority)(struct channel_gk20a *ch, u32 priority); 268 int (*channel_set_priority)(struct channel_gk20a *ch, u32 priority);
269 int (*set_runlist_interleave)(struct gk20a *g, u32 id,
270 bool is_tsg, u32 runlist_id,
271 u32 new_level);
271 } fifo; 272 } fifo;
272 struct pmu_v { 273 struct pmu_v {
273 /*used for change of enum zbc update cmd id from ver 0 to ver1*/ 274 /*used for change of enum zbc update cmd id from ver 0 to ver1*/
@@ -536,10 +537,7 @@ struct gk20a {
536 u32 timeslice_low_priority_us; 537 u32 timeslice_low_priority_us;
537 u32 timeslice_medium_priority_us; 538 u32 timeslice_medium_priority_us;
538 u32 timeslice_high_priority_us; 539 u32 timeslice_high_priority_us;
539 u32 interleave_high_priority; 540 u32 runlist_interleave;
540
541 struct mutex interleave_lock;
542 u32 num_interleaved_channels;
543 541
544 bool slcg_enabled; 542 bool slcg_enabled;
545 bool blcg_enabled; 543 bool blcg_enabled;
@@ -564,7 +562,7 @@ struct gk20a {
564 struct dentry *debugfs_timeslice_low_priority_us; 562 struct dentry *debugfs_timeslice_low_priority_us;
565 struct dentry *debugfs_timeslice_medium_priority_us; 563 struct dentry *debugfs_timeslice_medium_priority_us;
566 struct dentry *debugfs_timeslice_high_priority_us; 564 struct dentry *debugfs_timeslice_high_priority_us;
567 struct dentry *debugfs_interleave_high_priority; 565 struct dentry *debugfs_runlist_interleave;
568 566
569#endif 567#endif
570 struct gk20a_ctxsw_ucode_info ctxsw_ucode_info; 568 struct gk20a_ctxsw_ucode_info ctxsw_ucode_info;