Re: [PATCH 1/2] dt-bindings: media: add axiado,ax3000-video
From: Tzu-Hao Wei
Date: Thu Aug 06 2026 - 04:21:15 EST
On 8/4/2026 3:55 PM, Krzysztof Kozlowski wrote:
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
On Tue, Aug 04, 2026 at 07:31:25AM +0800, Tzu-Hao Wei wrote:
There is no local register interface for this driver to program: frame
delivery is controlled entirely by the host-side display engine and
the PCIe endpoint mapping that feeds the shared region, both external
to this driver. A software polling timer schedules a workqueue item at
the configured framerate, which copies frames from the WC-mapped
shared region into vmalloc-backed vb2 buffers. Running the copy in a
work item rather than directly in the timer callback keeps potentially
multi-megabyte memcpy and per-pixel conversion work out of softirq
context.
Then this is not a separate device. You just described a Linux driver.
I still wait for answers of my question above. You described getting
buffers only.
Thank you for the continued review.
To correctly represent this in device tree without describing a
software driver as a hardware device, would moving the schema into
/reserved-memory be the preferred approach for v2?
Specifically, we are considering moving it to:
Documentation/devicetree/bindings/reserved-memory/axiado,ax3000-video-mem.yaml
I would rather suggest this should be part of the device handling the
host side of the device. Or is there none?
Again, how do you configure the frame parameters or start capturing the
data?
Thank you for the review.
Regarding frame parameters and capture:
1. Frame parameters: The remote host writes the active resolution and
format into the control mailbox (the second memory region).
2. Starting capture: There is no hardware "start" register. The remote
host continuously writes frames into the VRAM asynchronously. Our
driver simply starts reading from the VRAM in software when requested.
We did consider making this a child node of the PCIe Endpoint. However,
that does not fit our architecture because this memory acts as a shared
VRAM across multiple subsystems.
Currently, we are preparing two other drivers for upstream: PCIe EP and
DRM/HDMI. In our primary use case, a remote host writes frames via PCIe
directly into this VRAM. Our DRM driver concurrently reads this same
VRAM to drive a physical monitor, while this V4L2 driver captures the
frames for userspace (e.g., obmc-ikvm).
Because this memory is shared simultaneously by PCIe hardware,
the DRM, and V4L2, no single software driver can simply allocate it
dynamically. So, I think it should be defined at the system level as a
shared reserved-memory region.
Given this hardware topology, do you have a recommended devicetree
pattern for representing this shared VRAM? We are open to your
suggestions on the best way to model this upstream.
Best regards,
TH
This would follow the same Devicetree architectural pattern as
qcom,rmtfs-mem:
Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
Just as qcom,rmtfs-mem describes a reserved memory buffer used by
remote processors and exports /dev/rmtfs_mem%d without hardware MMIO
registers, clocks, or resets, axiado,ax3000-video describes the
reserved memory buffer used by the AX3000 display pipeline and exports
/dev/video0.
Does representing axiado,ax3000-video as a reserved-memory node look
like the appropriate way to model this in v2?
So from a device we went now to pure memory... That's quite a change and
would prove this was completely bogus hardware description.
I actually fail to see any hardware here, because you could just
allocate whatever memory and pass it to your host, no? Why it has to be
a reserved memory?
Best regards,
Krzysztof