abeykun | b85a5e3 | 2016-08-24 13:51:40 -0400 | [diff] [blame] | 1 | /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef _SDE_HW_CATALOG_H |
| 14 | #define _SDE_HW_CATALOG_H |
| 15 | |
| 16 | #include <linux/kernel.h> |
| 17 | #include <linux/bug.h> |
| 18 | #include <linux/bitmap.h> |
| 19 | #include <linux/err.h> |
Dhaval Patel | 8bf7ff3 | 2016-07-20 18:13:24 -0700 | [diff] [blame] | 20 | #include <drm/drmP.h> |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 21 | |
Dhaval Patel | 8bf7ff3 | 2016-07-20 18:13:24 -0700 | [diff] [blame] | 22 | /** |
| 23 | * Max hardware block count: For ex: max 12 SSPP pipes or |
| 24 | * 5 ctl paths. In all cases, it can have max 12 hardware blocks |
| 25 | * based on current design |
| 26 | */ |
| 27 | #define MAX_BLOCKS 12 |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 28 | |
| 29 | #define SDE_HW_VER(MAJOR, MINOR, STEP) (((MAJOR & 0xF) << 28) |\ |
| 30 | ((MINOR & 0xFFF) << 16) |\ |
| 31 | (STEP & 0xFFFF)) |
| 32 | |
| 33 | #define SDE_HW_MAJOR(rev) ((rev) >> 28) |
abeykun | b85a5e3 | 2016-08-24 13:51:40 -0400 | [diff] [blame] | 34 | #define SDE_HW_MINOR(rev) (((rev) >> 16) & 0xFFF) |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 35 | #define SDE_HW_STEP(rev) ((rev) & 0xFFFF) |
| 36 | #define SDE_HW_MAJOR_MINOR(rev) ((rev) >> 16) |
| 37 | |
| 38 | #define IS_SDE_MAJOR_MINOR_SAME(rev1, rev2) \ |
| 39 | (SDE_HW_MAJOR_MINOR((rev1)) == SDE_HW_MAJOR_MINOR((rev2))) |
| 40 | |
| 41 | #define SDE_HW_VER_170 SDE_HW_VER(1, 7, 0) /* 8996 v1.0 */ |
| 42 | #define SDE_HW_VER_171 SDE_HW_VER(1, 7, 1) /* 8996 v2.0 */ |
| 43 | #define SDE_HW_VER_172 SDE_HW_VER(1, 7, 2) /* 8996 v3.0 */ |
| 44 | #define SDE_HW_VER_300 SDE_HW_VER(3, 0, 0) /* 8998 v1.0 */ |
abeykun | b85a5e3 | 2016-08-24 13:51:40 -0400 | [diff] [blame] | 45 | #define SDE_HW_VER_400 SDE_HW_VER(4, 0, 0) /* msmskunk v1.0 */ |
| 46 | |
| 47 | #define IS_MSMSKUNK_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_400) |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 48 | |
Dhaval Patel | 47302cf | 2016-08-18 15:04:28 -0700 | [diff] [blame] | 49 | #define MAX_IMG_WIDTH 0x3fff |
| 50 | #define MAX_IMG_HEIGHT 0x3fff |
| 51 | |
Dhaval Patel | 44f1247 | 2016-08-29 12:19:47 -0700 | [diff] [blame] | 52 | #define CRTC_DUAL_MIXERS 2 |
| 53 | |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 54 | #define SDE_COLOR_PROCESS_VER(MAJOR, MINOR) \ |
| 55 | ((((MAJOR) & 0xFFFF) << 16) | (((MINOR) & 0xFFFF))) |
| 56 | #define SDE_COLOR_PROCESS_MAJOR(version) (((version) & 0xFFFF0000) >> 16) |
| 57 | #define SDE_COLOR_PROCESS_MINOR(version) ((version) & 0xFFFF) |
| 58 | |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 59 | /** |
| 60 | * MDP TOP BLOCK features |
| 61 | * @SDE_MDP_PANIC_PER_PIPE Panic configuration needs to be be done per pipe |
| 62 | * @SDE_MDP_10BIT_SUPPORT, Chipset supports 10 bit pixel formats |
| 63 | * @SDE_MDP_BWC, MDSS HW supports Bandwidth compression. |
| 64 | * @SDE_MDP_UBWC_1_0, This chipsets supports Universal Bandwidth |
| 65 | * compression initial revision |
| 66 | * @SDE_MDP_UBWC_1_5, Universal Bandwidth compression version 1.5 |
| 67 | * @SDE_MDP_CDP, Client driven prefetch |
| 68 | * @SDE_MDP_MAX Maximum value |
| 69 | |
| 70 | */ |
| 71 | enum { |
| 72 | SDE_MDP_PANIC_PER_PIPE = 0x1, |
| 73 | SDE_MDP_10BIT_SUPPORT, |
| 74 | SDE_MDP_BWC, |
| 75 | SDE_MDP_UBWC_1_0, |
| 76 | SDE_MDP_UBWC_1_5, |
| 77 | SDE_MDP_CDP, |
| 78 | SDE_MDP_MAX |
| 79 | }; |
| 80 | |
| 81 | /** |
| 82 | * SSPP sub-blocks/features |
| 83 | * @SDE_SSPP_SRC Src and fetch part of the pipes, |
Clarence Ip | e78efb7 | 2016-06-24 18:35:21 -0400 | [diff] [blame] | 84 | * @SDE_SSPP_SCALER_QSEED2, QSEED2 algorithm support |
| 85 | * @SDE_SSPP_SCALER_QSEED3, QSEED3 alogorithm support |
| 86 | * @SDE_SSPP_SCALER_RGB, RGB Scaler, supported by RGB pipes |
| 87 | * @SDE_SSPP_CSC, Support of Color space converion |
abeykun | 6257614 | 2016-08-25 17:44:05 -0400 | [diff] [blame] | 88 | * @SDE_SSPP_CSC_10BIT, Support of 10-bit Color space conversion |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 89 | * @SDE_SSPP_HSIC, Global HSIC control |
| 90 | * @SDE_SSPP_MEMCOLOR Memory Color Support |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 91 | * @SDE_SSPP_IGC, Inverse gamma correction |
| 92 | * @SDE_SSPP_PCC, Color correction support |
| 93 | * @SDE_SSPP_CURSOR, SSPP can be used as a cursor layer |
Alan Kwong | 1a00e4d | 2016-07-18 09:42:30 -0400 | [diff] [blame] | 94 | * @SDE_SSPP_QOS, SSPP support QoS control, danger/safe/creq |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 95 | * @SDE_SSPP_MAX maximum value |
| 96 | */ |
| 97 | enum { |
| 98 | SDE_SSPP_SRC = 0x1, |
Clarence Ip | e78efb7 | 2016-06-24 18:35:21 -0400 | [diff] [blame] | 99 | SDE_SSPP_SCALER_QSEED2, |
| 100 | SDE_SSPP_SCALER_QSEED3, |
| 101 | SDE_SSPP_SCALER_RGB, |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 102 | SDE_SSPP_CSC, |
abeykun | 6257614 | 2016-08-25 17:44:05 -0400 | [diff] [blame] | 103 | SDE_SSPP_CSC_10BIT, |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 104 | SDE_SSPP_HSIC, |
| 105 | SDE_SSPP_MEMCOLOR, |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 106 | SDE_SSPP_IGC, |
| 107 | SDE_SSPP_PCC, |
| 108 | SDE_SSPP_CURSOR, |
Alan Kwong | 1a00e4d | 2016-07-18 09:42:30 -0400 | [diff] [blame] | 109 | SDE_SSPP_QOS, |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 110 | SDE_SSPP_MAX |
| 111 | }; |
| 112 | |
| 113 | /* |
| 114 | * MIXER sub-blocks/features |
| 115 | * @SDE_MIXER_LAYER Layer mixer layer blend configuration, |
| 116 | * @SDE_MIXER_SOURCESPLIT Layer mixer supports source-split configuration |
| 117 | * @SDE_MIXER_GC Gamma correction block |
| 118 | * @SDE_MIXER_MAX maximum value |
| 119 | */ |
| 120 | enum { |
| 121 | SDE_MIXER_LAYER = 0x1, |
| 122 | SDE_MIXER_SOURCESPLIT, |
| 123 | SDE_MIXER_GC, |
| 124 | SDE_MIXER_MAX |
| 125 | }; |
| 126 | |
| 127 | /** |
| 128 | * DSPP sub-blocks |
| 129 | * @SDE_DSPP_IGC DSPP Inverse gamma correction block |
| 130 | * @SDE_DSPP_PCC Panel color correction block |
| 131 | * @SDE_DSPP_GC Gamma correction block |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 132 | * @SDE_DSPP_HSIC Global HSIC block |
| 133 | * @SDE_DSPP_MEMCOLOR Memory Color block |
| 134 | * @SDE_DSPP_SIXZONE Six zone block |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 135 | * @SDE_DSPP_GAMUT Gamut bloc |
| 136 | * @SDE_DSPP_DITHER Dither block |
Gopikrishnaiah Anandan | b67b0d1 | 2016-06-23 11:43:08 -0700 | [diff] [blame] | 137 | * @SDE_DSPP_HIST Histogram block |
| 138 | * @SDE_DSPP_VLUT PA VLUT block |
| 139 | * @SDE_DSPP_AD AD block |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 140 | * @SDE_DSPP_MAX maximum value |
| 141 | */ |
| 142 | enum { |
| 143 | SDE_DSPP_IGC = 0x1, |
| 144 | SDE_DSPP_PCC, |
| 145 | SDE_DSPP_GC, |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 146 | SDE_DSPP_HSIC, |
| 147 | SDE_DSPP_MEMCOLOR, |
| 148 | SDE_DSPP_SIXZONE, |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 149 | SDE_DSPP_GAMUT, |
| 150 | SDE_DSPP_DITHER, |
| 151 | SDE_DSPP_HIST, |
Gopikrishnaiah Anandan | b67b0d1 | 2016-06-23 11:43:08 -0700 | [diff] [blame] | 152 | SDE_DSPP_VLUT, |
Gopikrishnaiah Anandan | 41980b4 | 2016-06-21 16:01:33 -0700 | [diff] [blame] | 153 | SDE_DSPP_AD, |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 154 | SDE_DSPP_MAX |
| 155 | }; |
| 156 | |
| 157 | /** |
| 158 | * PINGPONG sub-blocks |
| 159 | * @SDE_PINGPONG_TE Tear check block |
| 160 | * @SDE_PINGPONG_TE2 Additional tear check block for split pipes |
| 161 | * @SDE_PINGPONG_SPLIT PP block supports split fifo |
| 162 | * @SDE_PINGPONG_DSC, Display stream compression blocks |
| 163 | * @SDE_PINGPONG_MAX |
| 164 | */ |
| 165 | enum { |
| 166 | SDE_PINGPONG_TE = 0x1, |
| 167 | SDE_PINGPONG_TE2, |
| 168 | SDE_PINGPONG_SPLIT, |
| 169 | SDE_PINGPONG_DSC, |
| 170 | SDE_PINGPONG_MAX |
| 171 | }; |
| 172 | |
| 173 | /** |
Lloyd Atkinson | cf8996b | 2016-08-23 09:34:13 -0400 | [diff] [blame] | 174 | * CTL sub-blocks |
| 175 | * @SDE_CTL_SPLIT_DISPLAY CTL supports video mode split display |
| 176 | * @SDE_CTL_PINGPONG_SPLIT CTL supports pingpong split |
| 177 | * @SDE_CTL_MAX |
| 178 | */ |
| 179 | enum { |
| 180 | SDE_CTL_SPLIT_DISPLAY = 0x1, |
| 181 | SDE_CTL_PINGPONG_SPLIT, |
| 182 | SDE_CTL_MAX |
| 183 | }; |
| 184 | |
| 185 | /** |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 186 | * WB sub-blocks and features |
| 187 | * @SDE_WB_LINE_MODE Writeback module supports line/linear mode |
| 188 | * @SDE_WB_BLOCK_MODE Writeback module supports block mode read |
| 189 | * @SDE_WB_ROTATE rotation support,this is available if writeback |
| 190 | * supports block mode read |
| 191 | * @SDE_WB_CSC Writeback color conversion block support |
| 192 | * @SDE_WB_CHROMA_DOWN, Writeback chroma down block, |
| 193 | * @SDE_WB_DOWNSCALE, Writeback integer downscaler, |
| 194 | * @SDE_WB_DITHER, Dither block |
| 195 | * @SDE_WB_TRAFFIC_SHAPER, Writeback traffic shaper bloc |
| 196 | * @SDE_WB_UBWC_1_0, Writeback Universal bandwidth compression 1.0 |
| 197 | * support |
abeykun | f1539f7 | 2016-08-24 16:08:03 -0400 | [diff] [blame] | 198 | * @SDE_WB_UBWC_1_5 UBWC 1.5 support |
Alan Kwong | 3232ca5 | 2016-07-29 02:27:47 -0400 | [diff] [blame] | 199 | * @SDE_WB_YUV_CONFIG Writeback supports output of YUV colorspace |
Alan Kwong | 9ffcd59 | 2016-09-27 07:41:56 -0400 | [diff] [blame] | 200 | * @SDE_WB_PIPE_ALPHA Writeback supports pipe alpha |
abeykun | f1539f7 | 2016-08-24 16:08:03 -0400 | [diff] [blame] | 201 | * @SDE_WB_XY_ROI_OFFSET Writeback supports x/y-offset of out ROI in |
| 202 | * the destination image |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 203 | * @SDE_WB_MAX maximum value |
| 204 | */ |
| 205 | enum { |
| 206 | SDE_WB_LINE_MODE = 0x1, |
| 207 | SDE_WB_BLOCK_MODE, |
| 208 | SDE_WB_ROTATE = SDE_WB_BLOCK_MODE, |
| 209 | SDE_WB_CSC, |
| 210 | SDE_WB_CHROMA_DOWN, |
| 211 | SDE_WB_DOWNSCALE, |
| 212 | SDE_WB_DITHER, |
| 213 | SDE_WB_TRAFFIC_SHAPER, |
| 214 | SDE_WB_UBWC_1_0, |
Alan Kwong | 3232ca5 | 2016-07-29 02:27:47 -0400 | [diff] [blame] | 215 | SDE_WB_YUV_CONFIG, |
Alan Kwong | 9ffcd59 | 2016-09-27 07:41:56 -0400 | [diff] [blame] | 216 | SDE_WB_PIPE_ALPHA, |
abeykun | f1539f7 | 2016-08-24 16:08:03 -0400 | [diff] [blame] | 217 | SDE_WB_XY_ROI_OFFSET, |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 218 | SDE_WB_MAX |
| 219 | }; |
| 220 | |
| 221 | /** |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 222 | * VBIF sub-blocks and features |
| 223 | * @SDE_VBIF_QOS_OTLIM VBIF supports OT Limit |
| 224 | * @SDE_VBIF_MAX maximum value |
| 225 | */ |
| 226 | enum { |
| 227 | SDE_VBIF_QOS_OTLIM = 0x1, |
| 228 | SDE_VBIF_MAX |
| 229 | }; |
| 230 | |
| 231 | /** |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 232 | * MACRO SDE_HW_BLK_INFO - information of HW blocks inside SDE |
| 233 | * @id: enum identifying this block |
| 234 | * @base: register base offset to mdss |
Dhaval Patel | 8bf7ff3 | 2016-07-20 18:13:24 -0700 | [diff] [blame] | 235 | * @len: length of hardware block |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 236 | * @features bit mask identifying sub-blocks/features |
| 237 | */ |
| 238 | #define SDE_HW_BLK_INFO \ |
| 239 | u32 id; \ |
| 240 | u32 base; \ |
Dhaval Patel | 8bf7ff3 | 2016-07-20 18:13:24 -0700 | [diff] [blame] | 241 | u32 len; \ |
| 242 | unsigned long features; \ |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 243 | |
| 244 | /** |
| 245 | * MACRO SDE_HW_SUBBLK_INFO - information of HW sub-block inside SDE |
| 246 | * @id: enum identifying this sub-block |
| 247 | * @base: offset of this sub-block relative to the block |
| 248 | * offset |
| 249 | * @len register block length of this sub-block |
| 250 | */ |
| 251 | #define SDE_HW_SUBBLK_INFO \ |
| 252 | u32 id; \ |
| 253 | u32 base; \ |
| 254 | u32 len |
| 255 | |
| 256 | /** |
| 257 | * struct sde_src_blk: SSPP part of the source pipes |
| 258 | * @info: HW register and features supported by this sub-blk |
| 259 | */ |
| 260 | struct sde_src_blk { |
| 261 | SDE_HW_SUBBLK_INFO; |
| 262 | }; |
| 263 | |
| 264 | /** |
Clarence Ip | e78efb7 | 2016-06-24 18:35:21 -0400 | [diff] [blame] | 265 | * struct sde_scaler_blk: Scaler information |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 266 | * @info: HW register and features supported by this sub-blk |
abeykun | 48f407a | 2016-08-25 12:06:44 -0400 | [diff] [blame] | 267 | * @version: qseed block revision |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 268 | */ |
Clarence Ip | e78efb7 | 2016-06-24 18:35:21 -0400 | [diff] [blame] | 269 | struct sde_scaler_blk { |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 270 | SDE_HW_SUBBLK_INFO; |
abeykun | 48f407a | 2016-08-25 12:06:44 -0400 | [diff] [blame] | 271 | u32 version; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 272 | }; |
| 273 | |
| 274 | struct sde_csc_blk { |
| 275 | SDE_HW_SUBBLK_INFO; |
| 276 | }; |
| 277 | |
| 278 | /** |
| 279 | * struct sde_pp_blk : Pixel processing sub-blk information |
| 280 | * @info: HW register and features supported by this sub-blk |
| 281 | * @version: HW Algorithm version |
| 282 | */ |
| 283 | struct sde_pp_blk { |
| 284 | SDE_HW_SUBBLK_INFO; |
| 285 | u32 version; |
| 286 | }; |
| 287 | |
| 288 | /** |
Clarence Ip | ea3d626 | 2016-07-15 16:20:11 -0400 | [diff] [blame] | 289 | * struct sde_format_extended - define sde specific pixel format+modifier |
| 290 | * @fourcc_format: Base FOURCC pixel format code |
| 291 | * @modifier: 64-bit drm format modifier, same modifier must be applied to all |
| 292 | * framebuffer planes |
| 293 | */ |
| 294 | struct sde_format_extended { |
| 295 | uint32_t fourcc_format; |
| 296 | uint64_t modifier; |
| 297 | }; |
| 298 | |
| 299 | /** |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 300 | * struct sde_sspp_sub_blks : SSPP sub-blocks |
| 301 | * @maxdwnscale: max downscale ratio supported(without DECIMATION) |
| 302 | * @maxupscale: maxupscale ratio supported |
| 303 | * @maxwidth: max pixelwidth supported by this pipe |
Alan Kwong | 1a00e4d | 2016-07-18 09:42:30 -0400 | [diff] [blame] | 304 | * @danger_lut_linear: LUT to generate danger signals for linear format |
| 305 | * @safe_lut_linear: LUT to generate safe signals for linear format |
| 306 | * @danger_lut_tile: LUT to generate danger signals for tile format |
| 307 | * @safe_lut_tile: LUT to generate safe signals for tile format |
| 308 | * @danger_lut_nrt: LUT to generate danger signals for non-realtime use case |
| 309 | * @safe_lut_nrt: LUT to generate safe signals for non-realtime use case |
| 310 | * @creq_lut_nrt: LUT to generate creq signals for non-realtime use case |
| 311 | * @creq_vblank: creq priority during vertical blanking |
| 312 | * @danger_vblank: danger priority during vertical blanking |
| 313 | * @pixel_ram_size: size of latency hiding and de-tiling buffer in bytes |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 314 | * @src_blk: |
Clarence Ip | e78efb7 | 2016-06-24 18:35:21 -0400 | [diff] [blame] | 315 | * @scaler_blk: |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 316 | * @csc_blk: |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 317 | * @hsic: |
| 318 | * @memcolor: |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 319 | * @pcc_blk: |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 320 | * @igc_blk: |
Clarence Ip | ea3d626 | 2016-07-15 16:20:11 -0400 | [diff] [blame] | 321 | * @format_list: Pointer to list of supported formats |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 322 | */ |
| 323 | struct sde_sspp_sub_blks { |
| 324 | u32 maxlinewidth; |
Alan Kwong | 1a00e4d | 2016-07-18 09:42:30 -0400 | [diff] [blame] | 325 | u32 danger_lut_linear; |
| 326 | u32 safe_lut_linear; |
| 327 | u32 danger_lut_tile; |
| 328 | u32 safe_lut_tile; |
| 329 | u32 danger_lut_nrt; |
| 330 | u32 safe_lut_nrt; |
| 331 | u32 creq_lut_nrt; |
| 332 | u32 creq_vblank; |
| 333 | u32 danger_vblank; |
| 334 | u32 pixel_ram_size; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 335 | u32 maxdwnscale; |
| 336 | u32 maxupscale; |
Clarence Ip | 5e2a922 | 2016-06-26 22:38:24 -0400 | [diff] [blame] | 337 | u32 maxhdeciexp; /* max decimation is 2^value */ |
| 338 | u32 maxvdeciexp; /* max decimation is 2^value */ |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 339 | struct sde_src_blk src_blk; |
Clarence Ip | e78efb7 | 2016-06-24 18:35:21 -0400 | [diff] [blame] | 340 | struct sde_scaler_blk scaler_blk; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 341 | struct sde_pp_blk csc_blk; |
Benet Clark | 37809e6 | 2016-10-24 10:14:00 -0700 | [diff] [blame] | 342 | struct sde_pp_blk hsic_blk; |
| 343 | struct sde_pp_blk memcolor_blk; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 344 | struct sde_pp_blk pcc_blk; |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 345 | struct sde_pp_blk igc_blk; |
Clarence Ip | ea3d626 | 2016-07-15 16:20:11 -0400 | [diff] [blame] | 346 | |
| 347 | const struct sde_format_extended *format_list; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 348 | }; |
| 349 | |
| 350 | /** |
| 351 | * struct sde_lm_sub_blks: information of mixer block |
| 352 | * @maxwidth: Max pixel width supported by this mixer |
| 353 | * @maxblendstages: Max number of blend-stages supported |
| 354 | * @blendstage_base: Blend-stage register base offset |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 355 | * @gc: gamma correction block |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 356 | */ |
| 357 | struct sde_lm_sub_blks { |
| 358 | u32 maxwidth; |
| 359 | u32 maxblendstages; |
| 360 | u32 blendstage_base[MAX_BLOCKS]; |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 361 | struct sde_pp_blk gc; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 362 | }; |
| 363 | |
| 364 | struct sde_dspp_sub_blks { |
| 365 | struct sde_pp_blk igc; |
| 366 | struct sde_pp_blk pcc; |
| 367 | struct sde_pp_blk gc; |
Gopikrishnaiah Anandan | e3842f3 | 2015-11-05 12:18:41 -0800 | [diff] [blame] | 368 | struct sde_pp_blk hsic; |
| 369 | struct sde_pp_blk memcolor; |
| 370 | struct sde_pp_blk sixzone; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 371 | struct sde_pp_blk gamut; |
| 372 | struct sde_pp_blk dither; |
| 373 | struct sde_pp_blk hist; |
Gopikrishnaiah Anandan | 41980b4 | 2016-06-21 16:01:33 -0700 | [diff] [blame] | 374 | struct sde_pp_blk ad; |
Gopikrishnaiah Anandan | b67b0d1 | 2016-06-23 11:43:08 -0700 | [diff] [blame] | 375 | struct sde_pp_blk vlut; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 376 | }; |
| 377 | |
| 378 | struct sde_pingpong_sub_blks { |
| 379 | struct sde_pp_blk te; |
| 380 | struct sde_pp_blk te2; |
| 381 | struct sde_pp_blk dsc; |
| 382 | }; |
| 383 | |
| 384 | struct sde_wb_sub_blocks { |
| 385 | u32 maxlinewidth; |
| 386 | }; |
| 387 | |
Ben Chan | 78647cd | 2016-06-26 22:02:47 -0400 | [diff] [blame] | 388 | struct sde_mdss_base_cfg { |
| 389 | SDE_HW_BLK_INFO; |
| 390 | }; |
| 391 | |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 392 | /** |
| 393 | * sde_clk_ctrl_type - Defines top level clock control signals |
| 394 | */ |
| 395 | enum sde_clk_ctrl_type { |
| 396 | SDE_CLK_CTRL_NONE, |
| 397 | SDE_CLK_CTRL_VIG0, |
| 398 | SDE_CLK_CTRL_VIG1, |
| 399 | SDE_CLK_CTRL_VIG2, |
| 400 | SDE_CLK_CTRL_VIG3, |
| 401 | SDE_CLK_CTRL_VIG4, |
| 402 | SDE_CLK_CTRL_RGB0, |
| 403 | SDE_CLK_CTRL_RGB1, |
| 404 | SDE_CLK_CTRL_RGB2, |
| 405 | SDE_CLK_CTRL_RGB3, |
| 406 | SDE_CLK_CTRL_DMA0, |
| 407 | SDE_CLK_CTRL_DMA1, |
| 408 | SDE_CLK_CTRL_CURSOR0, |
| 409 | SDE_CLK_CTRL_CURSOR1, |
| 410 | SDE_CLK_CTRL_WB0, |
| 411 | SDE_CLK_CTRL_WB1, |
| 412 | SDE_CLK_CTRL_WB2, |
| 413 | SDE_CLK_CTRL_MAX, |
| 414 | }; |
| 415 | |
| 416 | /* struct sde_clk_ctrl_reg : Clock control register |
| 417 | * @reg_off: register offset |
| 418 | * @bit_off: bit offset |
| 419 | */ |
| 420 | struct sde_clk_ctrl_reg { |
| 421 | u32 reg_off; |
| 422 | u32 bit_off; |
| 423 | }; |
| 424 | |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 425 | /* struct sde_mdp_cfg : MDP TOP-BLK instance info |
| 426 | * @id: index identifying this block |
| 427 | * @base: register base offset to mdss |
| 428 | * @features bit mask identifying sub-blocks/features |
| 429 | * @highest_bank_bit: UBWC parameter |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 430 | * @clk_ctrls clock control register definition |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 431 | */ |
| 432 | struct sde_mdp_cfg { |
| 433 | SDE_HW_BLK_INFO; |
| 434 | u32 highest_bank_bit; |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 435 | struct sde_clk_ctrl_reg clk_ctrls[SDE_CLK_CTRL_MAX]; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 436 | }; |
| 437 | |
| 438 | /* struct sde_mdp_cfg : MDP TOP-BLK instance info |
| 439 | * @id: index identifying this block |
| 440 | * @base: register base offset to mdss |
| 441 | * @features bit mask identifying sub-blocks/features |
| 442 | */ |
| 443 | struct sde_ctl_cfg { |
| 444 | SDE_HW_BLK_INFO; |
| 445 | }; |
| 446 | |
| 447 | /** |
| 448 | * struct sde_sspp_cfg - information of source pipes |
| 449 | * @id: index identifying this block |
| 450 | * @base register offset of this block |
| 451 | * @features bit mask identifying sub-blocks/features |
Lloyd Atkinson | 350bb41 | 2016-07-06 10:47:29 -0400 | [diff] [blame] | 452 | * @sblk: SSPP sub-blocks information |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 453 | * @xin_id: bus client identifier |
| 454 | * @clk_ctrl clock control identifier |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 455 | */ |
| 456 | struct sde_sspp_cfg { |
| 457 | SDE_HW_BLK_INFO; |
| 458 | const struct sde_sspp_sub_blks *sblk; |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 459 | u32 xin_id; |
| 460 | enum sde_clk_ctrl_type clk_ctrl; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 461 | }; |
| 462 | |
| 463 | /** |
| 464 | * struct sde_lm_cfg - information of layer mixer blocks |
| 465 | * @id: index identifying this block |
| 466 | * @base register offset of this block |
| 467 | * @features bit mask identifying sub-blocks/features |
Lloyd Atkinson | 350bb41 | 2016-07-06 10:47:29 -0400 | [diff] [blame] | 468 | * @sblk: LM Sub-blocks information |
| 469 | * @dspp: ID of connected DSPP, DSPP_MAX if unsupported |
| 470 | * @pingpong: ID of connected PingPong, PINGPONG_MAX if unsupported |
| 471 | * @lm_pair_mask: Bitmask of LMs that can be controlled by same CTL |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 472 | */ |
| 473 | struct sde_lm_cfg { |
| 474 | SDE_HW_BLK_INFO; |
| 475 | const struct sde_lm_sub_blks *sblk; |
Lloyd Atkinson | 350bb41 | 2016-07-06 10:47:29 -0400 | [diff] [blame] | 476 | u32 dspp; |
| 477 | u32 pingpong; |
Lloyd Atkinson | 6b3b9dd | 2016-08-10 18:45:31 -0400 | [diff] [blame] | 478 | unsigned long lm_pair_mask; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 479 | }; |
| 480 | |
| 481 | /** |
| 482 | * struct sde_dspp_cfg - information of DSPP blocks |
| 483 | * @id enum identifying this block |
| 484 | * @base register offset of this block |
| 485 | * @features bit mask identifying sub-blocks/features |
| 486 | * supported by this block |
| 487 | * @sblk sub-blocks information |
| 488 | */ |
| 489 | struct sde_dspp_cfg { |
| 490 | SDE_HW_BLK_INFO; |
| 491 | const struct sde_dspp_sub_blks *sblk; |
| 492 | }; |
| 493 | |
| 494 | /** |
| 495 | * struct sde_pingpong_cfg - information of PING-PONG blocks |
| 496 | * @id enum identifying this block |
| 497 | * @base register offset of this block |
| 498 | * @features bit mask identifying sub-blocks/features |
| 499 | * @sblk sub-blocks information |
| 500 | */ |
| 501 | struct sde_pingpong_cfg { |
| 502 | SDE_HW_BLK_INFO; |
| 503 | const struct sde_pingpong_sub_blks *sblk; |
| 504 | }; |
| 505 | |
| 506 | /** |
| 507 | * struct sde_cdm_cfg - information of chroma down blocks |
| 508 | * @id enum identifying this block |
| 509 | * @base register offset of this block |
| 510 | * @features bit mask identifying sub-blocks/features |
Lloyd Atkinson | 6b3b9dd | 2016-08-10 18:45:31 -0400 | [diff] [blame] | 511 | * @intf_connect Bitmask of INTF IDs this CDM can connect to |
| 512 | * @wb_connect: Bitmask of Writeback IDs this CDM can connect to |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 513 | */ |
| 514 | struct sde_cdm_cfg { |
| 515 | SDE_HW_BLK_INFO; |
Lloyd Atkinson | 6b3b9dd | 2016-08-10 18:45:31 -0400 | [diff] [blame] | 516 | unsigned long intf_connect; |
| 517 | unsigned long wb_connect; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 518 | }; |
| 519 | |
| 520 | /** |
| 521 | * struct sde_intf_cfg - information of timing engine blocks |
| 522 | * @id enum identifying this block |
| 523 | * @base register offset of this block |
| 524 | * @features bit mask identifying sub-blocks/features |
| 525 | * @type: Interface type(DSI, DP, HDMI) |
Lloyd Atkinson | 2d4e766 | 2015-11-05 15:52:07 -0500 | [diff] [blame] | 526 | * @controller_id: Controller Instance ID in case of multiple of intf type |
Lloyd Atkinson | f30546e | 2016-06-26 10:08:25 -0400 | [diff] [blame] | 527 | * @prog_fetch_lines_worst_case Worst case latency num lines needed to prefetch |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 528 | */ |
| 529 | struct sde_intf_cfg { |
| 530 | SDE_HW_BLK_INFO; |
| 531 | u32 type; /* interface type*/ |
Lloyd Atkinson | 2d4e766 | 2015-11-05 15:52:07 -0500 | [diff] [blame] | 532 | u32 controller_id; |
Lloyd Atkinson | f30546e | 2016-06-26 10:08:25 -0400 | [diff] [blame] | 533 | u32 prog_fetch_lines_worst_case; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 534 | }; |
| 535 | |
| 536 | /** |
| 537 | * struct sde_wb_cfg - information of writeback blocks |
| 538 | * @id enum identifying this block |
| 539 | * @base register offset of this block |
| 540 | * @features bit mask identifying sub-blocks/features |
Alan Kwong | bb27c09 | 2016-07-20 16:41:25 -0400 | [diff] [blame] | 541 | * @sblk sub-block information |
| 542 | * @format_list: Pointer to list of supported formats |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 543 | * @vbif_idx vbif identifier |
| 544 | * @xin_id client interface identifier |
| 545 | * @clk_ctrl clock control identifier |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 546 | */ |
| 547 | struct sde_wb_cfg { |
| 548 | SDE_HW_BLK_INFO; |
Alan Kwong | bb27c09 | 2016-07-20 16:41:25 -0400 | [diff] [blame] | 549 | const struct sde_wb_sub_blocks *sblk; |
| 550 | const struct sde_format_extended *format_list; |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 551 | u32 vbif_idx; |
| 552 | u32 xin_id; |
| 553 | enum sde_clk_ctrl_type clk_ctrl; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 554 | }; |
| 555 | |
| 556 | /** |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 557 | * struct sde_vbif_dynamic_ot_cfg - dynamic OT setting |
| 558 | * @pps pixel per seconds |
| 559 | * @ot_limit OT limit to use up to specified pixel per second |
| 560 | */ |
| 561 | struct sde_vbif_dynamic_ot_cfg { |
| 562 | u64 pps; |
| 563 | u32 ot_limit; |
| 564 | }; |
| 565 | |
| 566 | /** |
| 567 | * struct sde_vbif_dynamic_ot_tbl - dynamic OT setting table |
| 568 | * @count length of cfg |
| 569 | * @cfg pointer to array of configuration settings with |
| 570 | * ascending requirements |
| 571 | */ |
| 572 | struct sde_vbif_dynamic_ot_tbl { |
| 573 | u32 count; |
Alan Kwong | b9d2f6f | 2016-10-12 00:27:07 -0400 | [diff] [blame] | 574 | struct sde_vbif_dynamic_ot_cfg *cfg; |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 575 | }; |
| 576 | |
| 577 | /** |
| 578 | * struct sde_vbif_cfg - information of VBIF blocks |
| 579 | * @id enum identifying this block |
| 580 | * @base register offset of this block |
| 581 | * @features bit mask identifying sub-blocks/features |
| 582 | * @ot_rd_limit default OT read limit |
| 583 | * @ot_wr_limit default OT write limit |
| 584 | * @xin_halt_timeout maximum time (in usec) for xin to halt |
| 585 | * @dynamic_ot_rd_tbl dynamic OT read configuration table |
| 586 | * @dynamic_ot_wr_tbl dynamic OT write configuration table |
| 587 | */ |
| 588 | struct sde_vbif_cfg { |
| 589 | SDE_HW_BLK_INFO; |
| 590 | u32 default_ot_rd_limit; |
| 591 | u32 default_ot_wr_limit; |
| 592 | u32 xin_halt_timeout; |
| 593 | struct sde_vbif_dynamic_ot_tbl dynamic_ot_rd_tbl; |
| 594 | struct sde_vbif_dynamic_ot_tbl dynamic_ot_wr_tbl; |
| 595 | }; |
| 596 | |
| 597 | /** |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 598 | * struct sde_mdss_cfg - information of MDSS HW |
| 599 | * This is the main catalog data structure representing |
| 600 | * this HW version. Contains number of instances, |
| 601 | * register offsets, capabilities of the all MDSS HW sub-blocks. |
Dhaval Patel | 8bf7ff3 | 2016-07-20 18:13:24 -0700 | [diff] [blame] | 602 | * |
| 603 | * @max_sspp_linewidth max source pipe line width support. |
| 604 | * @max_mixer_width max layer mixer line width support. |
| 605 | * @max_mixer_blendstages max layer mixer blend stages or |
| 606 | * supported z order |
| 607 | * @max_wb_linewidth max writeback line width support. |
| 608 | * @highest_bank_bit highest memory bit setting for tile buffers. |
| 609 | * @qseed_type qseed2 or qseed3 support. |
Dhaval Patel | 1964fb9 | 2016-10-13 19:28:08 -0700 | [diff] [blame] | 610 | * @has_src_split source split feature status |
| 611 | * @has_cdp Client driver prefetch feature status |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 612 | */ |
| 613 | struct sde_mdss_cfg { |
| 614 | u32 hwversion; |
| 615 | |
Dhaval Patel | 8bf7ff3 | 2016-07-20 18:13:24 -0700 | [diff] [blame] | 616 | u32 max_sspp_linewidth; |
| 617 | u32 max_mixer_width; |
| 618 | u32 max_mixer_blendstages; |
| 619 | u32 max_wb_linewidth; |
| 620 | u32 highest_bank_bit; |
| 621 | u32 qseed_type; |
Dhaval Patel | 1964fb9 | 2016-10-13 19:28:08 -0700 | [diff] [blame] | 622 | bool has_src_split; |
| 623 | bool has_cdp; |
Dhaval Patel | 8bf7ff3 | 2016-07-20 18:13:24 -0700 | [diff] [blame] | 624 | |
Ben Chan | 78647cd | 2016-06-26 22:02:47 -0400 | [diff] [blame] | 625 | u32 mdss_count; |
| 626 | struct sde_mdss_base_cfg mdss[MAX_BLOCKS]; |
| 627 | |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 628 | u32 mdp_count; |
| 629 | struct sde_mdp_cfg mdp[MAX_BLOCKS]; |
| 630 | |
| 631 | u32 ctl_count; |
| 632 | struct sde_ctl_cfg ctl[MAX_BLOCKS]; |
| 633 | |
| 634 | u32 sspp_count; |
Dhaval Patel | 8bf7ff3 | 2016-07-20 18:13:24 -0700 | [diff] [blame] | 635 | struct sde_sspp_cfg sspp[MAX_BLOCKS]; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 636 | |
| 637 | u32 mixer_count; |
| 638 | struct sde_lm_cfg mixer[MAX_BLOCKS]; |
| 639 | |
| 640 | u32 dspp_count; |
| 641 | struct sde_dspp_cfg dspp[MAX_BLOCKS]; |
| 642 | |
| 643 | u32 pingpong_count; |
| 644 | struct sde_pingpong_cfg pingpong[MAX_BLOCKS]; |
| 645 | |
| 646 | u32 cdm_count; |
| 647 | struct sde_cdm_cfg cdm[MAX_BLOCKS]; |
| 648 | |
| 649 | u32 intf_count; |
| 650 | struct sde_intf_cfg intf[MAX_BLOCKS]; |
| 651 | |
| 652 | u32 wb_count; |
| 653 | struct sde_wb_cfg wb[MAX_BLOCKS]; |
| 654 | |
Alan Kwong | 5d324e4 | 2016-07-28 22:56:18 -0400 | [diff] [blame] | 655 | u32 vbif_count; |
| 656 | struct sde_vbif_cfg vbif[MAX_BLOCKS]; |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 657 | /* Add additional block data structures here */ |
| 658 | }; |
| 659 | |
| 660 | struct sde_mdss_hw_cfg_handler { |
| 661 | u32 major; |
| 662 | u32 minor; |
| 663 | struct sde_mdss_cfg* (*cfg_init)(u32); |
| 664 | }; |
| 665 | |
| 666 | /* |
| 667 | * Access Macros |
| 668 | */ |
| 669 | #define BLK_MDP(s) ((s)->mdp) |
| 670 | #define BLK_CTL(s) ((s)->ctl) |
| 671 | #define BLK_VIG(s) ((s)->vig) |
| 672 | #define BLK_RGB(s) ((s)->rgb) |
| 673 | #define BLK_DMA(s) ((s)->dma) |
| 674 | #define BLK_CURSOR(s) ((s)->cursor) |
| 675 | #define BLK_MIXER(s) ((s)->mixer) |
| 676 | #define BLK_DSPP(s) ((s)->dspp) |
| 677 | #define BLK_PINGPONG(s) ((s)->pingpong) |
| 678 | #define BLK_CDM(s) ((s)->cdm) |
| 679 | #define BLK_INTF(s) ((s)->intf) |
| 680 | #define BLK_WB(s) ((s)->wb) |
| 681 | #define BLK_AD(s) ((s)->ad) |
| 682 | |
Dhaval Patel | 8bf7ff3 | 2016-07-20 18:13:24 -0700 | [diff] [blame] | 683 | /** |
Clarence Ip | 17162b5 | 2016-11-24 17:06:29 -0500 | [diff] [blame^] | 684 | * sde_hw_catalog_init - sde hardware catalog init API parses dtsi property |
Dhaval Patel | 8bf7ff3 | 2016-07-20 18:13:24 -0700 | [diff] [blame] | 685 | * and stores all parsed offset, hardware capabilities in config structure. |
| 686 | * @dev: drm device node. |
| 687 | * @hw_rev: caller needs provide the hardware revision before parsing. |
| 688 | * |
| 689 | * Return: parsed sde config structure |
| 690 | */ |
| 691 | struct sde_mdss_cfg *sde_hw_catalog_init(struct drm_device *dev, u32 hw_rev); |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 692 | |
Clarence Ip | 17162b5 | 2016-11-24 17:06:29 -0500 | [diff] [blame^] | 693 | /** |
| 694 | * sde_hw_catalog_deinit - sde hardware catalog cleanup |
| 695 | * @sde_cfg: pointer returned from init function |
| 696 | */ |
| 697 | void sde_hw_catalog_deinit(struct sde_mdss_cfg *sde_cfg); |
| 698 | |
Narendra Muppalla | 1b0b335 | 2015-09-29 10:16:51 -0700 | [diff] [blame] | 699 | #endif /* _SDE_HW_CATALOG_H */ |