dc.c (712cba5d87a6c0e980ee5fad45734e189c4d7151) dc.c (bcb0b461454c9cb3b5804cf75bacaadb52348864)
1/*
2 * Copyright (C) 2012 Avionic Design GmbH
3 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */

--- 517 unchanged lines hidden (view full) ---

526 return -EINVAL;
527 }
528
529 /*
530 * Tegra doesn't support different strides for U and V planes so we
531 * error out if the user tries to display a framebuffer with such a
532 * configuration.
533 */
1/*
2 * Copyright (C) 2012 Avionic Design GmbH
3 * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */

--- 517 unchanged lines hidden (view full) ---

526 return -EINVAL;
527 }
528
529 /*
530 * Tegra doesn't support different strides for U and V planes so we
531 * error out if the user tries to display a framebuffer with such a
532 * configuration.
533 */
534 if (drm_format_num_planes(state->fb->pixel_format) > 2) {
534 if (state->fb->format->num_planes > 2) {
535 if (state->fb->pitches[2] != state->fb->pitches[1]) {
536 DRM_ERROR("unsupported UV-plane configuration\n");
537 return -EINVAL;
538 }
539 }
540
541 err = tegra_plane_state_add(tegra, state);
542 if (err < 0)

--- 28 unchanged lines hidden (view full) ---

571 window.bits_per_pixel = fb->bits_per_pixel;
572 window.bottom_up = tegra_fb_is_bottom_up(fb);
573
574 /* copy from state */
575 window.tiling = state->tiling;
576 window.format = state->format;
577 window.swap = state->swap;
578
535 if (state->fb->pitches[2] != state->fb->pitches[1]) {
536 DRM_ERROR("unsupported UV-plane configuration\n");
537 return -EINVAL;
538 }
539 }
540
541 err = tegra_plane_state_add(tegra, state);
542 if (err < 0)

--- 28 unchanged lines hidden (view full) ---

571 window.bits_per_pixel = fb->bits_per_pixel;
572 window.bottom_up = tegra_fb_is_bottom_up(fb);
573
574 /* copy from state */
575 window.tiling = state->tiling;
576 window.format = state->format;
577 window.swap = state->swap;
578
579 for (i = 0; i < drm_format_num_planes(fb->pixel_format); i++) {
579 for (i = 0; i < fb->format->num_planes; i++) {
580 struct tegra_bo *bo = tegra_fb_get_plane(fb, i);
581
582 window.base[i] = bo->paddr + fb->offsets[i];
583
584 /*
585 * Tegra uses a shared stride for UV planes. Framebuffers are
586 * already checked for this in the tegra_plane_atomic_check()
587 * function, so it's safe to ignore the V-plane pitch here.

--- 1526 unchanged lines hidden ---
580 struct tegra_bo *bo = tegra_fb_get_plane(fb, i);
581
582 window.base[i] = bo->paddr + fb->offsets[i];
583
584 /*
585 * Tegra uses a shared stride for UV planes. Framebuffers are
586 * already checked for this in the tegra_plane_atomic_check()
587 * function, so it's safe to ignore the V-plane pitch here.

--- 1526 unchanged lines hidden ---