linux/drivers/gpu/drm/tegra/plane.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2017 NVIDIA CORPORATION.  All rights reserved.
 */

#include <linux/dma-mapping.h>
#include <linux/iommu.h>
#include <linux/interconnect.h>

#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>

#include "dc.h"
#include "plane.h"

static void tegra_plane_destroy(struct drm_plane *plane)
{}

static void tegra_plane_reset(struct drm_plane *plane)
{}

static struct drm_plane_state *
tegra_plane_atomic_duplicate_state(struct drm_plane *plane)
{}

static void tegra_plane_atomic_destroy_state(struct drm_plane *plane,
					     struct drm_plane_state *state)
{}

static bool tegra_plane_supports_sector_layout(struct drm_plane *plane)
{}

static bool tegra_plane_format_mod_supported(struct drm_plane *plane,
					     uint32_t format,
					     uint64_t modifier)
{}

const struct drm_plane_funcs tegra_plane_funcs =;

static int tegra_dc_pin(struct tegra_dc *dc, struct tegra_plane_state *state)
{}

static void tegra_dc_unpin(struct tegra_dc *dc, struct tegra_plane_state *state)
{}

int tegra_plane_prepare_fb(struct drm_plane *plane,
			   struct drm_plane_state *state)
{}

void tegra_plane_cleanup_fb(struct drm_plane *plane,
			    struct drm_plane_state *state)
{}

static int tegra_plane_calculate_memory_bandwidth(struct drm_plane_state *state)
{}

int tegra_plane_state_add(struct tegra_plane *plane,
			  struct drm_plane_state *state)
{}

int tegra_plane_format(u32 fourcc, u32 *format, u32 *swap)
{}

bool tegra_plane_format_is_indexed(unsigned int format)
{}

bool tegra_plane_format_is_yuv(unsigned int format, unsigned int *planes, unsigned int *bpc)
{}

static bool __drm_format_has_alpha(u32 format)
{}

static int tegra_plane_format_get_alpha(unsigned int opaque,
					unsigned int *alpha)
{}

/*
 * This is applicable to Tegra20 and Tegra30 only where the opaque formats can
 * be emulated using the alpha formats and alpha blending disabled.
 */
static int tegra_plane_setup_opacity(struct tegra_plane *tegra,
				     struct tegra_plane_state *state)
{}

static int tegra_plane_check_transparency(struct tegra_plane *tegra,
					  struct tegra_plane_state *state)
{}

static unsigned int tegra_plane_get_overlap_index(struct tegra_plane *plane,
						  struct tegra_plane *other)
{}

static void tegra_plane_update_transparency(struct tegra_plane *tegra,
					    struct tegra_plane_state *state)
{}

static int tegra_plane_setup_transparency(struct tegra_plane *tegra,
					  struct tegra_plane_state *state)
{}

int tegra_plane_setup_legacy_state(struct tegra_plane *tegra,
				   struct tegra_plane_state *state)
{}

static const char * const tegra_plane_icc_names[TEGRA_DC_LEGACY_PLANES_NUM] =;

int tegra_plane_interconnect_init(struct tegra_plane *plane)
{}