linux/drivers/gpu/drm/tegra
David Herrmann 099d1c290e drm: provide device-refcount
Lets not trick ourselves into thinking "drm_device" objects are not
ref-counted. That's just utterly stupid. We manage "drm_minor" objects on
each drm-device and each minor can have an unlimited number of open
handles. Each of these handles has the drm_minor (and thus the drm_device)
as private-data in the file-handle. Therefore, we may not destroy
"drm_device" until all these handles are closed.

It is *not* possible to reset all these pointers atomically and restrict
access to them, and this is *not* how this is done! Instead, we use
ref-counts to make sure the object is valid and not freed.

Note that we currently use "dev->open_count" for that, which is *exactly*
the same as a reference-count, just open coded. So this patch doesn't
change any semantics on DRM devices (well, this patch just introduces the
ref-count, anyway. Follow-up patches will replace open_count by it).

Also note that generic VFS revoke support could allow us to drop this
ref-count again. We could then just synchronously disable any fops->xy()
calls. However, this is not the case, yet, and no such patches are
in sight (and I seriously question the idea of dropping the ref-cnt
again).

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-03-16 12:25:17 +01:00
..
bus.c drm: provide device-refcount 2014-03-16 12:25:17 +01:00
dc.c drm/tegra: Obtain head number from DT 2014-01-23 15:51:32 +01:00
dc.h drm/tegra: Relocate some output-specific code 2013-12-20 15:56:07 +01:00
drm.c drm/tegra: Add PRIME support 2013-12-20 15:56:07 +01:00
drm.h drm/tegra: Add Tegra124 DC support 2013-12-20 15:56:06 +01:00
dsi.c drm/tegra: Relocate some output-specific code 2013-12-20 15:56:07 +01:00
dsi.h drm/tegra: Add DSI support 2013-12-20 15:56:04 +01:00
fb.c drm/tegra: Fix small leak on error in tegra_fb_alloc() 2013-12-20 15:56:06 +01:00
gem.c drm/tegra: Add PRIME support 2013-12-20 15:56:07 +01:00
gem.h drm/tegra: Add PRIME support 2013-12-20 15:56:07 +01:00
gr2d.c drm/tegra: Reserve base for gr2d 2013-10-31 09:55:48 +01:00
gr2d.h drm/tegra: Use symbolic names for gr2d registers 2013-10-31 09:55:44 +01:00
gr3d.c ARM: tegra: pass reset to tegra_powergate_sequence_power_up() 2013-12-11 16:43:11 -07:00
gr3d.h drm/tegra: Add 3D support 2013-10-31 09:55:45 +01:00
hdmi.c drm/tegra: Don't check resource with devm_ioremap_resource() 2014-01-14 14:34:14 +01:00
hdmi.h drm/tegra: Add Tegra114 HDMI support 2013-10-31 09:55:42 +01:00
Kconfig drm/tegra: Make legacy fbdev support optional 2013-12-20 15:56:05 +01:00
Makefile drm/tegra: Add DSI support 2013-12-20 15:56:04 +01:00
mipi-phy.c drm/tegra: fix compile w/ CONFIG_DYNAMIC_DEBUG 2013-12-20 15:56:33 +01:00
mipi-phy.h drm/tegra: Add DSI support 2013-12-20 15:56:04 +01:00
output.c drm/tegra: Use proper data type 2014-01-14 14:39:38 +01:00
rgb.c drm/tegra: Fix possible CRTC mask for RGB outputs 2014-01-14 14:35:56 +01:00