1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
3 * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
6 #define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
7 #include <linux/slab.h>
8 #include <linux/of_address.h>
9 #include <linux/platform_device.h>
10 #include "dpu_hw_mdss.h"
11 #include "dpu_hw_interrupts.h"
12 #include "dpu_hw_catalog.h"
15 #define VIG_BASE_MASK \
18 BIT(DPU_SSPP_TS_PREFILL) | BIT(DPU_SSPP_EXCL_RECT))
22 BIT(DPU_SSPP_CSC_10BIT))
24 #define VIG_MSM8998_MASK \
25 (VIG_MASK | BIT(DPU_SSPP_SCALER_QSEED3))
27 #define VIG_SDM845_MASK \
28 (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED3))
30 #define VIG_SDM845_MASK_SDMA \
31 (VIG_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
33 #define VIG_SC7180_MASK \
34 (VIG_MASK | BIT(DPU_SSPP_QOS_8LVL) | BIT(DPU_SSPP_SCALER_QSEED4))
36 #define VIG_SC7180_MASK_SDMA \
37 (VIG_SC7180_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
39 #define VIG_QCM2290_MASK (VIG_BASE_MASK | BIT(DPU_SSPP_QOS_8LVL))
41 #define DMA_MSM8998_MASK \
43 BIT(DPU_SSPP_TS_PREFILL) | BIT(DPU_SSPP_TS_PREFILL_REC1) |\
44 BIT(DPU_SSPP_CDP) | BIT(DPU_SSPP_EXCL_RECT))
46 #define VIG_SC7280_MASK \
47 (VIG_SC7180_MASK | BIT(DPU_SSPP_INLINE_ROTATION))
49 #define VIG_SC7280_MASK_SDMA \
50 (VIG_SC7280_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
52 #define DMA_SDM845_MASK \
53 (BIT(DPU_SSPP_QOS) | BIT(DPU_SSPP_QOS_8LVL) |\
54 BIT(DPU_SSPP_TS_PREFILL) | BIT(DPU_SSPP_TS_PREFILL_REC1) |\
55 BIT(DPU_SSPP_CDP) | BIT(DPU_SSPP_EXCL_RECT))
57 #define DMA_CURSOR_SDM845_MASK \
58 (DMA_SDM845_MASK | BIT(DPU_SSPP_CURSOR))
60 #define DMA_SDM845_MASK_SDMA \
61 (DMA_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
63 #define DMA_CURSOR_SDM845_MASK_SDMA \
64 (DMA_CURSOR_SDM845_MASK | BIT(DPU_SSPP_SMART_DMA_V2))
66 #define DMA_CURSOR_MSM8998_MASK \
67 (DMA_MSM8998_MASK | BIT(DPU_SSPP_CURSOR))
69 #define MIXER_MSM8998_MASK \
70 (BIT(DPU_MIXER_SOURCESPLIT))
72 #define MIXER_SDM845_MASK \
73 (BIT(DPU_MIXER_SOURCESPLIT) | BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA))
75 #define MIXER_QCM2290_MASK \
76 (BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA))
78 #define PINGPONG_SDM845_MASK \
79 (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_TE) | BIT(DPU_PINGPONG_DSC))
81 #define PINGPONG_SDM845_TE2_MASK \
82 (PINGPONG_SDM845_MASK | BIT(DPU_PINGPONG_TE2))
84 #define PINGPONG_SM8150_MASK \
85 (BIT(DPU_PINGPONG_DITHER) | BIT(DPU_PINGPONG_DSC))
87 #define CTL_SC7280_MASK \
88 (BIT(DPU_CTL_ACTIVE_CFG) | \
89 BIT(DPU_CTL_FETCH_ACTIVE) | \
90 BIT(DPU_CTL_VM_CFG) | \
91 BIT(DPU_CTL_DSPP_SUB_BLOCK_FLUSH))
93 #define CTL_SM8550_MASK \
94 (CTL_SC7280_MASK | BIT(DPU_CTL_HAS_LAYER_EXT4))
96 #define MERGE_3D_SM8150_MASK (0)
98 #define DSPP_SC7180_MASK BIT(DPU_DSPP_PCC)
100 #define INTF_SDM845_MASK (0)
102 #define INTF_SC7180_MASK \
103 (BIT(DPU_INTF_INPUT_CTRL) | \
105 BIT(DPU_INTF_STATUS_SUPPORTED) | \
106 BIT(DPU_DATA_HCTL_EN))
108 #define INTF_SC7280_MASK (INTF_SC7180_MASK | BIT(DPU_INTF_DATA_COMPRESS))
110 #define WB_SM8250_MASK (BIT(DPU_WB_LINE_MODE) | \
112 BIT(DPU_WB_YUV_CONFIG) | \
113 BIT(DPU_WB_PIPE_ALPHA) | \
114 BIT(DPU_WB_XY_ROI_OFFSET) | \
116 BIT(DPU_WB_QOS_8LVL) | \
118 BIT(DPU_WB_INPUT_CTRL))
120 #define DEFAULT_PIXEL_RAM_SIZE (50 * 1024)
121 #define DEFAULT_DPU_LINE_WIDTH 2048
122 #define DEFAULT_DPU_OUTPUT_LINE_WIDTH 2560
124 #define MAX_HORZ_DECIMATION 4
125 #define MAX_VERT_DECIMATION 4
127 #define MAX_UPSCALE_RATIO 20
128 #define MAX_DOWNSCALE_RATIO 4
129 #define SSPP_UNITY_SCALE 1
131 #define STRCAT(X, Y) (X Y)
133 static const uint32_t plane_formats[] = {
142 DRM_FORMAT_ARGB2101010,
143 DRM_FORMAT_XRGB2101010,
166 static const uint32_t plane_formats_yuv[] = {
172 DRM_FORMAT_ARGB2101010,
173 DRM_FORMAT_XRGB2101010,
211 static const u32 rotation_v2_formats[] = {
213 /* TODO add formats after validation */
216 static const uint32_t wb2_formats[] = {
250 /*************************************************************
251 * SSPP sub blocks config
252 *************************************************************/
254 /* SSPP common configuration */
255 #define _VIG_SBLK(num, sdma_pri, qseed_ver) \
257 .maxdwnscale = MAX_DOWNSCALE_RATIO, \
258 .maxupscale = MAX_UPSCALE_RATIO, \
259 .smart_dma_priority = sdma_pri, \
260 .scaler_blk = {.name = STRCAT("sspp_scaler", num), \
262 .base = 0xa00, .len = 0xa0,}, \
263 .csc_blk = {.name = STRCAT("sspp_csc", num), \
264 .id = DPU_SSPP_CSC_10BIT, \
265 .base = 0x1a00, .len = 0x100,}, \
266 .format_list = plane_formats_yuv, \
267 .num_formats = ARRAY_SIZE(plane_formats_yuv), \
268 .virt_format_list = plane_formats, \
269 .virt_num_formats = ARRAY_SIZE(plane_formats), \
270 .rotation_cfg = NULL, \
273 #define _VIG_SBLK_ROT(num, sdma_pri, qseed_ver, rot_cfg) \
275 .maxdwnscale = MAX_DOWNSCALE_RATIO, \
276 .maxupscale = MAX_UPSCALE_RATIO, \
277 .smart_dma_priority = sdma_pri, \
278 .scaler_blk = {.name = STRCAT("sspp_scaler", num), \
280 .base = 0xa00, .len = 0xa0,}, \
281 .csc_blk = {.name = STRCAT("sspp_csc", num), \
282 .id = DPU_SSPP_CSC_10BIT, \
283 .base = 0x1a00, .len = 0x100,}, \
284 .format_list = plane_formats_yuv, \
285 .num_formats = ARRAY_SIZE(plane_formats_yuv), \
286 .virt_format_list = plane_formats, \
287 .virt_num_formats = ARRAY_SIZE(plane_formats), \
288 .rotation_cfg = rot_cfg, \
291 #define _DMA_SBLK(num, sdma_pri) \
293 .maxdwnscale = SSPP_UNITY_SCALE, \
294 .maxupscale = SSPP_UNITY_SCALE, \
295 .smart_dma_priority = sdma_pri, \
296 .format_list = plane_formats, \
297 .num_formats = ARRAY_SIZE(plane_formats), \
298 .virt_format_list = plane_formats, \
299 .virt_num_formats = ARRAY_SIZE(plane_formats), \
302 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_0 =
303 _VIG_SBLK("0", 0, DPU_SSPP_SCALER_QSEED3);
304 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_1 =
305 _VIG_SBLK("1", 0, DPU_SSPP_SCALER_QSEED3);
306 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_2 =
307 _VIG_SBLK("2", 0, DPU_SSPP_SCALER_QSEED3);
308 static const struct dpu_sspp_sub_blks msm8998_vig_sblk_3 =
309 _VIG_SBLK("3", 0, DPU_SSPP_SCALER_QSEED3);
311 static const struct dpu_rotation_cfg dpu_rot_sc7280_cfg_v2 = {
312 .rot_maxheight = 1088,
313 .rot_num_formats = ARRAY_SIZE(rotation_v2_formats),
314 .rot_format_list = rotation_v2_formats,
317 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_0 =
318 _VIG_SBLK("0", 5, DPU_SSPP_SCALER_QSEED3);
319 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_1 =
320 _VIG_SBLK("1", 6, DPU_SSPP_SCALER_QSEED3);
321 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_2 =
322 _VIG_SBLK("2", 7, DPU_SSPP_SCALER_QSEED3);
323 static const struct dpu_sspp_sub_blks sdm845_vig_sblk_3 =
324 _VIG_SBLK("3", 8, DPU_SSPP_SCALER_QSEED3);
326 static const struct dpu_sspp_sub_blks sdm845_dma_sblk_0 = _DMA_SBLK("8", 1);
327 static const struct dpu_sspp_sub_blks sdm845_dma_sblk_1 = _DMA_SBLK("9", 2);
328 static const struct dpu_sspp_sub_blks sdm845_dma_sblk_2 = _DMA_SBLK("10", 3);
329 static const struct dpu_sspp_sub_blks sdm845_dma_sblk_3 = _DMA_SBLK("11", 4);
331 #define SSPP_BLK(_name, _id, _base, _len, _features, \
332 _sblk, _xinid, _type, _clkctrl) \
334 .name = _name, .id = _id, \
335 .base = _base, .len = _len, \
336 .features = _features, \
340 .clk_ctrl = _clkctrl \
343 static const struct dpu_sspp_sub_blks sc7180_vig_sblk_0 =
344 _VIG_SBLK("0", 4, DPU_SSPP_SCALER_QSEED4);
346 static const struct dpu_sspp_sub_blks sc7280_vig_sblk_0 =
347 _VIG_SBLK_ROT("0", 4, DPU_SSPP_SCALER_QSEED4, &dpu_rot_sc7280_cfg_v2);
349 static const struct dpu_sspp_sub_blks sm6115_vig_sblk_0 =
350 _VIG_SBLK("0", 2, DPU_SSPP_SCALER_QSEED4);
352 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_0 =
353 _VIG_SBLK("0", 5, DPU_SSPP_SCALER_QSEED4);
354 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_1 =
355 _VIG_SBLK("1", 6, DPU_SSPP_SCALER_QSEED4);
356 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_2 =
357 _VIG_SBLK("2", 7, DPU_SSPP_SCALER_QSEED4);
358 static const struct dpu_sspp_sub_blks sm8250_vig_sblk_3 =
359 _VIG_SBLK("3", 8, DPU_SSPP_SCALER_QSEED4);
361 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_0 =
362 _VIG_SBLK("0", 7, DPU_SSPP_SCALER_QSEED4);
363 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_1 =
364 _VIG_SBLK("1", 8, DPU_SSPP_SCALER_QSEED4);
365 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_2 =
366 _VIG_SBLK("2", 9, DPU_SSPP_SCALER_QSEED4);
367 static const struct dpu_sspp_sub_blks sm8550_vig_sblk_3 =
368 _VIG_SBLK("3", 10, DPU_SSPP_SCALER_QSEED4);
369 static const struct dpu_sspp_sub_blks sm8550_dma_sblk_4 = _DMA_SBLK("12", 5);
370 static const struct dpu_sspp_sub_blks sm8550_dma_sblk_5 = _DMA_SBLK("13", 6);
372 #define _VIG_SBLK_NOSCALE(num, sdma_pri) \
374 .maxdwnscale = SSPP_UNITY_SCALE, \
375 .maxupscale = SSPP_UNITY_SCALE, \
376 .smart_dma_priority = sdma_pri, \
377 .format_list = plane_formats_yuv, \
378 .num_formats = ARRAY_SIZE(plane_formats_yuv), \
379 .virt_format_list = plane_formats, \
380 .virt_num_formats = ARRAY_SIZE(plane_formats), \
383 static const struct dpu_sspp_sub_blks qcm2290_vig_sblk_0 = _VIG_SBLK_NOSCALE("0", 2);
384 static const struct dpu_sspp_sub_blks qcm2290_dma_sblk_0 = _DMA_SBLK("8", 1);
386 /*************************************************************
387 * MIXER sub blocks config
388 *************************************************************/
390 #define LM_BLK(_name, _id, _base, _fmask, _sblk, _pp, _lmpair, _dspp) \
392 .name = _name, .id = _id, \
393 .base = _base, .len = 0x320, \
394 .features = _fmask, \
397 .lm_pair_mask = (1 << _lmpair), \
403 static const struct dpu_lm_sub_blks msm8998_lm_sblk = {
404 .maxwidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
405 .maxblendstages = 7, /* excluding base layer */
406 .blendstage_base = { /* offsets relative to mixer base */
407 0x20, 0x50, 0x80, 0xb0, 0x230,
414 static const struct dpu_lm_sub_blks sdm845_lm_sblk = {
415 .maxwidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
416 .maxblendstages = 11, /* excluding base layer */
417 .blendstage_base = { /* offsets relative to mixer base */
418 0x20, 0x38, 0x50, 0x68, 0x80, 0x98,
419 0xb0, 0xc8, 0xe0, 0xf8, 0x110
425 static const struct dpu_lm_sub_blks sc7180_lm_sblk = {
426 .maxwidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
427 .maxblendstages = 7, /* excluding base layer */
428 .blendstage_base = { /* offsets relative to mixer base */
429 0x20, 0x38, 0x50, 0x68, 0x80, 0x98, 0xb0
435 static const struct dpu_lm_sub_blks qcm2290_lm_sblk = {
436 .maxwidth = DEFAULT_DPU_LINE_WIDTH,
437 .maxblendstages = 4, /* excluding base layer */
438 .blendstage_base = { /* offsets relative to mixer base */
439 0x20, 0x38, 0x50, 0x68
443 /*************************************************************
444 * DSPP sub blocks config
445 *************************************************************/
446 static const struct dpu_dspp_sub_blks msm8998_dspp_sblk = {
447 .pcc = {.id = DPU_DSPP_PCC, .base = 0x1700,
448 .len = 0x90, .version = 0x10007},
451 static const struct dpu_dspp_sub_blks sm8150_dspp_sblk = {
452 .pcc = {.id = DPU_DSPP_PCC, .base = 0x1700,
453 .len = 0x90, .version = 0x40000},
456 #define DSPP_BLK(_name, _id, _base, _mask, _sblk) \
458 .name = _name, .id = _id, \
459 .base = _base, .len = 0x1800, \
464 /*************************************************************
465 * PINGPONG sub blocks config
466 *************************************************************/
467 static const struct dpu_pingpong_sub_blks sdm845_pp_sblk_te = {
468 .te2 = {.id = DPU_PINGPONG_TE2, .base = 0x2000, .len = 0x0,
470 .dither = {.id = DPU_PINGPONG_DITHER, .base = 0x30e0,
471 .len = 0x20, .version = 0x10000},
474 static const struct dpu_pingpong_sub_blks sdm845_pp_sblk = {
475 .dither = {.id = DPU_PINGPONG_DITHER, .base = 0x30e0,
476 .len = 0x20, .version = 0x10000},
479 static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = {
480 .dither = {.id = DPU_PINGPONG_DITHER, .base = 0xe0,
481 .len = 0x20, .version = 0x20000},
484 #define PP_BLK_DITHER(_name, _id, _base, _merge_3d, _sblk, _done, _rdptr) \
486 .name = _name, .id = _id, \
487 .base = _base, .len = 0, \
488 .features = BIT(DPU_PINGPONG_DITHER), \
489 .merge_3d = _merge_3d, \
491 .intr_done = _done, \
492 .intr_rdptr = _rdptr, \
494 #define PP_BLK(_name, _id, _base, _features, _merge_3d, _sblk, _done, _rdptr) \
496 .name = _name, .id = _id, \
497 .base = _base, .len = 0xd4, \
498 .features = _features, \
499 .merge_3d = _merge_3d, \
501 .intr_done = _done, \
502 .intr_rdptr = _rdptr, \
505 /*************************************************************
506 * MERGE_3D sub blocks config
507 *************************************************************/
508 #define MERGE_3D_BLK(_name, _id, _base) \
510 .name = _name, .id = _id, \
511 .base = _base, .len = 0x8, \
512 .features = MERGE_3D_SM8150_MASK, \
516 /*************************************************************
517 * DSC sub blocks config
518 *************************************************************/
519 static const struct dpu_dsc_sub_blks dsc_sblk_0 = {
520 .enc = {.base = 0x100, .len = 0x100},
521 .ctl = {.base = 0xF00, .len = 0x10},
524 static const struct dpu_dsc_sub_blks dsc_sblk_1 = {
525 .enc = {.base = 0x200, .len = 0x100},
526 .ctl = {.base = 0xF80, .len = 0x10},
529 #define DSC_BLK(_name, _id, _base, _features) \
531 .name = _name, .id = _id, \
532 .base = _base, .len = 0x140, \
533 .features = _features, \
536 #define DSC_BLK_1_2(_name, _id, _base, _len, _features, _sblk) \
538 .name = _name, .id = _id, \
539 .base = _base, .len = _len, \
540 .features = BIT(DPU_DSC_HW_REV_1_2) | _features, \
544 /*************************************************************
545 * INTF sub blocks config
546 *************************************************************/
547 #define INTF_BLK(_name, _id, _base, _len, _type, _ctrl_id, _progfetch, _features, _underrun, _vsync) \
549 .name = _name, .id = _id, \
550 .base = _base, .len = _len, \
551 .features = _features, \
553 .controller_id = _ctrl_id, \
554 .prog_fetch_lines_worst_case = _progfetch, \
555 .intr_underrun = _underrun, \
556 .intr_vsync = _vsync, \
557 .intr_tear_rd_ptr = -1, \
560 /* DSI Interface sub-block with TEAR registers (since DPU 5.0.0) */
561 #define INTF_BLK_DSI_TE(_name, _id, _base, _len, _type, _ctrl_id, _progfetch, _features, _underrun, _vsync, _tear_rd_ptr) \
563 .name = _name, .id = _id, \
564 .base = _base, .len = _len, \
565 .features = _features, \
567 .controller_id = _ctrl_id, \
568 .prog_fetch_lines_worst_case = _progfetch, \
569 .intr_underrun = _underrun, \
570 .intr_vsync = _vsync, \
571 .intr_tear_rd_ptr = _tear_rd_ptr, \
574 /*************************************************************
575 * Writeback blocks config
576 *************************************************************/
577 #define WB_BLK(_name, _id, _base, _features, _clk_ctrl, \
578 __xin_id, vbif_id, _reg, _max_linewidth, _wb_done_bit) \
580 .name = _name, .id = _id, \
581 .base = _base, .len = 0x2c8, \
582 .features = _features, \
583 .format_list = wb2_formats, \
584 .num_formats = ARRAY_SIZE(wb2_formats), \
585 .clk_ctrl = _clk_ctrl, \
586 .xin_id = __xin_id, \
587 .vbif_idx = vbif_id, \
588 .maxlinewidth = _max_linewidth, \
589 .intr_wb_done = DPU_IRQ_IDX(_reg, _wb_done_bit) \
592 /*************************************************************
593 * VBIF sub blocks config
594 *************************************************************/
596 static const u32 msm8998_rt_pri_lvl[] = {1, 2, 2, 2};
597 static const u32 msm8998_nrt_pri_lvl[] = {1, 1, 1, 1};
598 static const u32 sdm845_rt_pri_lvl[] = {3, 3, 4, 4, 5, 5, 6, 6};
599 static const u32 sdm845_nrt_pri_lvl[] = {3, 3, 3, 3, 3, 3, 3, 3};
601 static const struct dpu_vbif_dynamic_ot_cfg msm8998_ot_rdwr_cfg[] = {
603 .pps = 1920 * 1080 * 30,
607 .pps = 1920 * 1080 * 60,
611 .pps = 3840 * 2160 * 30,
616 static const struct dpu_vbif_cfg msm8998_vbif[] = {
618 .name = "vbif_rt", .id = VBIF_RT,
619 .base = 0, .len = 0x1040,
620 .default_ot_rd_limit = 32,
621 .default_ot_wr_limit = 32,
622 .features = BIT(DPU_VBIF_QOS_REMAP) | BIT(DPU_VBIF_QOS_OTLIM),
623 .xin_halt_timeout = 0x4000,
624 .qos_rp_remap_size = 0x20,
625 .dynamic_ot_rd_tbl = {
626 .count = ARRAY_SIZE(msm8998_ot_rdwr_cfg),
627 .cfg = msm8998_ot_rdwr_cfg,
629 .dynamic_ot_wr_tbl = {
630 .count = ARRAY_SIZE(msm8998_ot_rdwr_cfg),
631 .cfg = msm8998_ot_rdwr_cfg,
634 .npriority_lvl = ARRAY_SIZE(msm8998_rt_pri_lvl),
635 .priority_lvl = msm8998_rt_pri_lvl,
638 .npriority_lvl = ARRAY_SIZE(msm8998_nrt_pri_lvl),
639 .priority_lvl = msm8998_nrt_pri_lvl,
642 .memtype = {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
646 static const struct dpu_vbif_cfg sdm845_vbif[] = {
648 .name = "vbif_rt", .id = VBIF_RT,
649 .base = 0, .len = 0x1040,
650 .features = BIT(DPU_VBIF_QOS_REMAP),
651 .xin_halt_timeout = 0x4000,
652 .qos_rp_remap_size = 0x40,
654 .npriority_lvl = ARRAY_SIZE(sdm845_rt_pri_lvl),
655 .priority_lvl = sdm845_rt_pri_lvl,
658 .npriority_lvl = ARRAY_SIZE(sdm845_nrt_pri_lvl),
659 .priority_lvl = sdm845_nrt_pri_lvl,
662 .memtype = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3},
666 /*************************************************************
668 *************************************************************/
671 static const struct dpu_qos_lut_entry msm8998_qos_linear[] = {
672 {.fl = 4, .lut = 0x1b},
673 {.fl = 5, .lut = 0x5b},
674 {.fl = 6, .lut = 0x15b},
675 {.fl = 7, .lut = 0x55b},
676 {.fl = 8, .lut = 0x155b},
677 {.fl = 9, .lut = 0x555b},
678 {.fl = 10, .lut = 0x1555b},
679 {.fl = 11, .lut = 0x5555b},
680 {.fl = 12, .lut = 0x15555b},
681 {.fl = 0, .lut = 0x55555b}
684 static const struct dpu_qos_lut_entry sdm845_qos_linear[] = {
685 {.fl = 4, .lut = 0x357},
686 {.fl = 5, .lut = 0x3357},
687 {.fl = 6, .lut = 0x23357},
688 {.fl = 7, .lut = 0x223357},
689 {.fl = 8, .lut = 0x2223357},
690 {.fl = 9, .lut = 0x22223357},
691 {.fl = 10, .lut = 0x222223357},
692 {.fl = 11, .lut = 0x2222223357},
693 {.fl = 12, .lut = 0x22222223357},
694 {.fl = 13, .lut = 0x222222223357},
695 {.fl = 14, .lut = 0x1222222223357},
696 {.fl = 0, .lut = 0x11222222223357}
699 static const struct dpu_qos_lut_entry msm8998_qos_macrotile[] = {
700 {.fl = 10, .lut = 0x1aaff},
701 {.fl = 11, .lut = 0x5aaff},
702 {.fl = 12, .lut = 0x15aaff},
703 {.fl = 0, .lut = 0x55aaff},
706 static const struct dpu_qos_lut_entry sc7180_qos_linear[] = {
707 {.fl = 0, .lut = 0x0011222222335777},
710 static const struct dpu_qos_lut_entry sm6350_qos_linear_macrotile[] = {
711 {.fl = 0, .lut = 0x0011223445566777 },
714 static const struct dpu_qos_lut_entry sm8150_qos_linear[] = {
715 {.fl = 0, .lut = 0x0011222222223357 },
718 static const struct dpu_qos_lut_entry sc8180x_qos_linear[] = {
719 {.fl = 4, .lut = 0x0000000000000357 },
722 static const struct dpu_qos_lut_entry qcm2290_qos_linear[] = {
723 {.fl = 0, .lut = 0x0011222222335777},
726 static const struct dpu_qos_lut_entry sdm845_qos_macrotile[] = {
727 {.fl = 10, .lut = 0x344556677},
728 {.fl = 11, .lut = 0x3344556677},
729 {.fl = 12, .lut = 0x23344556677},
730 {.fl = 13, .lut = 0x223344556677},
731 {.fl = 14, .lut = 0x1223344556677},
732 {.fl = 0, .lut = 0x112233344556677},
735 static const struct dpu_qos_lut_entry sc7180_qos_macrotile[] = {
736 {.fl = 0, .lut = 0x0011223344556677},
739 static const struct dpu_qos_lut_entry sc8180x_qos_macrotile[] = {
740 {.fl = 10, .lut = 0x0000000344556677},
743 static const struct dpu_qos_lut_entry msm8998_qos_nrt[] = {
744 {.fl = 0, .lut = 0x0},
747 static const struct dpu_qos_lut_entry sdm845_qos_nrt[] = {
748 {.fl = 0, .lut = 0x0},
751 static const struct dpu_qos_lut_entry sc7180_qos_nrt[] = {
752 {.fl = 0, .lut = 0x0},
755 /*************************************************************
757 *************************************************************/
759 #include "catalog/dpu_3_0_msm8998.h"
761 #include "catalog/dpu_4_0_sdm845.h"
763 #include "catalog/dpu_5_0_sm8150.h"
764 #include "catalog/dpu_5_1_sc8180x.h"
766 #include "catalog/dpu_6_0_sm8250.h"
767 #include "catalog/dpu_6_2_sc7180.h"
768 #include "catalog/dpu_6_3_sm6115.h"
769 #include "catalog/dpu_6_4_sm6350.h"
770 #include "catalog/dpu_6_5_qcm2290.h"
771 #include "catalog/dpu_6_9_sm6375.h"
773 #include "catalog/dpu_7_0_sm8350.h"
774 #include "catalog/dpu_7_2_sc7280.h"
776 #include "catalog/dpu_8_0_sc8280xp.h"
777 #include "catalog/dpu_8_1_sm8450.h"
779 #include "catalog/dpu_9_0_sm8550.h"