summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/drm.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2012-11-28 12:00:18 +0100
committerThierry Reding <thierry.reding@avionic-design.de>2013-02-22 08:21:27 +0100
commit3c03c46ac80ea7edc3b8f2ba85085de54aec15cd (patch)
tree3eaec0c908b711961ac00c22d5c09a54faff709d /drivers/gpu/drm/tegra/drm.c
parent6e5ff998997ba7dc5ca10b6662e95a9d07f764c4 (diff)
downloadop-kernel-dev-3c03c46ac80ea7edc3b8f2ba85085de54aec15cd.zip
op-kernel-dev-3c03c46ac80ea7edc3b8f2ba85085de54aec15cd.tar.gz
drm/tegra: Implement page-flipping support
All the necessary support bits like .mode_set_base() and VBLANK are now available, so page-flipping case easily be implemented on top. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/gpu/drm/tegra/drm.c')
-rw-r--r--drivers/gpu/drm/tegra/drm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 4e31dac..97485af 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -135,11 +135,20 @@ static void tegra_drm_disable_vblank(struct drm_device *drm, int pipe)
tegra_dc_disable_vblank(dc);
}
+static void tegra_drm_preclose(struct drm_device *drm, struct drm_file *file)
+{
+ struct drm_crtc *crtc;
+
+ list_for_each_entry(crtc, &drm->mode_config.crtc_list, head)
+ tegra_dc_cancel_page_flip(crtc, file);
+}
+
struct drm_driver tegra_drm_driver = {
.driver_features = DRIVER_BUS_PLATFORM | DRIVER_MODESET | DRIVER_GEM,
.load = tegra_drm_load,
.unload = tegra_drm_unload,
.open = tegra_drm_open,
+ .preclose = tegra_drm_preclose,
.lastclose = tegra_drm_lastclose,
.get_vblank_counter = tegra_drm_get_vblank_counter,
OpenPOWER on IntegriCloud