Merge remote-tracking branch 'keys/keys-next'
[deliverable/linux.git] / drivers / gpu / drm / tegra / dc.c
index 8495bd01b5449e886c723b285199a37cf8e8a520..4010d69cbd08404714fe92df3a61ee1a2f3d3bfb 100644 (file)
@@ -480,17 +480,6 @@ static const struct drm_plane_funcs tegra_primary_plane_funcs = {
        .atomic_destroy_state = tegra_plane_atomic_destroy_state,
 };
 
-static int tegra_plane_prepare_fb(struct drm_plane *plane,
-                                 const struct drm_plane_state *new_state)
-{
-       return 0;
-}
-
-static void tegra_plane_cleanup_fb(struct drm_plane *plane,
-                                  const struct drm_plane_state *old_fb)
-{
-}
-
 static int tegra_plane_state_add(struct tegra_plane *plane,
                                 struct drm_plane_state *state)
 {
@@ -591,7 +580,14 @@ static void tegra_plane_atomic_update(struct drm_plane *plane,
                struct tegra_bo *bo = tegra_fb_get_plane(fb, i);
 
                window.base[i] = bo->paddr + fb->offsets[i];
-               window.stride[i] = fb->pitches[i];
+
+               /*
+                * Tegra uses a shared stride for UV planes. Framebuffers are
+                * already checked for this in the tegra_plane_atomic_check()
+                * function, so it's safe to ignore the V-plane pitch here.
+                */
+               if (i < 2)
+                       window.stride[i] = fb->pitches[i];
        }
 
        tegra_dc_setup_window(dc, p->index, &window);
@@ -624,8 +620,6 @@ static void tegra_plane_atomic_disable(struct drm_plane *plane,
 }
 
 static const struct drm_plane_helper_funcs tegra_primary_plane_helper_funcs = {
-       .prepare_fb = tegra_plane_prepare_fb,
-       .cleanup_fb = tegra_plane_cleanup_fb,
        .atomic_check = tegra_plane_atomic_check,
        .atomic_update = tegra_plane_atomic_update,
        .atomic_disable = tegra_plane_atomic_disable,
@@ -796,8 +790,6 @@ static const struct drm_plane_funcs tegra_cursor_plane_funcs = {
 };
 
 static const struct drm_plane_helper_funcs tegra_cursor_plane_helper_funcs = {
-       .prepare_fb = tegra_plane_prepare_fb,
-       .cleanup_fb = tegra_plane_cleanup_fb,
        .atomic_check = tegra_cursor_atomic_check,
        .atomic_update = tegra_cursor_atomic_update,
        .atomic_disable = tegra_cursor_atomic_disable,
@@ -866,8 +858,6 @@ static const uint32_t tegra_overlay_plane_formats[] = {
 };
 
 static const struct drm_plane_helper_funcs tegra_overlay_plane_helper_funcs = {
-       .prepare_fb = tegra_plane_prepare_fb,
-       .cleanup_fb = tegra_plane_cleanup_fb,
        .atomic_check = tegra_plane_atomic_check,
        .atomic_update = tegra_plane_atomic_update,
        .atomic_disable = tegra_plane_atomic_disable,
This page took 0.026812 seconds and 5 git commands to generate.