Repository navigation
vc_mem: Add the DMA memcpy support from bcm2708_fb - #5651
Conversation
|
raspberrypi/utils#36 is the corresponding vclog change. |
368406e to
c3fbeeb
Compare
|
@timg236 Updated to bail out on everything but a BCM2710. |
| fwnode = of_find_node_by_path("/system"); | ||
| rc = of_property_read_u32(fwnode, "linux,revision", &revision); | ||
| if (((revision >> 12) & 0xf) != 2) { | ||
| /* Only BCM2710 has a memory hole to work around */ |
There was a problem hiding this comment.
By hole, do you mean peripherals mapping low (below 1GB) .
Doesn't that include 2709 (pi2) and 2710 (pi3)?
Wasn't pi4 still mapping low by default?
There was a problem hiding this comment.
I think you're right about 2709 - I was thinking Pi 2 was still 512MB, but that's not the case. Pi 4 is OK because the firmware puts the logs in the first 1GB while the peripherals are mapped just below 4GB, so they don't obstruct the host's view of the VPU's RAM usage.
I'll confirm that Pi 2 is affected, then add it to the conditional.
334660d to
f2d85ed
Compare
| fwnode = of_find_node_by_path("/system"); | ||
| rc = of_property_read_u32(fwnode, "linux,revision", &revision); | ||
| revision = (revision >> 12) & 0xf; | ||
| if (revision != 1 && revision != 12) { |
There was a problem hiding this comment.
Indeed - more haste, less speed
bcm2708_fb is disabled by the vc4-kms-v3d overlay, which means that the DMA memcpy support it provides is not available to allow vclog to read the VC logs from the top 16MB on Pi 2 and Pi 3. Add the code to the vc_mem driver, which will still be enabled. It ought to be possible to do a proper DMA_MEM_TO_MEM copy via the generic DMA customer API, but that can be a later step. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
Looks good |
|
Tested on Pi2 (32-bit), Pi3 (64-bit) and Pi4 (64-bit). Would be nice to get this using a higher level dma api, but this is fine as fix for now. |
kernel: drivers: media: rp1_cfe: Fix link validate test for pixel format See: raspberrypi/linux#5657 kernel: drm/vc4: Correct address offset for planes with src_[xy] offsets See: raspberrypi/linux#5654 kernel: input: touchscreen: edt-ft5x06: Suppress bogus data on startup See: raspberrypi/linux#5645 kernel: vc_mem: Add the DMA memcpy support from bcm2708_fb See: raspberrypi/linux#5651 kernel: dts: bcm2712: Set default I2C baudrates to 100kHz See: raspberrypi/linux#5653 kernel: MCP23017: allow specification of the i2c bus See: raspberrypi/linux#5650 kernel: Revert: bcm2708_fb: Hack out dma support See: raspberrypi/linux#5648 firmware: config: Add [pi5] to config.txt on 2711 and earlier platforms userland: bcm_host: Update kms/fkms check for pi5
kernel: drivers: media: rp1_cfe: Fix link validate test for pixel format See: raspberrypi/linux#5657 kernel: drm/vc4: Correct address offset for planes with src_[xy] offsets See: raspberrypi/linux#5654 kernel: input: touchscreen: edt-ft5x06: Suppress bogus data on startup See: raspberrypi/linux#5645 kernel: vc_mem: Add the DMA memcpy support from bcm2708_fb See: raspberrypi/linux#5651 kernel: dts: bcm2712: Set default I2C baudrates to 100kHz See: raspberrypi/linux#5653 kernel: MCP23017: allow specification of the i2c bus See: raspberrypi/linux#5650 kernel: Revert: bcm2708_fb: Hack out dma support See: raspberrypi/linux#5648 firmware: config: Add [pi5] to config.txt on 2711 and earlier platforms userland: bcm_host: Update kms/fkms check for pi5
bcm2708_fb is disabled by the vc4-kms-v3d overlay, which means that the DMA memcpy support it provides is not available to allow vclog to read the VC logs from the top 16MB on Pi 3. Add the code to the vc_mem driver, which will still be available.
It ought to be possible to do a proper DMA_MEM_TO_MEM copy via the generic DMA customer API, but that can be a later step.