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

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) Jernej Skrabec <[email protected]>
 */

#ifndef _SUN8I_VI_LAYER_H_
#define _SUN8I_VI_LAYER_H_

#include <drm/drm_plane.h>

#define SUN8I_MIXER_CHAN_VI_LAYER_ATTR(base, layer)
#define SUN8I_MIXER_CHAN_VI_LAYER_SIZE(base, layer)
#define SUN8I_MIXER_CHAN_VI_LAYER_COORD(base, layer)
#define SUN8I_MIXER_CHAN_VI_LAYER_PITCH(base, layer, plane)
#define SUN8I_MIXER_CHAN_VI_LAYER_TOP_LADDR(base, layer, plane)
#define SUN8I_MIXER_CHAN_VI_OVL_SIZE(base)
#define SUN8I_MIXER_CHAN_VI_HDS_Y(base)
#define SUN8I_MIXER_CHAN_VI_HDS_UV(base)
#define SUN8I_MIXER_CHAN_VI_VDS_Y(base)
#define SUN8I_MIXER_CHAN_VI_VDS_UV(base)

#define SUN8I_MIXER_FCC_GLOBAL_ALPHA_REG

#define SUN8I_MIXER_FCC_GLOBAL_ALPHA(x)
#define SUN8I_MIXER_FCC_GLOBAL_ALPHA_MASK

#define SUN8I_MIXER_CHAN_VI_LAYER_ATTR_EN
/* RGB mode should be set for RGB formats and cleared for YCbCr */
#define SUN8I_MIXER_CHAN_VI_LAYER_ATTR_RGB_MODE
#define SUN8I_MIXER_CHAN_VI_LAYER_ATTR_FBFMT_OFFSET
#define SUN8I_MIXER_CHAN_VI_LAYER_ATTR_FBFMT_MASK
#define SUN50I_MIXER_CHAN_VI_LAYER_ATTR_ALPHA_MODE_MASK
#define SUN50I_MIXER_CHAN_VI_LAYER_ATTR_ALPHA_MASK
#define SUN50I_MIXER_CHAN_VI_LAYER_ATTR_ALPHA(x)

#define SUN50I_MIXER_CHAN_VI_LAYER_ATTR_ALPHA_MODE_PIXEL
#define SUN50I_MIXER_CHAN_VI_LAYER_ATTR_ALPHA_MODE_LAYER
#define SUN50I_MIXER_CHAN_VI_LAYER_ATTR_ALPHA_MODE_COMBINED

#define SUN8I_MIXER_CHAN_VI_DS_N(x)
#define SUN8I_MIXER_CHAN_VI_DS_M(x)

struct sun8i_mixer;
struct sun8i_layer;

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