.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * (C) COPYRIGHT 2016 ARM Limited. All rights reserved. |
---|
3 | 4 | * 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. |
---|
9 | 5 | * |
---|
10 | 6 | * ARM Mali DP500/DP550/DP650 KMS/DRM driver structures |
---|
11 | 7 | */ |
---|
.. | .. |
---|
13 | 9 | #ifndef __MALIDP_DRV_H__ |
---|
14 | 10 | #define __MALIDP_DRV_H__ |
---|
15 | 11 | |
---|
16 | | -#include <drm/drm_writeback.h> |
---|
17 | | -#include <drm/drm_encoder.h> |
---|
18 | 12 | #include <linux/mutex.h> |
---|
19 | 13 | #include <linux/wait.h> |
---|
20 | 14 | #include <linux/spinlock.h> |
---|
21 | | -#include <drm/drmP.h> |
---|
| 15 | + |
---|
| 16 | +#include <drm/drm_writeback.h> |
---|
| 17 | +#include <drm/drm_encoder.h> |
---|
| 18 | + |
---|
22 | 19 | #include "malidp_hw.h" |
---|
23 | 20 | |
---|
24 | 21 | #define MALIDP_CONFIG_VALID_INIT 0 |
---|
.. | .. |
---|
55 | 52 | const struct malidp_layer *layer; |
---|
56 | 53 | }; |
---|
57 | 54 | |
---|
| 55 | +enum mmu_prefetch_mode { |
---|
| 56 | + MALIDP_PREFETCH_MODE_NONE, |
---|
| 57 | + MALIDP_PREFETCH_MODE_PARTIAL, |
---|
| 58 | + MALIDP_PREFETCH_MODE_FULL, |
---|
| 59 | +}; |
---|
| 60 | + |
---|
58 | 61 | struct malidp_plane_state { |
---|
59 | 62 | struct drm_plane_state base; |
---|
60 | 63 | |
---|
.. | .. |
---|
63 | 66 | /* internal format ID */ |
---|
64 | 67 | u8 format; |
---|
65 | 68 | u8 n_planes; |
---|
| 69 | + enum mmu_prefetch_mode mmu_prefetch_mode; |
---|
| 70 | + u32 mmu_prefetch_pgsize; |
---|
66 | 71 | }; |
---|
67 | 72 | |
---|
68 | 73 | #define to_malidp_plane(x) container_of(x, struct malidp_plane, base) |
---|
.. | .. |
---|
82 | 87 | int malidp_de_planes_init(struct drm_device *drm); |
---|
83 | 88 | int malidp_crtc_init(struct drm_device *drm); |
---|
84 | 89 | |
---|
| 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 | + |
---|
85 | 96 | #ifdef CONFIG_DEBUG_FS |
---|
86 | 97 | void malidp_error(struct malidp_drm *malidp, |
---|
87 | 98 | struct malidp_error_stats *error_stats, u32 status, |
---|