]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/tegra: Properly cleanup and zero out resources
authorThierry Reding <treding@nvidia.com>
Mon, 14 Oct 2013 12:06:02 +0000 (14:06 +0200)
committerThierry Reding <treding@nvidia.com>
Wed, 16 Oct 2013 18:02:59 +0000 (20:02 +0200)
commitc0fc4e8db1d1cae4d06923281b38489c823bbb81
tree62a5882eb9ea6ab7d913a99a7a2c5db607f5a164
parentd1db66149d8bc2b8ce89f9cf6ab601bf01ab5e00
drm/tegra: Properly cleanup and zero out resources

When the DRM driver is unloaded, all the associated resources must be
cleaned up and zeroed out. This is necessary because of the architecture
of the Tegra DRM driver, where not all subdrivers are unloaded along
with the DRM driver. Therefore device-managed managed won't be freed and
memory cannot be assumed to have been cleared (because it hasn't been
reallocated using kzalloc()) by the time the DRM driver is reloaded. It
is therefore necessary to zero out the structures to prevent strange
errors (such as slab corruptions) from occurring.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dc.c
drivers/gpu/drm/tegra/drm.c
drivers/gpu/drm/tegra/output.c