]> git.baikalelectronics.ru Git - kernel.git/commit
gpu: host1x: Detach driver on unregister
authorThierry Reding <treding@nvidia.com>
Wed, 8 Apr 2020 17:38:02 +0000 (19:38 +0200)
committerThierry Reding <treding@nvidia.com>
Tue, 16 Jun 2020 16:59:46 +0000 (18:59 +0200)
commitcd763a00d133dd6277523bc14237dd56e1116c28
tree25a18dd6b0aad620d1fe65f190258b7ef2d8e0f1
parent19610eb5137537ac3114a3528ce101df75235ba3
gpu: host1x: Detach driver on unregister

Currently when a host1x device driver is unregistered, it is not
detached from the host1x controller, which means that the device
will stay around and when the driver is registered again, it may
bind to the old, stale device rather than the new one that was
created from scratch upon driver registration. This in turn can
cause various weird crashes within the driver core because it is
confronted with a device that was already deleted.

Fix this by detaching the driver from the host1x controller when
it is unregistered. This ensures that the deleted device also is
no longer present in the device list that drivers will bind to.

Reported-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/bus.c