summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tegra/drm.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2013-10-14 12:26:42 (GMT)
committerThierry Reding <treding@nvidia.com>2013-10-31 08:55:41 (GMT)
commit59d29c0ec93fe9879673b302a182fb3fb80896c3 (patch)
tree47158501586464399b9dd50da13cb7265166d7d3 /drivers/gpu/drm/tegra/drm.h
parentf002abc19acb6f7cdb3d320f3b6f1a565c0be63e (diff)
downloadlinux-59d29c0ec93fe9879673b302a182fb3fb80896c3.tar.xz
drm/tegra: Allocate resources at probe time
Since the .init() and .exit() functions are executed whenever the DRM driver is loaded or unloaded, care must be taken not to use them for resource allocation. Otherwise deferred probing cannot be used, since the .init() and .exit() are not run at probe time. Similarly the code that frees resources must be run at .remove() time. If it is run from the .exit() function, it can release resources multiple times. To handle this more consistently, rename the tegra_output_parse_dt() function to tegra_output_probe() and introduce tegra_output_remove() which can be used to free output-related resources. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/drm.h')
-rw-r--r--drivers/gpu/drm/tegra/drm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
index 25522e2..dc4b994 100644
--- a/drivers/gpu/drm/tegra/drm.h
+++ b/drivers/gpu/drm/tegra/drm.h
@@ -236,11 +236,13 @@ void drm_host1x_exit(struct drm_driver *driver, struct host1x_device *device);
/* from rgb.c */
extern int tegra_dc_rgb_probe(struct tegra_dc *dc);
+extern int tegra_dc_rgb_remove(struct tegra_dc *dc);
extern int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc);
extern int tegra_dc_rgb_exit(struct tegra_dc *dc);
/* from output.c */
-extern int tegra_output_parse_dt(struct tegra_output *output);
+extern int tegra_output_probe(struct tegra_output *output);
+extern int tegra_output_remove(struct tegra_output *output);
extern int tegra_output_init(struct drm_device *drm, struct tegra_output *output);
extern int tegra_output_exit(struct tegra_output *output);