| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. |
|---|
| 3 | 4 | * Copyright (C) 2013 Red Hat |
|---|
| 4 | 5 | * Author: Rob Clark <robdclark@gmail.com> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 7 | | - * under the terms of the GNU General Public License version 2 as published by |
|---|
| 8 | | - * the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
|---|
| 11 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 12 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 13 | | - * more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 16 | | - * this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | 6 | */ |
|---|
| 18 | 7 | |
|---|
| 19 | 8 | #ifndef _DPU_PLANE_H_ |
|---|
| .. | .. |
|---|
| 28 | 17 | /** |
|---|
| 29 | 18 | * struct dpu_plane_state: Define dpu extension of drm plane state object |
|---|
| 30 | 19 | * @base: base drm plane state object |
|---|
| 31 | | - * @property_state: Local storage for msm_prop properties |
|---|
| 32 | | - * @property_values: cached plane property values |
|---|
| 33 | 20 | * @aspace: pointer to address space for input/output buffers |
|---|
| 34 | | - * @input_fence: dereferenced input fence pointer |
|---|
| 35 | 21 | * @stage: assigned by crtc blender |
|---|
| 36 | 22 | * @multirect_index: index of the rectangle of SSPP |
|---|
| 37 | 23 | * @multirect_mode: parallel or time multiplex multirect mode |
|---|
| 38 | 24 | * @pending: whether the current update is still pending |
|---|
| 39 | 25 | * @scaler3_cfg: configuration data for scaler3 |
|---|
| 40 | 26 | * @pixel_ext: configuration data for pixel extensions |
|---|
| 41 | | - * @scaler_check_state: indicates status of user provided pixel extension data |
|---|
| 42 | 27 | * @cdp_cfg: CDP configuration |
|---|
| 28 | + * @plane_fetch_bw: calculated BW per plane |
|---|
| 29 | + * @plane_clk: calculated clk per plane |
|---|
| 43 | 30 | */ |
|---|
| 44 | 31 | struct dpu_plane_state { |
|---|
| 45 | 32 | struct drm_plane_state base; |
|---|
| 46 | 33 | struct msm_gem_address_space *aspace; |
|---|
| 47 | | - void *input_fence; |
|---|
| 48 | 34 | enum dpu_stage stage; |
|---|
| 49 | 35 | uint32_t multirect_index; |
|---|
| 50 | 36 | uint32_t multirect_mode; |
|---|
| .. | .. |
|---|
| 55 | 41 | struct dpu_hw_pixel_ext pixel_ext; |
|---|
| 56 | 42 | |
|---|
| 57 | 43 | struct dpu_hw_pipe_cdp_cfg cdp_cfg; |
|---|
| 44 | + u64 plane_fetch_bw; |
|---|
| 45 | + u64 plane_clk; |
|---|
| 58 | 46 | }; |
|---|
| 59 | 47 | |
|---|
| 60 | 48 | /** |
|---|
| .. | .. |
|---|
| 107 | 95 | void dpu_plane_flush(struct drm_plane *plane); |
|---|
| 108 | 96 | |
|---|
| 109 | 97 | /** |
|---|
| 110 | | - * dpu_plane_kickoff - final plane operations before commit kickoff |
|---|
| 111 | | - * @plane: Pointer to drm plane structure |
|---|
| 112 | | - */ |
|---|
| 113 | | -void dpu_plane_kickoff(struct drm_plane *plane); |
|---|
| 114 | | - |
|---|
| 115 | | -/** |
|---|
| 116 | 98 | * dpu_plane_set_error: enable/disable error condition |
|---|
| 117 | 99 | * @plane: pointer to drm_plane structure |
|---|
| 118 | 100 | */ |
|---|
| .. | .. |
|---|
| 122 | 104 | * dpu_plane_init - create new dpu plane for the given pipe |
|---|
| 123 | 105 | * @dev: Pointer to DRM device |
|---|
| 124 | 106 | * @pipe: dpu hardware pipe identifier |
|---|
| 125 | | - * @primary_plane: true if this pipe is primary plane for crtc |
|---|
| 107 | + * @type: Plane type - PRIMARY/OVERLAY/CURSOR |
|---|
| 126 | 108 | * @possible_crtcs: bitmask of crtc that can be attached to the given pipe |
|---|
| 127 | 109 | * @master_plane_id: primary plane id of a multirect pipe. 0 value passed for |
|---|
| 128 | 110 | * a regular plane initialization. A non-zero primary plane |
|---|
| .. | .. |
|---|
| 130 | 112 | * |
|---|
| 131 | 113 | */ |
|---|
| 132 | 114 | struct drm_plane *dpu_plane_init(struct drm_device *dev, |
|---|
| 133 | | - uint32_t pipe, bool primary_plane, |
|---|
| 115 | + uint32_t pipe, enum drm_plane_type type, |
|---|
| 134 | 116 | unsigned long possible_crtcs, u32 master_plane_id); |
|---|
| 135 | 117 | |
|---|
| 136 | 118 | /** |
|---|
| .. | .. |
|---|
| 147 | 129 | void dpu_plane_clear_multirect(const struct drm_plane_state *drm_state); |
|---|
| 148 | 130 | |
|---|
| 149 | 131 | /** |
|---|
| 150 | | - * dpu_plane_wait_input_fence - wait for input fence object |
|---|
| 151 | | - * @plane: Pointer to DRM plane object |
|---|
| 152 | | - * @wait_ms: Wait timeout value |
|---|
| 153 | | - * Returns: Zero on success |
|---|
| 154 | | - */ |
|---|
| 155 | | -int dpu_plane_wait_input_fence(struct drm_plane *plane, uint32_t wait_ms); |
|---|
| 156 | | - |
|---|
| 157 | | -/** |
|---|
| 158 | 132 | * dpu_plane_color_fill - enables color fill on plane |
|---|
| 159 | 133 | * @plane: Pointer to DRM plane object |
|---|
| 160 | 134 | * @color: RGB fill color value, [23..16] Blue, [15..8] Green, [7..0] Red |
|---|
| .. | .. |
|---|
| 163 | 137 | */ |
|---|
| 164 | 138 | int dpu_plane_color_fill(struct drm_plane *plane, |
|---|
| 165 | 139 | uint32_t color, uint32_t alpha); |
|---|
| 166 | | - |
|---|
| 167 | | -/** |
|---|
| 168 | | - * dpu_plane_set_revalidate - sets revalidate flag which forces a full |
|---|
| 169 | | - * validation of the plane properties in the next atomic check |
|---|
| 170 | | - * @plane: Pointer to DRM plane object |
|---|
| 171 | | - * @enable: Boolean to set/unset the flag |
|---|
| 172 | | - */ |
|---|
| 173 | | -void dpu_plane_set_revalidate(struct drm_plane *plane, bool enable); |
|---|
| 174 | 140 | |
|---|
| 175 | 141 | #endif /* _DPU_PLANE_H_ */ |
|---|