summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2021-03-29 16:38:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-16 12:43:20 +0300
commit9576dd89554e39f1c6dcb377ff2a961269d2eaac (patch)
treec9def14e8e0752736e1beafe00355775cf9fbad2 /include
parent39af2f472f21b4cdcfe9a7289856bec8b6498143 (diff)
downloadlinux-9576dd89554e39f1c6dcb377ff2a961269d2eaac.tar.xz
gpu: host1x: Use different lock classes for each client
[ Upstream commit a24f98176d1efae2c37d3438c57a624d530d9c33 ] To avoid false lockdep warnings, give each client lock a different lock class, passed from the initialization site by macro. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/host1x.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/host1x.h b/include/linux/host1x.h
index ce59a6a6a008..9eb77c87a83b 100644
--- a/include/linux/host1x.h
+++ b/include/linux/host1x.h
@@ -320,7 +320,14 @@ static inline struct host1x_device *to_host1x_device(struct device *dev)
int host1x_device_init(struct host1x_device *device);
int host1x_device_exit(struct host1x_device *device);
-int host1x_client_register(struct host1x_client *client);
+int __host1x_client_register(struct host1x_client *client,
+ struct lock_class_key *key);
+#define host1x_client_register(class) \
+ ({ \
+ static struct lock_class_key __key; \
+ __host1x_client_register(class, &__key); \
+ })
+
int host1x_client_unregister(struct host1x_client *client);
int host1x_client_suspend(struct host1x_client *client);