Guest User

Untitled

a guest
Jun 21st, 2026
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.60 KB | None | 0 0
  1. diff --git a/drivers/media/platform/apple/avd/avd-drv.c b/drivers/media/platform/apple/avd/avd-drv.c
  2. index 05c1c5260536..b143886b05ac 100644
  3. --- a/drivers/media/platform/apple/avd/avd-drv.c
  4. +++ b/drivers/media/platform/apple/avd/avd-drv.c
  5. @@ -426,7 +426,7 @@ static const struct avd_variant avd_t6000_variant = {
  6. AVD_CAPABILITY_VP9,
  7. .configure_stream = t8112_configure_stream,
  8. .fw_name = "apple/avd-fw-v3-t0.bin",
  9. - .revision = 4,
  10. + .revision = 3,
  11. .vp_slot_offset = 0xc,
  12. .submit_offset = 0x30,
  13. };
  14. diff --git a/drivers/media/platform/apple/avd/avd-h264.c b/drivers/media/platform/apple/avd/avd-h264.c
  15. index 668d4b258834..62fda4b4c638 100644
  16. --- a/drivers/media/platform/apple/avd/avd-h264.c
  17. +++ b/drivers/media/platform/apple/avd/avd-h264.c
  18. @@ -216,7 +216,7 @@ static void stream_hdr(struct avd_ctx *ctx, struct avd_h264_run *run)
  19. push(INST_DMA2, "cm3_dma_config_1");
  20. push(INST_DMA1, "cm3_dma_config_2");
  21.  
  22. - if (avd->variant->revision == 3)
  23. + // if (avd->variant->revision == 3)
  24. push(0, "zero");
  25.  
  26. pusha(h264_ctx->bufs.pps_tile[0].addr, "hdr_9c_pps_tile_addr_lsb8", 0);
  27. @@ -224,12 +224,12 @@ static void stream_hdr(struct avd_ctx *ctx, struct avd_h264_run *run)
  28. push(INST_DMA2, "cm3_dma_config_3");
  29. push(INST_DMA2, "cm3_dma_config_4");
  30.  
  31. - if (avd->variant->revision == 3)
  32. + //if (avd->variant->revision == 3)
  33. push(0, "zero");
  34. - else
  35. + //else
  36. /* Frame statistics? another pps_tile?
  37. * i have no clue. Seems to work */
  38. - pusha(h264_ctx->bufs.unk.addr, "unk_addr", 0);
  39. + //pusha(h264_ctx->bufs.unk.addr, "unk_addr", 0);
  40.  
  41. pusha(h264_ctx->bufs.pps_tile[1].addr, "hdr_9c_pps_tile_addr_lsb8", 1);
  42. pusha(h264_ctx->bufs.pps_tile[2].addr, "hdr_9c_pps_tile_addr_lsb8", 2);
  43. @@ -239,9 +239,9 @@ static void stream_hdr(struct avd_ctx *ctx, struct avd_h264_run *run)
  44. push_rvra(avd, ctx, run->addresses.rvra, ctx->rvra_offsets);
  45.  
  46. pusha(run->addresses.y, "hdr_210_y_addr_lsb8", 0);
  47. - push(ctx->decoded_fmt.fmt.pix_mp.plane_fmt[0].bytesperline, "hdr_218_width_align");
  48. + push(ctx->decoded_fmt.fmt.pix_mp.plane_fmt[0].bytesperline >> 4, "hdr_218_width_align");
  49. pusha(run->addresses.uv,"hdr_214_uv_addr_lsb8", 0);
  50. - push(ctx->decoded_fmt.fmt.pix_mp.plane_fmt[0].bytesperline, "hdr_21c_width_align");
  51. + push(ctx->decoded_fmt.fmt.pix_mp.plane_fmt[0].bytesperline >> 4, "hdr_21c_width_align");
  52.  
  53. push(0x0, "cm3_mark_end_section");
  54. push(((height - 1) << 16) | (width - 1), "hdr_54_height_width");
  55. diff --git a/drivers/media/platform/apple/avd/avd-hw.c b/drivers/media/platform/apple/avd/avd-hw.c
  56. index 73800cca87a9..f7eab6ef7afb 100644
  57. --- a/drivers/media/platform/apple/avd/avd-hw.c
  58. +++ b/drivers/media/platform/apple/avd/avd-hw.c
  59. @@ -96,7 +96,7 @@ void t8112_configure_stream(struct avd_dev *avd, dma_addr_t addr, u8 fifo_idx,
  60. u32 vp_slot)
  61. {
  62. w32(AVD_V4_VP_INSN_FIFO_IOVA_HI + (fifo_idx * 4), addr >> 32);
  63. - w32(AVD_V4_VP_INSN_FIFO_IOVA_LO + (fifo_idx * 4), addr & 0xffffffff);
  64. + w32(AVD_V4_VP_INSN_FIFO_IOVA_LO + (fifo_idx * 4), addr >> 8);
  65. w32(AVD_V4_VP_INSN_FIFO_MASK + (fifo_idx * 4), 0);
  66. w32(AVD_V4_VP_INSN_FIFO_CACH + (fifo_idx * 4), 0);
  67. w32(AVD_V4_VP_INSN_FIFO_XFER + (fifo_idx * 4), 0);
  68. diff --git a/drivers/media/platform/apple/avd/avd-inst.h b/drivers/media/platform/apple/avd/avd-inst.h
  69. index 25ec1a6c9ffb..ba2460cf6847 100644
  70. --- a/drivers/media/platform/apple/avd/avd-inst.h
  71. +++ b/drivers/media/platform/apple/avd/avd-inst.h
  72. @@ -38,23 +38,13 @@ static inline void push(struct avd_dev *avd, struct avd_ctx *ctx, u32 inst)
  73. static inline void push_address(struct avd_dev *avd, struct avd_ctx *ctx,
  74. dma_addr_t addr)
  75. {
  76. - if (avd->variant->revision == 4) {
  77. - push(avd, ctx, (u32)(addr & 0xffffffff));
  78. - push(avd, ctx, (u32)(addr >> 32));
  79. - } else {
  80. push(avd, ctx, (addr >> 8));
  81. - }
  82. }
  83. static inline void push_rvra(struct avd_dev *avd, struct avd_ctx *ctx,
  84. dma_addr_t addr, u32 offsets[4])
  85. {
  86. - if (avd->variant->revision == 4) {
  87. - for (int i = 0; i < 4; i++)
  88. - push_address(avd, ctx, (addr + offsets[i]));
  89. - } else {
  90. for (int i = 0; i < 4; i++)
  91. push(avd, ctx, (addr + offsets[i]) >> 7);
  92. - }
  93. }
  94.  
  95. #ifdef DEBUG_INST
  96.  
Advertisement
Add Comment
Please, Sign In to add comment