@@ -287,6 +287,17 @@ enum pipedmc_event_id {
287
287
#define MTL_PIPEDMC_CONTROL _MMIO(0x45250)
288
288
#define PIPEDMC_ENABLE_MTL (pipe ) REG_BIT(((pipe) - PIPE_A) * 4)
289
289
290
+ #define _PIPEDMC_LOAD_HTP_A 0x5f000
291
+ #define _PIPEDMC_LOAD_HTP_B 0x5f400
292
+ #define PIPEDMC_LOAD_HTP (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_LOAD_HTP_A, _PIPEDMC_LOAD_HTP_B)
293
+
294
+ #define _PIPEDMC_CTL_A 0x5f064
295
+ #define _PIPEDMC_CTL_B 0x5f464
296
+ #define PIPEDMC_CTL (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_CTL_A, _PIPEDMC_CTL_B)
297
+ #define PIPEDMC_HALT REG_BIT(31)
298
+ #define PIPEDMC_STEP REG_BIT(27)
299
+ #define PIPEDMC_CLOCKGATE REG_BIT(23)
300
+
290
301
#define _PIPEDMC_STATUS_A 0x5f06c
291
302
#define _PIPEDMC_STATUS_B 0x5f46c
292
303
#define PIPEDMC_STATUS (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_STATUS_A, _PIPEDMC_STATUS_B)
@@ -298,6 +309,138 @@ enum pipedmc_event_id {
298
309
#define PIPEDMC_INT_VECTOR_FLIPQ_PROG_DONE REG_FIELD_PREP(PIPEDMC_INT_VECTOR_MASK, 0xff) /* Wa_16018781658:lnl[a0] */
299
310
#define PIPEDMC_EVT_PENDING REG_GENMASK(7, 0)
300
311
312
+ #define _PIPEDMC_FQ_CTRL_A 0x5f078
313
+ #define _PIPEDMC_FQ_CTRL_B 0x5f478
314
+ #define PIPEDMC_FQ_CTRL (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_FQ_CTRL_A, _PIPEDMC_FQ_CTRL_B)
315
+ #define PIPEDMC_FQ_CTRL_ENABLE REG_BIT(31)
316
+ #define PIPEDMC_FQ_CTRL_ASYNC REG_BIT(29)
317
+ #define PIPEDMC_FQ_CTRL_PREEMPT REG_BIT(0)
318
+
319
+ #define _PIPEDMC_FQ_STATUS_A 0x5f098
320
+ #define _PIPEDMC_FQ_STATUS_B 0x5f498
321
+ #define PIPEDMC_FQ_STATUS (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_FQ_STATUS_A, _PIPEDMC_FQ_STATUS_B)
322
+ #define PIPEDMC_FQ_STATUS_BUSY REG_BIT(31)
323
+ #define PIPEDMC_FQ_STATUS_W2_LIVE_STATUS REG_BIT(1)
324
+ #define PIPEDMC_FQ_STATUS_W1_LIVE_STATUS REG_BIT(0)
325
+
326
+ #define _PIPEDMC_FPQ_ATOMIC_TP_A 0x5f0a0
327
+ #define _PIPEDMC_FPQ_ATOMIC_TP_B 0x5f4a0
328
+ #define PIPEDMC_FPQ_ATOMIC_TP (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_FPQ_ATOMIC_TP_A, _PIPEDMC_FPQ_ATOMIC_TP_B)
329
+ #define PIPEDMC_FPQ_PLANEQ_3_TP_MASK REG_GENMASK(31, 26)
330
+ #define PIPEDMC_FPQ_PLANEQ_3_TP (tail ) REG_FIELD_PREP(PIPEDMC_FPQ_PLANEQ_3_TP_MASK, (tail))
331
+ #define PIPEDMC_FPQ_PLANEQ_2_TP_MASK REG_GENMASK(24, 19)
332
+ #define PIPEDMC_FPQ_PLANEQ_2_TP (tail ) REG_FIELD_PREP(PIPEDMC_FPQ_PLANEQ_2_TP_MASK, (tail))
333
+ #define PIPEDMC_FPQ_PLANEQ_1_TP_MASK REG_GENMASK(17, 12)
334
+ #define PIPEDMC_FPQ_PLANEQ_1_TP (tail ) REG_FIELD_PREP(PIPEDMC_FPQ_PLANEQ_1_TP_MASK, (tail))
335
+ #define PIPEDMC_FPQ_FASTQ_TP_MASK REG_GENMASK(10, 6)
336
+ #define PIPEDMC_FPQ_FASTQ_TP (tail ) REG_FIELD_PREP(PIPEDMC_FPQ_FASTQ_TP_MASK, (tail))
337
+ #define PIPEDMC_FPQ_GENERALQ_TP_MASK REG_GENMASK(4, 0)
338
+ #define PIPEDMC_FPQ_GENERALQ_TP (tail ) REG_FIELD_PREP(PIPEDMC_FPQ_GENERALQ_TP_MASK, (tail))
339
+
340
+ #define _PIPEDMC_FPQ_LINES_TO_W1_A 0x5f0a4
341
+ #define _PIPEDMC_FPQ_LINES_TO_W1_B 0x5f4a4
342
+ #define PIPEDMC_FPQ_LINES_TO_W1 _MMIO_PIPE((pipe), _PIPEDMC_FPQ_LINES_TO_W1_A, _PIPEDMC_FPQ_LINES_TO_W1_B)
343
+
344
+ #define _PIPEDMC_FPQ_LINES_TO_W2_A 0x5f0a8
345
+ #define _PIPEDMC_FPQ_LINES_TO_W2_B 0x5f4a8
346
+ #define PIPEDMC_FPQ_LINES_TO_W2 _MMIO_PIPE((pipe), _PIPEDMC_FPQ_LINES_TO_W2_A, _PIPEDMC_FPQ_LINES_TO_W2_B)
347
+
348
+ #define _PIPEDMC_SCANLINECMP_A 0x5f11c
349
+ #define _PIPEDMC_SCANLINECMP_B 0x5f51c
350
+ #define PIPEDMC_SCANLINECMP (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_SCANLINECMP_A, _PIPEDMC_SCANLINECMP_B)
351
+ #define PIPEDMC_SCANLINECMP_EN REG_BIT(31)
352
+ #define PIPEDMC_SCANLINE_NUMBER REG_GENMASK(20, 0)
353
+
354
+ #define _PIPEDMC_SCANLINECMPLOWER_A 0x5f120
355
+ #define _PIPEDMC_SCANLINECMPLOWER_B 0x5f520
356
+ #define PIPEDMC_SCANLINECMPLOWER (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_SCANLINECMPLOWER_A, _PIPEDMC_SCANLINECMPLOWER_B)
357
+ #define PIPEDMC_SCANLINEINRANGECMP_EN REG_BIT(31)
358
+ #define PIPEDMC_SCANLINEOUTRANGECMP_EN REG_BIT(30)
359
+ #define PIPEDMC_SCANLINE_LOWER_MASK REG_GENMASK(20, 0)
360
+ #define PIPEDMC_SCANLINE_LOWER (scanline ) REG_FIELD_PREP(PIPEDMC_SCANLINE_LOWER_MASK, (scanline))
361
+
362
+ #define _PIPEDMC_SCANLINECMPUPPER_A 0x5f124
363
+ #define _PIPEDMC_SCANLINECMPUPPER_B 0x5f524
364
+ #define PIPEDMC_SCANLINECMPUPPER (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_SCANLINECMPUPPER_A, _PIPEDMC_SCANLINECMPUPPER_B)
365
+ #define PIPEDMC_SCANLINE_UPPER_MASK REG_GENMASK(20, 0)
366
+ #define PIPEDMC_SCANLINE_UPPER (scanline ) REG_FIELD_PREP(PIPEDMC_SCANLINE_UPPER_MASK, (scanline))
367
+
368
+ #define _MMIO_PIPEDMC_FPQ (pipe , fq_id , \
369
+ reg_fpq1_a , reg_fpq2_a , reg_fpq3_a , reg_fpq4_a , \
370
+ reg_fpq1_b , reg_fpq2_b , reg_fpq3_b , reg_fpq4_b ) \
371
+ _MMIO(_PICK_EVEN_2RANGES((fq_id), INTEL_FLIPQ_PLANE_3, \
372
+ _PIPE((pipe), (reg_fpq1_a), (reg_fpq1_b)), \
373
+ _PIPE((pipe), (reg_fpq2_a), (reg_fpq2_b)), \
374
+ _PIPE((pipe), (reg_fpq3_a), (reg_fpq3_b)), \
375
+ _PIPE((pipe), (reg_fpq4_a), (reg_fpq4_b))))
376
+
377
+ #define _PIPEDMC_FPQ1_HP_A 0x5f128
378
+ #define _PIPEDMC_FPQ2_HP_A 0x5f138
379
+ #define _PIPEDMC_FPQ3_HP_A 0x5f168
380
+ #define _PIPEDMC_FPQ4_HP_A 0x5f174
381
+ #define _PIPEDMC_FPQ5_HP_A 0x5f180
382
+ #define _PIPEDMC_FPQ1_HP_B 0x5f528
383
+ #define _PIPEDMC_FPQ2_HP_B 0x5f538
384
+ #define _PIPEDMC_FPQ3_HP_B 0x5f568
385
+ #define _PIPEDMC_FPQ4_HP_B 0x5f574
386
+ #define _PIPEDMC_FPQ5_HP_B 0x5f580
387
+ #define PIPEDMC_FPQ_HP (pipe , fq_id ) _MMIO_PIPEDMC_FPQ((pipe), (fq_id), \
388
+ _PIPEDMC_FPQ1_HP_A, _PIPEDMC_FPQ2_HP_A, \
389
+ _PIPEDMC_FPQ3_HP_A, _PIPEDMC_FPQ4_HP_A, \
390
+ _PIPEDMC_FPQ1_HP_B, _PIPEDMC_FPQ2_HP_B, \
391
+ _PIPEDMC_FPQ3_HP_B, _PIPEDMC_FPQ4_HP_B)
392
+
393
+ #define _PIPEDMC_FPQ1_TP_A 0x5f12c
394
+ #define _PIPEDMC_FPQ2_TP_A 0x5f13c
395
+ #define _PIPEDMC_FPQ3_TP_A 0x5f16c
396
+ #define _PIPEDMC_FPQ4_TP_A 0x5f178
397
+ #define _PIPEDMC_FPQ5_TP_A 0x5f184
398
+ #define _PIPEDMC_FPQ1_TP_B 0x5f52c
399
+ #define _PIPEDMC_FPQ2_TP_B 0x5f53c
400
+ #define _PIPEDMC_FPQ3_TP_B 0x5f56c
401
+ #define _PIPEDMC_FPQ4_TP_B 0x5f578
402
+ #define _PIPEDMC_FPQ5_TP_B 0x5f584
403
+ #define PIPEDMC_FPQ_TP (pipe , fq_id ) _MMIO_PIPEDMC_FPQ((pipe), (fq_id), \
404
+ _PIPEDMC_FPQ1_TP_A, _PIPEDMC_FPQ2_TP_A, \
405
+ _PIPEDMC_FPQ3_TP_A, _PIPEDMC_FPQ4_TP_A, \
406
+ _PIPEDMC_FPQ1_TP_B, _PIPEDMC_FPQ2_TP_B, \
407
+ _PIPEDMC_FPQ3_TP_B, _PIPEDMC_FPQ4_TP_B)
408
+
409
+ #define _PIPEDMC_FPQ1_CHP_A 0x5f130
410
+ #define _PIPEDMC_FPQ2_CHP_A 0x5f140
411
+ #define _PIPEDMC_FPQ3_CHP_A 0x5f170
412
+ #define _PIPEDMC_FPQ4_CHP_A 0x5f17c
413
+ #define _PIPEDMC_FPQ5_CHP_A 0x5f188
414
+ #define _PIPEDMC_FPQ1_CHP_B 0x5f530
415
+ #define _PIPEDMC_FPQ2_CHP_B 0x5f540
416
+ #define _PIPEDMC_FPQ3_CHP_B 0x5f570
417
+ #define _PIPEDMC_FPQ4_CHP_B 0x5f57c
418
+ #define _PIPEDMC_FPQ5_CHP_B 0x5f588
419
+ #define PIPEDMC_FPQ_CHP (pipe , fq_id ) _MMIO_PIPEDMC_FPQ((pipe), (fq_id), \
420
+ _PIPEDMC_FPQ1_CHP_A, _PIPEDMC_FPQ2_CHP_A, \
421
+ _PIPEDMC_FPQ3_CHP_A, _PIPEDMC_FPQ4_CHP_A, \
422
+ _PIPEDMC_FPQ1_CHP_B, _PIPEDMC_FPQ2_CHP_B, \
423
+ _PIPEDMC_FPQ3_CHP_B, _PIPEDMC_FPQ4_CHP_B)
424
+
425
+ #define _PIPEDMC_FPQ_TS_A 0x5f134
426
+ #define _PIPEDMC_FPQ_TS_B 0x5f534
427
+ #define PIPEDMC_FPQ_TS (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_FPQ_TS_A, _PIPEDMC_FPQ_TS_B)
428
+
429
+ #define _PIPEDMC_SCANLINE_RO_A 0x5f144
430
+ #define _PIPEDMC_SCANLINE_RO_B 0x5f544
431
+ #define PIPEDMC_SCANLINE_RO (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_SCANLINE_RO_A, _PIPEDMC_SCANLINE_RO_B)
432
+
433
+ #define _PIPEDMC_FPQ_CTL1_A 0x5f160
434
+ #define _PIPEDMC_FPQ_CTL1_B 0x5f560
435
+ #define PIPEDMC_FPQ_CTL1 (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_FPQ_CTL1_A, _PIPEDMC_FPQ_CTL1_B)
436
+ #define PIPEDMC_SW_DMC_WAKE REG_BIT(0)
437
+
438
+ #define _PIPEDMC_FPQ_CTL2_A 0x5f164
439
+ #define _PIPEDMC_FPQ_CTL2_B 0x5f564
440
+ #define PIPEDMC_FPQ_CTL2 (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_FPQ_CTL2_A, _PIPEDMC_FPQ_CTL2_B)
441
+ #define PIPEDMC_DMC_INT_AT_DELAYED_VBLANK REG_BIT(1)
442
+ #define PIPEDMC_W1_DMC_WAKE REG_BIT(0)
443
+
301
444
#define _PIPEDMC_INTERRUPT_A 0x5f190 /* lnl+ */
302
445
#define _PIPEDMC_INTERRUPT_B 0x5f590 /* lnl+ */
303
446
#define PIPEDMC_INTERRUPT (pipe ) _MMIO_PIPE((pipe), _PIPEDMC_INTERRUPT_A, _PIPEDMC_INTERRUPT_B)
@@ -394,4 +537,51 @@ enum pipedmc_event_id {
394
537
#define DMC_WAKELOCK_CTL_REQ REG_BIT(31)
395
538
#define DMC_WAKELOCK_CTL_ACK REG_BIT(15)
396
539
540
+ #define DMC_FQ_W2_PTS_CFG_SEL _MMIO(0x8f240)
541
+ #define PIPE_D_DMC_W2_PTS_CONFIG_SELECT_MASK REG_GENMASK(26, 24)
542
+ #define PIPE_D_DMC_W2_PTS_CONFIG_SELECT (pipe ) REG_FIELD_PREP(PIPE_D_DMC_W2_PTS_CONFIG_SELECT_MASK, (pipe))
543
+ #define PIPE_C_DMC_W2_PTS_CONFIG_SELECT_MASK REG_GENMASK(18, 16)
544
+ #define PIPE_C_DMC_W2_PTS_CONFIG_SELECT (pipe ) REG_FIELD_PREP(PIPE_C_DMC_W2_PTS_CONFIG_SELECT_MASK, (pipe))
545
+ #define PIPE_B_DMC_W2_PTS_CONFIG_SELECT_MASK REG_GENMASK(10, 8)
546
+ #define PIPE_B_DMC_W2_PTS_CONFIG_SELECT (pipe ) REG_FIELD_PREP(PIPE_B_DMC_W2_PTS_CONFIG_SELECT_MASK, (pipe))
547
+ #define PIPE_A_DMC_W2_PTS_CONFIG_SELECT_MASK REG_GENMASK(2, 0)
548
+ #define PIPE_A_DMC_W2_PTS_CONFIG_SELECT (pipe ) REG_FIELD_PREP(PIPE_A_DMC_W2_PTS_CONFIG_SELECT_MASK, (pipe))
549
+
550
+ /* plane/general flip queue entries */
551
+ #define PIPEDMC_FQ_RAM (start_mmioaddr , i ) _MMIO((start_mmioaddr) + (i) * 4)
552
+ /* LNL */
553
+ /* DW0 pts */
554
+ /* DW1 head */
555
+ /* DW2 size/etc. */
556
+ #define LNL_FQ_INTERRUPT REG_BIT(31)
557
+ #define LNL_FQ_DSB_ID_MASK REG_GENMASK(30, 29)
558
+ #define LNL_FQ_DSB_ID (dsb_id ) REG_FIELD_PREP(LNL_FQ_DSB_ID_MASK, (dsb_id))
559
+ #define LNL_FQ_EXECUTED REG_BIT(28)
560
+ #define LNL_FQ_DSB_SIZE_MASK REG_GENMASK(15, 0)
561
+ #define LNL_FQ_DSB_SIZE (size ) REG_FIELD_PREP(LNL_FQ_DSB_SIZE_MASK, (size))
562
+ /* DW3 reserved (plane queues) */
563
+ /* DW3 second DSB head (general queue) */
564
+ /* DW4 second DSB size/etc. (general queue) */
565
+ /* DW5 reserved (general queue) */
566
+
567
+ /* PTL+ */
568
+ /* DW0 pts */
569
+ /* DW1 reserved */
570
+ /* DW2 size/etc. */
571
+ #define PTL_FQ_INTERRUPT REG_BIT(31)
572
+ #define PTL_FQ_NEED_PUSH REG_BIT(30)
573
+ #define PTL_FQ_BLOCK_PUSH REG_BIT(29)
574
+ #define PTL_FQ_EXECUTED REG_BIT(28)
575
+ #define PTL_FQ_DSB_ID_MASK REG_GENMASK(25, 24)
576
+ #define PTL_FQ_DSB_ID (dsb_id ) REG_FIELD_PREP(PTL_FQ_DSB_ID_MASK, (dsb_id))
577
+ #define PTL_FQ_DSB_SIZE_MASK REG_GENMASK(15, 0)
578
+ #define PTL_FQ_DSB_SIZE (size ) REG_FIELD_PREP(PTL_FQ_DSB_SIZE_MASK, (size))
579
+ /* DW3 head */
580
+ /* DW4 second DSB size/etc. (general queue) */
581
+ /* DW5 second DSB head (general queue) */
582
+
583
+ /* undocumented magic DMC variables */
584
+ #define PTL_PIPEDMC_EXEC_TIME_LINES (start_mmioaddr ) _MMIO((start_mmioaddr) + 0x6b8)
585
+ #define PTL_PIPEDMC_END_OF_EXEC_GB (start_mmioaddr ) _MMIO((start_mmioaddr) + 0x6c0)
586
+
397
587
#endif /* __INTEL_DMC_REGS_H__ */
0 commit comments