mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
d2912cb15b
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
73 lines
1.5 KiB
C
73 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2017 NVIDIA CORPORATION. All rights reserved.
|
|
*/
|
|
|
|
#ifndef TEGRA_PLANE_H
|
|
#define TEGRA_PLANE_H 1
|
|
|
|
#include <drm/drm_plane.h>
|
|
|
|
struct tegra_bo;
|
|
struct tegra_dc;
|
|
|
|
struct tegra_plane {
|
|
struct drm_plane base;
|
|
struct tegra_dc *dc;
|
|
unsigned int offset;
|
|
unsigned int index;
|
|
};
|
|
|
|
struct tegra_cursor {
|
|
struct tegra_plane base;
|
|
|
|
struct tegra_bo *bo;
|
|
unsigned int width;
|
|
unsigned int height;
|
|
};
|
|
|
|
static inline struct tegra_plane *to_tegra_plane(struct drm_plane *plane)
|
|
{
|
|
return container_of(plane, struct tegra_plane, base);
|
|
}
|
|
|
|
struct tegra_plane_legacy_blending_state {
|
|
bool alpha;
|
|
bool top;
|
|
};
|
|
|
|
struct tegra_plane_state {
|
|
struct drm_plane_state base;
|
|
|
|
struct tegra_bo_tiling tiling;
|
|
u32 format;
|
|
u32 swap;
|
|
|
|
bool bottom_up;
|
|
|
|
/* used for legacy blending support only */
|
|
struct tegra_plane_legacy_blending_state blending[2];
|
|
bool opaque;
|
|
};
|
|
|
|
static inline struct tegra_plane_state *
|
|
to_tegra_plane_state(struct drm_plane_state *state)
|
|
{
|
|
if (state)
|
|
return container_of(state, struct tegra_plane_state, base);
|
|
|
|
return NULL;
|
|
}
|
|
|
|
extern const struct drm_plane_funcs tegra_plane_funcs;
|
|
|
|
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_yuv(unsigned int format, bool *planar);
|
|
int tegra_plane_setup_legacy_state(struct tegra_plane *tegra,
|
|
struct tegra_plane_state *state);
|
|
|
|
#endif /* TEGRA_PLANE_H */
|