summary refs log tree commit diff
path: root/drivers/gpu/host1x/dev.h
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2017-06-15 02:18:42 +0300
committerThierry Reding <treding@nvidia.com>2017-06-15 14:25:38 +0200
commit8474b02531c4881a762c52ef869c52429e38633f (patch)
tree41cdb37fa4e424170bd7670e07ca0981c9f6c81f /drivers/gpu/host1x/dev.h
parent03f0de770eda7a3f2e3950ca9f15d73e1dfd4596 (diff)
downloadlinux-8474b02531c4881a762c52ef869c52429e38633f.tar.gz
gpu: host1x: Refactor channel allocation code
This is largely a rewrite of the Host1x channel allocation code, bringing
several changes:

- The previous code could deadlock due to an interaction
  between the 'reflock' mutex and CDMA timeout handling.
  This gets rid of the mutex.
- Support for more than 32 channels, required for Tegra186
- General refactoring, including better encapsulation
  of channel ownership handling into channel.c

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/dev.h')
-rw-r--r--drivers/gpu/host1x/dev.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/host1x/dev.h b/drivers/gpu/host1x/dev.h
index 229d08b6a45e..ffdbc15b749b 100644
--- a/drivers/gpu/host1x/dev.h
+++ b/drivers/gpu/host1x/dev.h
@@ -129,10 +129,8 @@ struct host1x {
 	struct host1x_syncpt *nop_sp;
 
 	struct mutex syncpt_mutex;
-	struct mutex chlist_mutex;
-	struct host1x_channel chlist;
-	unsigned long allocated_channels;
-	unsigned int num_allocated_channels;
+
+	struct host1x_channel_list channel_list;
 
 	struct dentry *debugfs;