UPSTREAM: 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.

Change-Id: Iacfb5683a0ed975911459f43258c4704d8e7fd9c
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2545955
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Mikko Perttunen
2021-03-29 16:38:27 +03:00
committed by Laxman Dewangan
parent 558557ab02
commit 44c9f6b676

View File

@@ -705,8 +705,9 @@ void host1x_driver_unregister(struct host1x_driver *driver)
EXPORT_SYMBOL(host1x_driver_unregister);
/**
* host1x_client_register() - register a host1x client
* __host1x_client_register() - register a host1x client
* @client: host1x client
* @key: lock class key for the client-specific mutex
*
* Registers a host1x client with each host1x controller instance. Note that
* each client will only match their parent host1x controller and will only be
@@ -716,7 +717,7 @@ EXPORT_SYMBOL(host1x_driver_unregister);
* &host1x_client_ops.init implementation.
*/
int __host1x_client_register(struct host1x_client *client,
struct lock_class_key *key)
struct lock_class_key *key)
{
struct host1x *host1x;
int err;