| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2015 Free Electrons |
|---|
| 3 | 4 | * Copyright (C) 2015 NextThing Co |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or |
|---|
| 8 | | - * modify it under the terms of the GNU General Public License as |
|---|
| 9 | | - * published by the Free Software Foundation; either version 2 of |
|---|
| 10 | | - * the License, or (at your option) any later version. |
|---|
| 11 | 7 | */ |
|---|
| 12 | 8 | |
|---|
| 13 | 9 | #ifndef _SUN4I_BACKEND_H_ |
|---|
| .. | .. |
|---|
| 167 | 163 | #define SUN4I_BACKEND_PIPE_OFF(p) (0x5000 + (0x400 * (p))) |
|---|
| 168 | 164 | |
|---|
| 169 | 165 | #define SUN4I_BACKEND_NUM_LAYERS 4 |
|---|
| 170 | | -#define SUN4I_BACKEND_NUM_ALPHA_LAYERS 1 |
|---|
| 171 | 166 | #define SUN4I_BACKEND_NUM_FRONTEND_LAYERS 1 |
|---|
| 172 | 167 | #define SUN4I_BACKEND_NUM_YUV_PLANES 1 |
|---|
| 173 | 168 | |
|---|
| .. | .. |
|---|
| 187 | 182 | /* Protects against races in the frontend teardown */ |
|---|
| 188 | 183 | spinlock_t frontend_lock; |
|---|
| 189 | 184 | bool frontend_teardown; |
|---|
| 185 | + |
|---|
| 186 | + const struct sun4i_backend_quirks *quirks; |
|---|
| 190 | 187 | }; |
|---|
| 191 | 188 | |
|---|
| 192 | 189 | static inline struct sun4i_backend * |
|---|
| .. | .. |
|---|
| 197 | 194 | |
|---|
| 198 | 195 | void sun4i_backend_layer_enable(struct sun4i_backend *backend, |
|---|
| 199 | 196 | int layer, bool enable); |
|---|
| 197 | +bool sun4i_backend_format_is_supported(uint32_t fmt, uint64_t modifier); |
|---|
| 200 | 198 | int sun4i_backend_update_layer_coord(struct sun4i_backend *backend, |
|---|
| 201 | 199 | int layer, struct drm_plane *plane); |
|---|
| 202 | 200 | int sun4i_backend_update_layer_formats(struct sun4i_backend *backend, |
|---|
| .. | .. |
|---|
| 207 | 205 | int layer, uint32_t in_fmt); |
|---|
| 208 | 206 | int sun4i_backend_update_layer_zpos(struct sun4i_backend *backend, |
|---|
| 209 | 207 | int layer, struct drm_plane *plane); |
|---|
| 208 | +void sun4i_backend_cleanup_layer(struct sun4i_backend *backend, |
|---|
| 209 | + int layer); |
|---|
| 210 | 210 | |
|---|
| 211 | 211 | #endif /* _SUN4I_BACKEND_H_ */ |
|---|