forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/sun4i/sun4i_backend.h
....@@ -1,13 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright (C) 2015 Free Electrons
34 * Copyright (C) 2015 NextThing Co
45 *
56 * 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.
117 */
128
139 #ifndef _SUN4I_BACKEND_H_
....@@ -167,7 +163,6 @@
167163 #define SUN4I_BACKEND_PIPE_OFF(p) (0x5000 + (0x400 * (p)))
168164
169165 #define SUN4I_BACKEND_NUM_LAYERS 4
170
-#define SUN4I_BACKEND_NUM_ALPHA_LAYERS 1
171166 #define SUN4I_BACKEND_NUM_FRONTEND_LAYERS 1
172167 #define SUN4I_BACKEND_NUM_YUV_PLANES 1
173168
....@@ -187,6 +182,8 @@
187182 /* Protects against races in the frontend teardown */
188183 spinlock_t frontend_lock;
189184 bool frontend_teardown;
185
+
186
+ const struct sun4i_backend_quirks *quirks;
190187 };
191188
192189 static inline struct sun4i_backend *
....@@ -197,6 +194,7 @@
197194
198195 void sun4i_backend_layer_enable(struct sun4i_backend *backend,
199196 int layer, bool enable);
197
+bool sun4i_backend_format_is_supported(uint32_t fmt, uint64_t modifier);
200198 int sun4i_backend_update_layer_coord(struct sun4i_backend *backend,
201199 int layer, struct drm_plane *plane);
202200 int sun4i_backend_update_layer_formats(struct sun4i_backend *backend,
....@@ -207,5 +205,7 @@
207205 int layer, uint32_t in_fmt);
208206 int sun4i_backend_update_layer_zpos(struct sun4i_backend *backend,
209207 int layer, struct drm_plane *plane);
208
+void sun4i_backend_cleanup_layer(struct sun4i_backend *backend,
209
+ int layer);
210210
211211 #endif /* _SUN4I_BACKEND_H_ */