Skip to contentSkip to conversation

drm/imagination: Implement firmware infrastructure and META FW support

PATCH Superseded Sarah Walker 1 participant 1 message Jul 14, 2023

Subsystems (3)

v4 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 10/17 drm/imagination: Implement firmware infrastructure and META FW support

The infrastructure includes parsing of the firmware image, initialising FW-side structures, handling the kernel and firmware command ringbuffers and starting & stopping the firmware processor.

This patch also adds the necessary support code for the META firmware processor.

Changes since v3:
- Hard reset FW processor on watchdog timeout
- Switch to threaded IRQ
- Rework FW object creation/initialisation to aid hard reset
- Added MODULE_FIRMWARE()
- Use drm_dev_{enter,exit}

---
 drivers/gpu/drm/imagination/Makefile          |    5 +
 drivers/gpu/drm/imagination/pvr_ccb.c         |  632 +++++++
 drivers/gpu/drm/imagination/pvr_ccb.h         |   71 +
 drivers/gpu/drm/imagination/pvr_device.c      |   97 ++
 drivers/gpu/drm/imagination/pvr_device.h      |   60 +
 drivers/gpu/drm/imagination/pvr_drv.c         |    1 +
 drivers/gpu/drm/imagination/pvr_fw.c          | 1450 +++++++++++++++++
 drivers/gpu/drm/imagination/pvr_fw.h          |  490 +++++-
 drivers/gpu/drm/imagination/pvr_fw_info.h     |  115 ++
 drivers/gpu/drm/imagination/pvr_fw_meta.c     |  569 +++++++
 drivers/gpu/drm/imagination/pvr_fw_meta.h     |   14 +
 .../gpu/drm/imagination/pvr_fw_startstop.c    |  302 ++++
 .../gpu/drm/imagination/pvr_fw_startstop.h    |   13 +
 drivers/gpu/drm/imagination/pvr_fw_trace.c    |  123 ++
 drivers/gpu/drm/imagination/pvr_fw_trace.h    |   78 +
 drivers/gpu/drm/imagination/pvr_gem.h         |   11 +-
 drivers/gpu/drm/imagination/pvr_mmu.c         |   40 +-
 drivers/gpu/drm/imagination/pvr_power.c       |  154 +-
 drivers/gpu/drm/imagination/pvr_vm.c          |   27 +-
 19 files changed, 4226 insertions(+), 26 deletions(-)
 create mode 100644 drivers/gpu/drm/imagination/pvr_ccb.c
 create mode 100644 drivers/gpu/drm/imagination/pvr_ccb.h
 create mode 100644 drivers/gpu/drm/imagination/pvr_fw.c
 create mode 100644 drivers/gpu/drm/imagination/pvr_fw_info.h
 create mode 100644 drivers/gpu/drm/imagination/pvr_fw_meta.c
 create mode 100644 drivers/gpu/drm/imagination/pvr_fw_meta.h
 create mode 100644 drivers/gpu/drm/imagination/pvr_fw_startstop.c
 create mode 100644 drivers/gpu/drm/imagination/pvr_fw_startstop.h
 create mode 100644 drivers/gpu/drm/imagination/pvr_fw_trace.c
 create mode 100644 drivers/gpu/drm/imagination/pvr_fw_trace.h
drivers/gpu/drm/imagination/Makefile +5 -0
index 534bffd59273..f4e265ab0735 100644
@@ -4,9 +4,14 @@
 subdir-ccflags-y := -I$(srctree)/$(src)
 
 powervr-y := \
+	pvr_ccb.o \
 	pvr_device.o \
 	pvr_device_info.o \
 	pvr_drv.o \
+	pvr_fw.o \
+	pvr_fw_meta.o \
+	pvr_fw_startstop.o \
+	pvr_fw_trace.o \
 	pvr_gem.o \
 	pvr_mmu.o \
 	pvr_power.o \
drivers/gpu/drm/imagination/pvr_ccb.c new file +632 -0

632 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_ccb.h new file +71 -0

71 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_device.c +97 -0

133 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_device.h +60 -0

84 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_drv.c +1 -0
index f44a1f9abf8d..cf07078cca39 100644
@@ -1356,3 +1356,4 @@ MODULE_AUTHOR("Imagination Technologies Ltd.");
 MODULE_DESCRIPTION(PVR_DRIVER_DESC);
 MODULE_LICENSE("Dual MIT/GPL");
 MODULE_IMPORT_NS(DMA_BUF);
+MODULE_FIRMWARE("powervr/rogue_33.15.11.3_v1.fw");
drivers/gpu/drm/imagination/pvr_fw.c new file +1450 -0

1,450 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_fw.h +488 -2

505 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_fw_info.h new file +115 -0

107 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_fw_meta.c new file +569 -0

569 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_fw_meta.h new file +14 -0
new file mode 100644
index 000000000000..5468b3d69031

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/imagination/pvr_fw_startstop.c new file +302 -0

302 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_fw_startstop.h new file +13 -0
new file mode 100644
index 000000000000..b833f6936b4d

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/imagination/pvr_fw_trace.c new file +123 -0

123 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_fw_trace.h new file +78 -0

78 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_gem.h +10 -1
index 2e7c493e5fb5..1e05624cee3e 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/imagination/pvr_mmu.c +38 -2
index 34c8fdce67c1..caa87ddd6237 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/imagination/pvr_power.c +138 -16

154 lines not on this page · raw message

drivers/gpu/drm/imagination/pvr_vm.c +22 -5
index ba426805f9d4..f5f97df0751f 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.41.0

Part of the diff is not shown here. View the raw message.