@@ -92,6 +92,22 @@ static const struct dpu_caps sc7180_dpu_caps = {
92
92
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE ,
93
93
};
94
94
95
+ static const struct dpu_caps sm8150_dpu_caps = {
96
+ .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH ,
97
+ .max_mixer_blendstages = 0xb ,
98
+ .qseed_type = DPU_SSPP_SCALER_QSEED3 ,
99
+ .smart_dma_rev = DPU_SSPP_SMART_DMA_V2 , /* TODO: v2.5 */
100
+ .ubwc_version = DPU_HW_UBWC_VER_30 ,
101
+ .has_src_split = true,
102
+ .has_dim_layer = true,
103
+ .has_idle_pc = true,
104
+ .has_3d_merge = true,
105
+ .max_linewidth = 4096 ,
106
+ .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE ,
107
+ .max_hdeci_exp = MAX_HORZ_DECIMATION ,
108
+ .max_vdeci_exp = MAX_VERT_DECIMATION ,
109
+ };
110
+
95
111
static const struct dpu_mdp_cfg sdm845_mdp [] = {
96
112
{
97
113
.name = "top_0" , .id = MDP_TOP ,
@@ -183,6 +199,39 @@ static const struct dpu_ctl_cfg sc7180_ctl[] = {
183
199
},
184
200
};
185
201
202
+ static const struct dpu_ctl_cfg sm8150_ctl [] = {
203
+ {
204
+ .name = "ctl_0" , .id = CTL_0 ,
205
+ .base = 0x1000 , .len = 0x1e0 ,
206
+ .features = BIT (DPU_CTL_ACTIVE_CFG ) | BIT (DPU_CTL_SPLIT_DISPLAY )
207
+ },
208
+ {
209
+ .name = "ctl_1" , .id = CTL_1 ,
210
+ .base = 0x1200 , .len = 0x1e0 ,
211
+ .features = BIT (DPU_CTL_ACTIVE_CFG ) | BIT (DPU_CTL_SPLIT_DISPLAY )
212
+ },
213
+ {
214
+ .name = "ctl_2" , .id = CTL_2 ,
215
+ .base = 0x1400 , .len = 0x1e0 ,
216
+ .features = BIT (DPU_CTL_ACTIVE_CFG )
217
+ },
218
+ {
219
+ .name = "ctl_3" , .id = CTL_3 ,
220
+ .base = 0x1600 , .len = 0x1e0 ,
221
+ .features = BIT (DPU_CTL_ACTIVE_CFG )
222
+ },
223
+ {
224
+ .name = "ctl_4" , .id = CTL_4 ,
225
+ .base = 0x1800 , .len = 0x1e0 ,
226
+ .features = BIT (DPU_CTL_ACTIVE_CFG )
227
+ },
228
+ {
229
+ .name = "ctl_5" , .id = CTL_5 ,
230
+ .base = 0x1a00 , .len = 0x1e0 ,
231
+ .features = BIT (DPU_CTL_ACTIVE_CFG )
232
+ },
233
+ };
234
+
186
235
/*************************************************************
187
236
* SSPP sub blocks config
188
237
*************************************************************/
@@ -338,6 +387,23 @@ static const struct dpu_lm_cfg sc7180_lm[] = {
338
387
& sc7180_lm_sblk , PINGPONG_1 , LM_0 , 0 ),
339
388
};
340
389
390
+ /* SM8150 */
391
+
392
+ static const struct dpu_lm_cfg sm8150_lm [] = {
393
+ LM_BLK ("lm_0" , LM_0 , 0x44000 , MIXER_SDM845_MASK ,
394
+ & sdm845_lm_sblk , PINGPONG_0 , LM_1 , 0 ),
395
+ LM_BLK ("lm_1" , LM_1 , 0x45000 , MIXER_SDM845_MASK ,
396
+ & sdm845_lm_sblk , PINGPONG_1 , LM_0 , 0 ),
397
+ LM_BLK ("lm_2" , LM_2 , 0x46000 , MIXER_SDM845_MASK ,
398
+ & sdm845_lm_sblk , PINGPONG_2 , LM_3 , 0 ),
399
+ LM_BLK ("lm_3" , LM_3 , 0x47000 , MIXER_SDM845_MASK ,
400
+ & sdm845_lm_sblk , PINGPONG_3 , LM_2 , 0 ),
401
+ LM_BLK ("lm_4" , LM_4 , 0x48000 , MIXER_SDM845_MASK ,
402
+ & sdm845_lm_sblk , PINGPONG_4 , LM_5 , 0 ),
403
+ LM_BLK ("lm_5" , LM_5 , 0x49000 , MIXER_SDM845_MASK ,
404
+ & sdm845_lm_sblk , PINGPONG_5 , LM_4 , 0 ),
405
+ };
406
+
341
407
/*************************************************************
342
408
* DSPP sub blocks config
343
409
*************************************************************/
@@ -357,6 +423,7 @@ static const struct dpu_dspp_sub_blks sc7180_dspp_sblk = {
357
423
static const struct dpu_dspp_cfg sc7180_dspp [] = {
358
424
DSPP_BLK ("dspp_0" , DSPP_0 , 0x54000 ),
359
425
};
426
+
360
427
/*************************************************************
361
428
* PINGPONG sub blocks config
362
429
*************************************************************/
@@ -399,6 +466,15 @@ static struct dpu_pingpong_cfg sc7180_pp[] = {
399
466
PP_BLK_TE ("pingpong_1" , PINGPONG_1 , 0x70800 ),
400
467
};
401
468
469
+ static const struct dpu_pingpong_cfg sm8150_pp [] = {
470
+ PP_BLK_TE ("pingpong_0" , PINGPONG_0 , 0x70000 ),
471
+ PP_BLK_TE ("pingpong_1" , PINGPONG_1 , 0x70800 ),
472
+ PP_BLK ("pingpong_2" , PINGPONG_2 , 0x71000 ),
473
+ PP_BLK ("pingpong_3" , PINGPONG_3 , 0x71800 ),
474
+ PP_BLK ("pingpong_4" , PINGPONG_4 , 0x72000 ),
475
+ PP_BLK ("pingpong_5" , PINGPONG_5 , 0x72800 ),
476
+ };
477
+
402
478
/*************************************************************
403
479
* INTF sub blocks config
404
480
*************************************************************/
@@ -424,6 +500,13 @@ static const struct dpu_intf_cfg sc7180_intf[] = {
424
500
INTF_BLK ("intf_1" , INTF_1 , 0x6A800 , INTF_DSI , 0 , INTF_SC7180_MASK ),
425
501
};
426
502
503
+ static const struct dpu_intf_cfg sm8150_intf [] = {
504
+ INTF_BLK ("intf_0" , INTF_0 , 0x6A000 , INTF_DP , 0 , INTF_SC7180_MASK ),
505
+ INTF_BLK ("intf_1" , INTF_1 , 0x6A800 , INTF_DSI , 0 , INTF_SC7180_MASK ),
506
+ INTF_BLK ("intf_2" , INTF_2 , 0x6B000 , INTF_DSI , 1 , INTF_SC7180_MASK ),
507
+ INTF_BLK ("intf_3" , INTF_3 , 0x6B800 , INTF_DP , 1 , INTF_SC7180_MASK ),
508
+ };
509
+
427
510
/*************************************************************
428
511
* VBIF sub blocks config
429
512
*************************************************************/
@@ -454,6 +537,10 @@ static const struct dpu_reg_dma_cfg sdm845_regdma = {
454
537
.base = 0x0 , .version = 0x1 , .trigger_sel_off = 0x119c
455
538
};
456
539
540
+ static const struct dpu_reg_dma_cfg sm8150_regdma = {
541
+ .base = 0x0 , .version = 0x00010001 , .trigger_sel_off = 0x119c
542
+ };
543
+
457
544
/*************************************************************
458
545
* PERF data config
459
546
*************************************************************/
@@ -478,6 +565,10 @@ static const struct dpu_qos_lut_entry sc7180_qos_linear[] = {
478
565
{.fl = 0 , .lut = 0x0011222222335777 },
479
566
};
480
567
568
+ static const struct dpu_qos_lut_entry sm8150_qos_linear [] = {
569
+ {.fl = 0 , .lut = 0x0011222222223357 },
570
+ };
571
+
481
572
static const struct dpu_qos_lut_entry sdm845_qos_macrotile [] = {
482
573
{.fl = 10 , .lut = 0x344556677 },
483
574
{.fl = 11 , .lut = 0x3344556677 },
@@ -562,6 +653,31 @@ static const struct dpu_perf_cfg sc7180_perf_data = {
562
653
},
563
654
};
564
655
656
+ static const struct dpu_perf_cfg sm8150_perf_data = {
657
+ .max_bw_low = 12800000 ,
658
+ .max_bw_high = 12800000 ,
659
+ .min_core_ib = 2400000 ,
660
+ .min_llcc_ib = 800000 ,
661
+ .min_dram_ib = 800000 ,
662
+ .danger_lut_tbl = {0xf , 0xffff , 0x0 },
663
+ .qos_lut_tbl = {
664
+ {.nentry = ARRAY_SIZE (sm8150_qos_linear ),
665
+ .entries = sm8150_qos_linear
666
+ },
667
+ {.nentry = ARRAY_SIZE (sc7180_qos_macrotile ),
668
+ .entries = sc7180_qos_macrotile
669
+ },
670
+ {.nentry = ARRAY_SIZE (sc7180_qos_nrt ),
671
+ .entries = sc7180_qos_nrt
672
+ },
673
+ /* TODO: macrotile-qseed is different from macrotile */
674
+ },
675
+ .cdp_cfg = {
676
+ {.rd_enable = 1 , .wr_enable = 1 },
677
+ {.rd_enable = 1 , .wr_enable = 0 }
678
+ },
679
+ };
680
+
565
681
/*************************************************************
566
682
* Hardware catalog init
567
683
*************************************************************/
@@ -626,9 +742,40 @@ static void sc7180_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
626
742
};
627
743
}
628
744
745
+ /*
746
+ * sm8150_cfg_init(): populate sm8150 dpu sub-blocks reg offsets
747
+ * and instance counts.
748
+ */
749
+ static void sm8150_cfg_init (struct dpu_mdss_cfg * dpu_cfg )
750
+ {
751
+ * dpu_cfg = (struct dpu_mdss_cfg ){
752
+ .caps = & sm8150_dpu_caps ,
753
+ .mdp_count = ARRAY_SIZE (sdm845_mdp ),
754
+ .mdp = sdm845_mdp ,
755
+ .ctl_count = ARRAY_SIZE (sm8150_ctl ),
756
+ .ctl = sm8150_ctl ,
757
+ .sspp_count = ARRAY_SIZE (sdm845_sspp ),
758
+ .sspp = sdm845_sspp ,
759
+ .mixer_count = ARRAY_SIZE (sm8150_lm ),
760
+ .mixer = sm8150_lm ,
761
+ .pingpong_count = ARRAY_SIZE (sm8150_pp ),
762
+ .pingpong = sm8150_pp ,
763
+ .intf_count = ARRAY_SIZE (sm8150_intf ),
764
+ .intf = sm8150_intf ,
765
+ .vbif_count = ARRAY_SIZE (sdm845_vbif ),
766
+ .vbif = sdm845_vbif ,
767
+ .reg_dma_count = 1 ,
768
+ .dma_cfg = sm8150_regdma ,
769
+ .perf = sm8150_perf_data ,
770
+ .mdss_irqs = 0x3ff ,
771
+ };
772
+ }
773
+
629
774
static const struct dpu_mdss_hw_cfg_handler cfg_handler [] = {
630
775
{ .hw_rev = DPU_HW_VER_400 , .cfg_init = sdm845_cfg_init },
631
776
{ .hw_rev = DPU_HW_VER_401 , .cfg_init = sdm845_cfg_init },
777
+ { .hw_rev = DPU_HW_VER_500 , .cfg_init = sm8150_cfg_init },
778
+ { .hw_rev = DPU_HW_VER_501 , .cfg_init = sm8150_cfg_init },
632
779
{ .hw_rev = DPU_HW_VER_620 , .cfg_init = sc7180_cfg_init },
633
780
};
634
781
0 commit comments