diff options
author | Mikko Perttunen <mperttunen@nvidia.com> | 2021-03-29 16:38:27 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-03-30 19:37:20 +0200 |
commit | a24f98176d1efae2c37d3438c57a624d530d9c33 (patch) | |
tree | 47144591cb2d725eb77c59aaaa2103eb06b8892b /include/linux/host1x.h | |
parent | f8fb97c915954fc6de6513cdf277103b5c6df7b3 (diff) | |
download | linux-stable-a24f98176d1efae2c37d3438c57a624d530d9c33.tar.gz linux-stable-a24f98176d1efae2c37d3438c57a624d530d9c33.tar.bz2 linux-stable-a24f98176d1efae2c37d3438c57a624d530d9c33.zip |
gpu: host1x: Use different lock classes for each client
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>
Diffstat (limited to 'include/linux/host1x.h')
-rw-r--r-- | include/linux/host1x.h | 9 |
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); |