linux/drivers/gpu/drm/sun4i/sun8i_ui_layer.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) Icenowy Zheng <[email protected]>
 *
 * Based on sun4i_layer.h, which is:
 *   Copyright (C) 2015 Free Electrons
 *   Copyright (C) 2015 NextThing Co
 *
 *   Maxime Ripard <[email protected]>
 */

#ifndef _SUN8I_UI_LAYER_H_
#define _SUN8I_UI_LAYER_H_

#include <drm/drm_plane.h>

#define SUN8I_MIXER_CHAN_UI_LAYER_ATTR(base, layer)
#define SUN8I_MIXER_CHAN_UI_LAYER_SIZE(base, layer)
#define SUN8I_MIXER_CHAN_UI_LAYER_COORD(base, layer)
#define SUN8I_MIXER_CHAN_UI_LAYER_PITCH(base, layer)
#define SUN8I_MIXER_CHAN_UI_LAYER_TOP_LADDR(base, layer)
#define SUN8I_MIXER_CHAN_UI_LAYER_BOT_LADDR(base, layer)
#define SUN8I_MIXER_CHAN_UI_LAYER_FCOLOR(base, layer)
#define SUN8I_MIXER_CHAN_UI_TOP_HADDR(base)
#define SUN8I_MIXER_CHAN_UI_BOT_HADDR(base)
#define SUN8I_MIXER_CHAN_UI_OVL_SIZE(base)

#define SUN8I_MIXER_CHAN_UI_LAYER_ATTR_EN
#define SUN8I_MIXER_CHAN_UI_LAYER_ATTR_ALPHA_MODE_MASK
#define SUN8I_MIXER_CHAN_UI_LAYER_ATTR_FBFMT_MASK
#define SUN8I_MIXER_CHAN_UI_LAYER_ATTR_FBFMT_OFFSET
#define SUN8I_MIXER_CHAN_UI_LAYER_ATTR_ALPHA_MASK
#define SUN8I_MIXER_CHAN_UI_LAYER_ATTR_ALPHA(x)

#define SUN8I_MIXER_CHAN_UI_LAYER_ATTR_ALPHA_MODE_PIXEL
#define SUN8I_MIXER_CHAN_UI_LAYER_ATTR_ALPHA_MODE_LAYER
#define SUN8I_MIXER_CHAN_UI_LAYER_ATTR_ALPHA_MODE_COMBINED

struct sun8i_mixer;
struct sun8i_layer;

struct sun8i_layer *sun8i_ui_layer_init_one(struct drm_device *drm,
					    struct sun8i_mixer *mixer,
					    int index);
#endif /* _SUN8I_UI_LAYER_H_ */