Browse Source

drm/tegra: Don't disable unused planes

When a plane isn't in use it isn't attached to a CRTC and therefore the
DC registers aren't available for programming.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Thierry Reding 12 years ago
parent
commit
2678aeba5f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      drivers/gpu/host1x/drm/dc.c

+ 3 - 0
drivers/gpu/host1x/drm/dc.c

@@ -79,6 +79,9 @@ static int tegra_plane_disable(struct drm_plane *plane)
 	struct tegra_plane *p = to_tegra_plane(plane);
 	unsigned long value;
 
+	if (!plane->crtc)
+		return 0;
+
 	value = WINDOW_A_SELECT << p->index;
 	tegra_dc_writel(dc, value, DC_CMD_DISPLAY_WINDOW_HEADER);