forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/gpu/drm/arm/malidp_drv.h
....@@ -1,11 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * (C) COPYRIGHT 2016 ARM Limited. All rights reserved.
34 * Author: Liviu Dudau <Liviu.Dudau@arm.com>
4
- *
5
- * This program is free software and is provided to you under the terms of the
6
- * GNU General Public License version 2 as published by the Free Software
7
- * Foundation, and any use by you of this program is subject to the terms
8
- * of such GNU licence.
95 *
106 * ARM Mali DP500/DP550/DP650 KMS/DRM driver structures
117 */
....@@ -13,12 +9,13 @@
139 #ifndef __MALIDP_DRV_H__
1410 #define __MALIDP_DRV_H__
1511
16
-#include <drm/drm_writeback.h>
17
-#include <drm/drm_encoder.h>
1812 #include <linux/mutex.h>
1913 #include <linux/wait.h>
2014 #include <linux/spinlock.h>
21
-#include <drm/drmP.h>
15
+
16
+#include <drm/drm_writeback.h>
17
+#include <drm/drm_encoder.h>
18
+
2219 #include "malidp_hw.h"
2320
2421 #define MALIDP_CONFIG_VALID_INIT 0
....@@ -55,6 +52,12 @@
5552 const struct malidp_layer *layer;
5653 };
5754
55
+enum mmu_prefetch_mode {
56
+ MALIDP_PREFETCH_MODE_NONE,
57
+ MALIDP_PREFETCH_MODE_PARTIAL,
58
+ MALIDP_PREFETCH_MODE_FULL,
59
+};
60
+
5861 struct malidp_plane_state {
5962 struct drm_plane_state base;
6063
....@@ -63,6 +66,8 @@
6366 /* internal format ID */
6467 u8 format;
6568 u8 n_planes;
69
+ enum mmu_prefetch_mode mmu_prefetch_mode;
70
+ u32 mmu_prefetch_pgsize;
6671 };
6772
6873 #define to_malidp_plane(x) container_of(x, struct malidp_plane, base)
....@@ -82,6 +87,12 @@
8287 int malidp_de_planes_init(struct drm_device *drm);
8388 int malidp_crtc_init(struct drm_device *drm);
8489
90
+bool malidp_hw_format_is_linear_only(u32 format);
91
+bool malidp_hw_format_is_afbc_only(u32 format);
92
+
93
+bool malidp_format_mod_supported(struct drm_device *drm,
94
+ u32 format, u64 modifier);
95
+
8596 #ifdef CONFIG_DEBUG_FS
8697 void malidp_error(struct malidp_drm *malidp,
8798 struct malidp_error_stats *error_stats, u32 status,