f356fe8e0f
Till now, plane selection was hardcoded to first overlay in first UI channel and layer parameter is unused. Rename and add parameters to layer functions so they would represent HW more accurately and start using then. It turns out that overlays don't fit well in current DRM design, because they can't be blended together or scaled independetly when they are set to same channel. Because of that, always use only first overlay in each channel. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-11-jernej.skrabec@siol.net
38 lines
961 B
C
38 lines
961 B
C
/*
|
|
* Copyright (C) Icenowy Zheng <icenowy@aosc.io>
|
|
*
|
|
* Based on sun4i_layer.h, which is:
|
|
* Copyright (C) 2015 Free Electrons
|
|
* Copyright (C) 2015 NextThing Co
|
|
*
|
|
* Maxime Ripard <maxime.ripard@free-electrons.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 2 of
|
|
* the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef _SUN8I_LAYER_H_
|
|
#define _SUN8I_LAYER_H_
|
|
|
|
struct sunxi_engine;
|
|
|
|
struct sun8i_layer {
|
|
struct drm_plane plane;
|
|
struct sun4i_drv *drv;
|
|
struct sun8i_mixer *mixer;
|
|
int channel;
|
|
int overlay;
|
|
};
|
|
|
|
static inline struct sun8i_layer *
|
|
plane_to_sun8i_layer(struct drm_plane *plane)
|
|
{
|
|
return container_of(plane, struct sun8i_layer, plane);
|
|
}
|
|
|
|
struct drm_plane **sun8i_layers_init(struct drm_device *drm,
|
|
struct sunxi_engine *engine);
|
|
#endif /* _SUN8I_LAYER_H_ */
|