Hi,
On Thu, Oct 2, 2025 at 9:54 AM Maxime Ripard <mripard(a)redhat.com> wrote:
>
> On Thu, Sep 11, 2025 at 03:49:44PM +0200, Jens Wiklander wrote:
> > +static const char *heap_id_2_name(enum tee_dma_heap_id id)
> > +{
> > + switch (id) {
> > + case TEE_DMA_HEAP_SECURE_VIDEO_PLAY:
> > + return "protected,secure-video";
> > + case TEE_DMA_HEAP_TRUSTED_UI:
> > + return "protected,trusted-ui";
> > + case TEE_DMA_HEAP_SECURE_VIDEO_RECORD:
> > + return "protected,secure-video-record";
> > + default:
> > + return NULL;
> > + }
> > +}
>
> We've recently agreed on a naming guideline (even though it's not merged yet)
>
> https://lore.kernel.org/r/20250728-dma-buf-heap-names-doc-v4-1-f73f71cf0dfd…
I wasn't aware of that (or had forgotten it), but during the revisions
of this patch set, we changed to use "protected".
>
> Secure and trusted should be defined I guess, because secure and
> protected at least seem redundant to me.
Depending on the use case, the protected buffer is only accessible to
a specific set of devices. This is typically configured by the TEE
firmware based on which heap we're using. To distinguish between the
different heaps, I've simply added the name of the use case after the
comma. So the name of the heap for the Trusted-UI use case is
"protected,trusted-ui". What would a heap called "protected,ui"
represent? Protected buffers for a UI use case? What kind of UI use
case? If the name of the heap is too generic, it might cover more than
one use case with conflicting requirements for which devices should be
able to access the protected memory.
Thanks,
Jens
Le jeudi 02 octobre 2025 à 09:47 +0200, Maxime Ripard a écrit :
> Hi,
>
> On Thu, Sep 11, 2025 at 03:49:43PM +0200, Jens Wiklander wrote:
> > Export the dma-buf heap functions to allow them to be used by the OP-TEE
> > driver. The OP-TEE driver wants to register and manage specific secure
> > DMA heaps with it.
> >
> > Reviewed-by: Sumit Garg <sumit.garg(a)oss.qualcomm.com>
> > Reviewed-by: T.J. Mercier <tjmercier(a)google.com>
> > Acked-by: Sumit Semwal <sumit.semwal(a)linaro.org>
> > Signed-off-by: Jens Wiklander <jens.wiklander(a)linaro.org>
> > ---
> > drivers/dma-buf/dma-heap.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c
> > index 3cbe87d4a464..8ab49924f8b7 100644
> > --- a/drivers/dma-buf/dma-heap.c
> > +++ b/drivers/dma-buf/dma-heap.c
> > @@ -11,6 +11,7 @@
> > #include <linux/dma-buf.h>
> > #include <linux/dma-heap.h>
> > #include <linux/err.h>
> > +#include <linux/export.h>
> > #include <linux/list.h>
> > #include <linux/nospec.h>
> > #include <linux/syscalls.h>
> > @@ -202,6 +203,7 @@ void *dma_heap_get_drvdata(struct dma_heap *heap)
> > {
> > return heap->priv;
> > }
> > +EXPORT_SYMBOL_NS_GPL(dma_heap_get_drvdata, "DMA_BUF_HEAP");
> >
> > /**
> > * dma_heap_get_name - get heap name
> > @@ -214,6 +216,7 @@ const char *dma_heap_get_name(struct dma_heap *heap)
> > {
> > return heap->name;
> > }
> > +EXPORT_SYMBOL_NS_GPL(dma_heap_get_name, "DMA_BUF_HEAP");
> >
> > /**
> > * dma_heap_add - adds a heap to dmabuf heaps
> > @@ -303,6 +306,7 @@ struct dma_heap *dma_heap_add(const struct
> > dma_heap_export_info *exp_info)
> > kfree(heap);
> > return err_ret;
> > }
> > +EXPORT_SYMBOL_NS_GPL(dma_heap_add, "DMA_BUF_HEAP");
>
> It's not clear to me why we would need to export those symbols.
>
> As far as I know, heaps cannot be removed, and compiling them as module
> means that we would be able to remove them.
>
> Now, if we don't expect the users to be compiled as modules, then we
> don't need to export these symbols at all.
Maybe I'm getting out of topic, sorry if its the case, but making that a hard
rule seems very limiting. Didn't we said that a heap driver could be made to
represent memory region on a remote device such as an eGPU ?
Nicolas
>
> Am I missing something?
>
> Maxime
Hi,
On Thu, Oct 2, 2025 at 9:47 AM Maxime Ripard <mripard(a)redhat.com> wrote:
>
> Hi,
>
> On Thu, Sep 11, 2025 at 03:49:43PM +0200, Jens Wiklander wrote:
> > Export the dma-buf heap functions to allow them to be used by the OP-TEE
> > driver. The OP-TEE driver wants to register and manage specific secure
> > DMA heaps with it.
> >
> > Reviewed-by: Sumit Garg <sumit.garg(a)oss.qualcomm.com>
> > Reviewed-by: T.J. Mercier <tjmercier(a)google.com>
> > Acked-by: Sumit Semwal <sumit.semwal(a)linaro.org>
> > Signed-off-by: Jens Wiklander <jens.wiklander(a)linaro.org>
> > ---
> > drivers/dma-buf/dma-heap.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c
> > index 3cbe87d4a464..8ab49924f8b7 100644
> > --- a/drivers/dma-buf/dma-heap.c
> > +++ b/drivers/dma-buf/dma-heap.c
> > @@ -11,6 +11,7 @@
> > #include <linux/dma-buf.h>
> > #include <linux/dma-heap.h>
> > #include <linux/err.h>
> > +#include <linux/export.h>
> > #include <linux/list.h>
> > #include <linux/nospec.h>
> > #include <linux/syscalls.h>
> > @@ -202,6 +203,7 @@ void *dma_heap_get_drvdata(struct dma_heap *heap)
> > {
> > return heap->priv;
> > }
> > +EXPORT_SYMBOL_NS_GPL(dma_heap_get_drvdata, "DMA_BUF_HEAP");
> >
> > /**
> > * dma_heap_get_name - get heap name
> > @@ -214,6 +216,7 @@ const char *dma_heap_get_name(struct dma_heap *heap)
> > {
> > return heap->name;
> > }
> > +EXPORT_SYMBOL_NS_GPL(dma_heap_get_name, "DMA_BUF_HEAP");
> >
> > /**
> > * dma_heap_add - adds a heap to dmabuf heaps
> > @@ -303,6 +306,7 @@ struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info)
> > kfree(heap);
> > return err_ret;
> > }
> > +EXPORT_SYMBOL_NS_GPL(dma_heap_add, "DMA_BUF_HEAP");
>
> It's not clear to me why we would need to export those symbols.
>
> As far as I know, heaps cannot be removed, and compiling them as module
> means that we would be able to remove them.
>
> Now, if we don't expect the users to be compiled as modules, then we
> don't need to export these symbols at all.
>
> Am I missing something?
In this case, it's the TEE module that _might_ need to instantiate a
DMA heap. Whether it will be instantiated depends on the TEE backend
driver and the TEE firmware. If a heap is instantiated, then it will
not be possible to unload the TEE module. That might not be perfect,
but in my opinion, it's better than other options, such as always
making the TEE subsystem built-in or disabling DMA-heap support when
compiled as a module.
Thanks,
Jens
On Thu, Oct 02, 2025 at 05:12:09PM +0900, Byungchul Park wrote:
> dept needs to notice every entrance from user to kernel mode to treat
> every kernel context independently when tracking wait-event dependencies.
> Roughly, system call and user oriented fault are the cases.
>
> Make dept aware of the entrances of arm64 and add support
> CONFIG_ARCH_HAS_DEPT_SUPPORT to arm64.
The description of what needs to be tracked probably needs some
tightening up here, it's not clear to me for example why exceptions for
mops or the vector extensions aren't included here, or what the
distinction is with error faults like BTI or GCS not being tracked?
On Thu, Oct 2, 2025 at 12:12 PM Guangbo Cui <2407018371(a)qq.com> wrote:
>
> The DEPT patch series changed `wait_for_completion` into a macro.
Thanks!
In general, it is useful to provide a Link: to Lore to the right patch
(i.e. context is good), and please clarify in which tree you found the
issue if any -- I don't see it in linux-next, so I imagine it is not
applied, but "changed" sounds like it was? If it was actually applied,
please also provide a Fixes: tag.
Cheers,
Miguel
Changelog:
v4:
* Split pcim_p2pdma_provider() to two functions, one that initializes
array of providers and another to return right provider pointer.
v3: https://lore.kernel.org/all/cover.1758804980.git.leon@kernel.org
* Changed pcim_p2pdma_enable() to be pcim_p2pdma_provider().
* Cache provider in vfio_pci_dma_buf struct instead of BAR index.
* Removed misleading comment from pcim_p2pdma_provider().
* Moved MMIO check to be in pcim_p2pdma_provider().
v2: https://lore.kernel.org/all/cover.1757589589.git.leon@kernel.org/
* Added extra patch which adds new CONFIG, so next patches can reuse it.
* Squashed "PCI/P2PDMA: Remove redundant bus_offset from map state"
into the other patch.
* Fixed revoke calls to be aligned with true->false semantics.
* Extended p2pdma_providers to be per-BAR and not global to whole device.
* Fixed possible race between dmabuf states and revoke.
* Moved revoke to PCI BAR zap block.
v1: https://lore.kernel.org/all/cover.1754311439.git.leon@kernel.org
* Changed commit messages.
* Reused DMA_ATTR_MMIO attribute.
* Returned support for multiple DMA ranges per-dMABUF.
v0: https://lore.kernel.org/all/cover.1753274085.git.leonro@nvidia.com
---------------------------------------------------------------------------
Based on "[PATCH v6 00/16] dma-mapping: migrate to physical address-based API"
https://lore.kernel.org/all/cover.1757423202.git.leonro@nvidia.com/ series.
---------------------------------------------------------------------------
This series extends the VFIO PCI subsystem to support exporting MMIO
regions from PCI device BARs as dma-buf objects, enabling safe sharing of
non-struct page memory with controlled lifetime management. This allows RDMA
and other subsystems to import dma-buf FDs and build them into memory regions
for PCI P2P operations.
The series supports a use case for SPDK where a NVMe device will be
owned by SPDK through VFIO but interacting with a RDMA device. The RDMA
device may directly access the NVMe CMB or directly manipulate the NVMe
device's doorbell using PCI P2P.
However, as a general mechanism, it can support many other scenarios with
VFIO. This dmabuf approach can be usable by iommufd as well for generic
and safe P2P mappings.
In addition to the SPDK use-case mentioned above, the capability added
in this patch series can also be useful when a buffer (located in device
memory such as VRAM) needs to be shared between any two dGPU devices or
instances (assuming one of them is bound to VFIO PCI) as long as they
are P2P DMA compatible.
The implementation provides a revocable attachment mechanism using dma-buf
move operations. MMIO regions are normally pinned as BARs don't change
physical addresses, but access is revoked when the VFIO device is closed
or a PCI reset is issued. This ensures kernel self-defense against
potentially hostile userspace.
The series includes significant refactoring of the PCI P2PDMA subsystem
to separate core P2P functionality from memory allocation features,
making it more modular and suitable for VFIO use cases that don't need
struct page support.
-----------------------------------------------------------------------
The series is based originally on
https://lore.kernel.org/all/20250307052248.405803-1-vivek.kasireddy@intel.c…
but heavily rewritten to be based on DMA physical API.
-----------------------------------------------------------------------
The WIP branch can be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/log/?h=…
Thanks
Leon Romanovsky (8):
PCI/P2PDMA: Separate the mmap() support from the core logic
PCI/P2PDMA: Simplify bus address mapping API
PCI/P2PDMA: Refactor to separate core P2P functionality from memory
allocation
PCI/P2PDMA: Export pci_p2pdma_map_type() function
types: move phys_vec definition to common header
vfio/pci: Add dma-buf export config for MMIO regions
vfio/pci: Enable peer-to-peer DMA transactions by default
vfio/pci: Add dma-buf export support for MMIO regions
Vivek Kasireddy (2):
vfio: Export vfio device get and put registration helpers
vfio/pci: Share the core device pointer while invoking feature
functions
block/blk-mq-dma.c | 7 +-
drivers/iommu/dma-iommu.c | 4 +-
drivers/pci/p2pdma.c | 177 +++++++++----
drivers/vfio/pci/Kconfig | 20 ++
drivers/vfio/pci/Makefile | 2 +
drivers/vfio/pci/vfio_pci_config.c | 22 +-
drivers/vfio/pci/vfio_pci_core.c | 56 ++--
drivers/vfio/pci/vfio_pci_dmabuf.c | 398 +++++++++++++++++++++++++++++
drivers/vfio/pci/vfio_pci_priv.h | 23 ++
drivers/vfio/vfio_main.c | 2 +
include/linux/pci-p2pdma.h | 120 +++++----
include/linux/types.h | 5 +
include/linux/vfio.h | 2 +
include/linux/vfio_pci_core.h | 3 +
include/uapi/linux/vfio.h | 25 ++
kernel/dma/direct.c | 4 +-
mm/hmm.c | 2 +-
17 files changed, 750 insertions(+), 122 deletions(-)
create mode 100644 drivers/vfio/pci/vfio_pci_dmabuf.c
--
2.51.0
On Tue, 30 Sept 2025 at 12:56, Himanshu Dewangan <h.dewangan(a)samsung.com> wrote:
>
> From: Nagaraju Siddineni <nagaraju.s(a)samsung.com>
>
> Introduce a new Kconfig entry VIDEO_EXYNOS_MFC for the Samsung
> Exynos MFC driver that supports firmware version 13 and later.
> Extend the top‑level Samsung platform Kconfig to disable the legacy
> S5P‑MFC driver when its firmware version is > v12 and to select the
> new Exynos‑MFC driver only when VIDEO_SAMSUNG_S5P_MFC is not enabled.
>
> Add exynos-mfc Kconfig and Makefile for probe functionality and creation
> of decoder and encoder device files by registering the driver object
> exynos_mfc.o and other relevant source files.
>
> Provide header files mfc_core_ops.h and mfc_rm.h containing core
> operation prototypes, resource‑manager helpers,
> and core‑selection utilities.
>
> Add a configurable option MFC_USE_COREDUMP to enable core‑dump
> support for debugging MFC errors.
>
> These changes bring support for newer Exynos‑based MFC hardware,
> cleanly separate it from the legacy S5P‑MFC driver, and lay the
> groundwork for future feature development and debugging.
>
No, NAK. Existing driver is well tested and already used on newest
Exynos SoC, so all this new driver is exactly how you should not work
in upstream. You need to integrate into existing driver.
Samsung received this review multiple times already.
Best regards,
Krzysztof
On Tue, Sep 30, 2025 at 12:50:47PM +0000, Shameer Kolothum wrote:
> This is where hisi_acc reports a different BAR size as it tries to hide
> the migration control region from Guest access.
I think for now we should disable DMABUF for any PCI driver that
implements a VFIO_DEVICE_GET_REGION_INFO
For a while I've wanted to further reduce the use of the ioctl
multiplexer, so maybe this series:
https://github.com/jgunthorpe/linux/commits/vfio_get_region_info_op/
And then the dmabuf code can check if the ops are set to the generic
or not and disable itself automatically.
Otherwise perhaps route the dmabuf through an op and deliberately omit
it (with a comment!) from hisi, virtio, nvgrace.
We need to route it through an op anyhow as those three drivers will
probably eventually want to implement their own version.
Jason
Hi Himanshu,
Le mardi 30 septembre 2025 à 09:33 +0530, Himanshu Dewangan a écrit :
> Exynos MFC new driver upstream proposal
> +++++++++++++++++++++++++++++++++++++++
>
> The s5p-mfc driver in the kernel is quite outdated and has not kept up with the hardware advances of the MFC IP.
> Going forward, we want to provide support for all the later versions of MFC in open source (both mobile and
> ExynosAuto would be supported by Samsung)
>
> We (Samsung) would like to propose a new driver for the latest generation of Samsung MFC (Multi-Format Codec) hardware.
> Although the kernel already contains a Samsung MFC driver (drivers/media/platform/s5p-mfc/), the newer hardware
> diverges significantly from the previous generations, in features supported, register interface and in system integration.
> This has necessitated a new driver, rather than updating the existing one.
I wont deny that sometimes a new driver is needed, and I encourage you to defend
your point. It does just justify any form of copy paste, also understand that
device descriptions should be independent from the driver implementation. This
is also why this is reviewed indecently, and DT nack won't ever be ignored by
us.
From quick walk through, I'm not convince this new driver actually makes use of
everything new in Linux and Linux Media since 2011. It will be important for you
to research what other modern drivers do, and what could apply to your code
base. I'm quite skeptical with all the custom memory handling code, which
generally indicates the miss-use of dma APIs. Realistically, you will have to
split your driver in smaller parts and submit in a way we can see your design
principle, and not just randomly unused files being added. Considering the state
of it, we are up to 20 or 30 revision, with 29 patches, you won't get to the end
of that process.
V4L2 wise, one of the common mistakes is that you are adding a lot of new
controls, most of them just slammed as vendor control without even trying to
generalize. It did make sense in 2011, since there was no decoder to compare
against, but today there is a lot of example and overlap between various brand.
Omitting documentation and not keeping the API addition separate is also a no go
for me. Make it very clear whenever something that will live in our API forever
is to be added.
We also added rules since 2011 that enforce drivers submitter to show that
proper testing have occurred. Its starts with the very basic v4l2-compliance
report which you have omitted. Since its codec driver, we require a summary of
your conformance decoding testing done with fluster[] with the supported
framework of your choice (for v4l2 stateful, ffmpeg and gstreamer are supported,
you can add more, as long as they are open source).
We also expect that your firmware has been submitted to linux-firmware with a
link to that submission. Without that, we can only consider your set as an RFC
to show people what is coming.
regards,
Nicolas
>
>
> Current driver vs targetted driver comparison
> +++++++++++++++++++++++++++++++++++++++++++++
>
> Target Feature
> Current mainline : Simple V4L2/ VB2 interface based encoder/ decoder
> New proposed driver: Dual core support, NAL-q support, LLC, Coredump, performance
> measurement, plugin driver architecture, hardware manager(meerkat), DRM/OTF,
> Resource manager, bandwidth compression, New Pixel formats (NV12N, YV12, P010,
> SBWC, RGB family), 10 bit support, HDR support, Prio and RR Process Scheduler support,
>
> Register map
> Current mainline : Fixed register layout, compatible across s5p variants
> New proposed driver: Completely redesigned register set, incompatible with old layout
>
> Command model
> Current mainline : Mailbox-style command queue
> New proposed driver: Ring-buffer command queue with different signaling
>
> Memory management
> Current mainline : CMA-backed contiguous buffers, ION legacy
> New proposed driver: dma-heap / scatter-gather buffers with strict alignment rules
>
> Firmware
> Current mainline : Supports up to Firmware v12, Legacy binary format, loaded via shared mechanism
> New proposed driver: New firmware format, different protocol for control messages. Support Firmware v13 onwards
>
> DT bindings
> Current mainline : Single clock + reset, simple PM
> New proposed driver: Multiple clocks, reset domains, runtime PM dependencies
>
> Error handling
> Current mainline : Simple IRQ error flags
> New proposed driver: Detailed error codes, recovery sequences required
>
> Code impact
> Current mainline :~8k LOC, minimal conditionals
> New proposed driver: ~65KLOC with full features
>
>
> Plan for supporting latest MFC (Best balance between code clarity and long-term kernel health, while still respecting ABI and legacy users.)
> 1 We propose a new driver (exynos-mfc) for the latest generation of Samsung MFC (Multi-Format Codec) hardware.
> 2 MFC FW V6 to V12 will be supported by existing mainline (s5p-mfc) and later versions by Exynos-mfc driver
> 3 The existing MFC driver will remain available for older SoC’s and will not be broken. The new driver will only bind
> to new compatible strings in DT, avoiding regressions for legacy hardware. Samsung will take responsibility for
> maintaining both drivers until the old one can be formally marked as “legacy.”
> 4 Keep it buildable for old SoCs but clearly say new SoCs should use the new driver.
> 5 VIDEO_SAMSUNG_S5P_MFC and VIDEO_EXYNOS_MFC will both be supported for an agreed time
> 6 Long term Support for new driver - commitment from Samsung
> 7 The hardware has diverged to the point where conditionally supporting both in one codebase is worse for long-term kernel health
> 8 Splitting keeps the code clean, testable, and reviewable, while ensuring legacy users aren’t broken due to user space ABI guarantees.
> This seems more clean and easier approach Both can coexist without code spaghetti.
>
> Features and description supported
> ++++++++++++++++++++++++++++++++++
>
> 1 MFC driver registration Probe functionality and video nodes registration
> 2 MFC driver open & close support MFC firmware loading, "ls" & "cat" on the video nodes and udev rules on the video nodes
> 3 H264 decoding H264 decoding support - HW supported profiles & levels (YUV420 Semi-Planar, 8-bit, min/max resolution)
> 4 HEVC decoding HEVC decoding support - HW supported profiles & levels (YUV420 Semi-Planar, 8-bit, min/max resolution)
> 5 VP8 decoding VP8 decoding support - HW supported profiles & levels (YUV420 Semi-Planar, 8-bit, min/max resolution)
> 6 VP9 decoding VP9 decoding support - HW supported profiles & levels (YUV420 Semi-Planar, 8-bit, min/max resolution)
> 7 AV1 decoding AV1 decoding support - HW supported profiles & levels (YUV420 Semi-Planar, 8-bit, min/max resolution)
> 8 H264 encoding H264 encoding support - Basic encoding (YUV420 Semi-Planar, 8-bit, min/max resolution)
> 9 HEVC encoding HEVC encoding support - Basic encoding (YUV420 Semi-Planar, 8-bit, min/max resolution)
> 10 VP8 encoding VP8 encoding support - Basic encoding (YUV420 Semi-Planar, 8-bit, min/max resolution)
> 11 VP9 encoding VP9 encoding support - Basic encoding (YUV420 Semi-Planar, 8-bit, min/max resolution)
> 12 Debug fs support Debug fs to control the MFC functionalities
> 13 Debug log support Debug logs to get on the dmesg prompt for debug purpose
> 14 Debug SFR dump support MFC SFR dumps during failures
> 15 NAL Queue mode control NAL Queue mode support
> 16 Batch mode control Batch mode support
> 17 HW supported YUV formats YUV 420, 422, 444 (planar, semi-planar) formats support as per MFC HW specification
> 18 HW supported RGB formats RGB format support as per MFC HW specification
> 19 Multi instance decoding/encoding Multi instance decoding/encoding
> 20 Suspend and resume Suspend and resume support
> 21 Runtime suspend and resume Runtime suspend and resume support
> 22 Priority decoding (decoders) Priority decoding support
> 23 Frame delay configuration (decoders) Frame delay configuration support
> 24 Error handling and conceal control (decoders) HW/Platform limitations should be gracefully exited and,
> bit stream errors should be reported or concealed with warning indication
> 25 Reference frame control (encoders) Reference frame control support
> 26 SPS/PPS control (encoders) SPS/PPS control support
> 27 Loop filter control (encoders) Loop filter control support
> 28 B frame support (encoders) B frame support
> 29 GOP control (encoders) GOP control support
> 30 Frame rate control (encoders) Frame rate control support
>
> Features to be supported in 2026
> +++++++++++++++++++++++++++++++++
>
> 31 Bit rate control (encoders) Bit rate control support
> 32 QP control (encoders) QP control support
> 33 I/IDR control (encoders) I/IDR control support
> 34 Scalable control (encoders) Scalable control support
> 35 ROI control (encoders) ROI control support
> 36 Multi slice control (encoders) Multi slice control support
> 37 Profile/Level control (encoders) Profile/Level control support
> 38 Padding control (encoders) Padding control support
> 39 Aspect ratio control (encoders) Aspect ratio control support
> 40 Buffer full handling (encoders) Buffer full handling support
> 41 SBWC SBWC bandwidth compression support
> 42 10-bit support 10-bit support as per MFC HW specification
> 43 Secure signed FW support Security signed FW support
> 44 Secure playback DRM content playback for decoders
> 45 HDR Support (decoders) HDR metadata support
> 46 Dynamic resolution change Dynamic resolution change support
>
> Nagaraju Siddineni (29):
> dt-bindings: media: mfc: Add Exynos MFC devicetree binding
> arm64: dts: mfc: Add MFC device tree for Auto V920 SoC
> media: mfc: Add MFC driver data structures and debugging macros
> media: mfc: Add full register map and bit definitions for MFC hardware
> media: mfc: Add MFC driver header files and core utilities
> media: mfc: Add MFC core hardware register and debugfs APIs
> media: mfc: Add MFC core command, hwlock, ISR and run functionalities
> media: mfc: Add Exynos‑MFC driver probe support
> media: mfc: Add bus‑devfreq, QoS, multi‑view and control
> infrastructure
> media: mfc: Add buffer‑queue and IOVMM support
> media: mfc: Add rate‑calculation framework and memory utilities
> media: mfc: Introduce QoS support and instance context handling
> media: mfc: Add decoder core sync functions
> media: mfc: Add buffer‑control framework
> media: mfc: Add decoder resource‑management (RM) support and
> load‑balancing
> media: mfc: Enhance HW‑lock handling, scheduling and error recovery
> media: mfc: Add VB2 decoder support
> media: mfc: Add V4L2 decoder driver
> media: mfc: Add QoS, Butler workqueue, and priority‑based scheduling
> media: mfc: Add H264 decoder support
> media: mfc: Add multi‑codec support & QoS improvements
> media: mfc: Add H.264 encoder support with buffer and QoS improvements
> media: mfc: Add encoder parameters, ROI & QoS support
> media: mfc: Add encoder VB2 support to driver
> media: mfc: Add encoder v4l2 driver interface
> media: mfc: Add full encoder support
> media: mfc: Add H.264 encoder support
> media: mfc: Add AVC, VP8, VP9, and HEVC encoding support
> media: mfc: Hardware‑accelerated encoding support
>
> .../bindings/media/samsung,exynos-mfc.yaml | 77 +
> MAINTAINERS | 10 +
> .../dts/exynos/exynosautov920-evt2-mfc.dtsi | 630 +++
> .../arm64/boot/dts/exynos/exynosautov920.dtsi | 1 +
> drivers/media/platform/samsung/Kconfig | 7 +
> drivers/media/platform/samsung/Makefile | 1 +
> .../media/platform/samsung/exynos-mfc/Kconfig | 34 +
> .../platform/samsung/exynos-mfc/Makefile | 26 +
> .../samsung/exynos-mfc/base/mfc_buf.c | 765 +++
> .../samsung/exynos-mfc/base/mfc_buf.h | 43 +
> .../samsung/exynos-mfc/base/mfc_common.h | 444 ++
> .../samsung/exynos-mfc/base/mfc_data_struct.h | 2014 +++++++
> .../samsung/exynos-mfc/base/mfc_debug.h | 247 +
> .../samsung/exynos-mfc/base/mfc_format.h | 316 ++
> .../samsung/exynos-mfc/base/mfc_macros.h | 95 +
> .../samsung/exynos-mfc/base/mfc_media.h | 554 ++
> .../samsung/exynos-mfc/base/mfc_mem.c | 995 ++++
> .../samsung/exynos-mfc/base/mfc_mem.h | 155 +
> .../samsung/exynos-mfc/base/mfc_qos.c | 1070 ++++
> .../samsung/exynos-mfc/base/mfc_qos.h | 99 +
> .../samsung/exynos-mfc/base/mfc_queue.c | 966 ++++
> .../samsung/exynos-mfc/base/mfc_queue.h | 158 +
> .../exynos-mfc/base/mfc_rate_calculate.c | 640 +++
> .../exynos-mfc/base/mfc_rate_calculate.h | 106 +
> .../samsung/exynos-mfc/base/mfc_regs.h | 58 +
> .../samsung/exynos-mfc/base/mfc_regs_mfc.h | 1002 ++++
> .../samsung/exynos-mfc/base/mfc_sched.h | 30 +
> .../samsung/exynos-mfc/base/mfc_utils.c | 401 ++
> .../samsung/exynos-mfc/base/mfc_utils.h | 481 ++
> .../media/platform/samsung/exynos-mfc/mfc.c | 1366 +++++
> .../platform/samsung/exynos-mfc/mfc_core.c | 703 +++
> .../samsung/exynos-mfc/mfc_core_buf_ctrl.c | 543 ++
> .../samsung/exynos-mfc/mfc_core_cmd.c | 576 ++
> .../samsung/exynos-mfc/mfc_core_cmd.h | 41 +
> .../samsung/exynos-mfc/mfc_core_enc_param.c | 1463 ++++++
> .../samsung/exynos-mfc/mfc_core_enc_param.h | 23 +
> .../samsung/exynos-mfc/mfc_core_hw_reg_api.c | 122 +
> .../samsung/exynos-mfc/mfc_core_hw_reg_api.h | 144 +
> .../samsung/exynos-mfc/mfc_core_hwlock.c | 761 +++
> .../samsung/exynos-mfc/mfc_core_hwlock.h | 80 +
> .../samsung/exynos-mfc/mfc_core_intlock.c | 98 +
> .../samsung/exynos-mfc/mfc_core_intlock.h | 20 +
> .../samsung/exynos-mfc/mfc_core_isr.c | 2104 ++++++++
> .../samsung/exynos-mfc/mfc_core_isr.h | 25 +
> .../samsung/exynos-mfc/mfc_core_ops.c | 813 +++
> .../samsung/exynos-mfc/mfc_core_ops.h | 16 +
> .../platform/samsung/exynos-mfc/mfc_core_pm.c | 209 +
> .../platform/samsung/exynos-mfc/mfc_core_pm.h | 33 +
> .../samsung/exynos-mfc/mfc_core_reg_api.c | 597 +++
> .../samsung/exynos-mfc/mfc_core_reg_api.h | 380 ++
> .../samsung/exynos-mfc/mfc_core_run.c | 541 ++
> .../samsung/exynos-mfc/mfc_core_run.h | 35 +
> .../samsung/exynos-mfc/mfc_core_sched_prio.c | 431 ++
> .../samsung/exynos-mfc/mfc_core_sync.c | 423 ++
> .../samsung/exynos-mfc/mfc_core_sync.h | 34 +
> .../samsung/exynos-mfc/mfc_ctx_ctrl.c | 1469 ++++++
> .../platform/samsung/exynos-mfc/mfc_debugfs.c | 248 +
> .../platform/samsung/exynos-mfc/mfc_debugfs.h | 20 +
> .../samsung/exynos-mfc/mfc_dec_v4l2.c | 1739 +++++++
> .../samsung/exynos-mfc/mfc_dec_v4l2.h | 20 +
> .../platform/samsung/exynos-mfc/mfc_dec_vb2.c | 394 ++
> .../platform/samsung/exynos-mfc/mfc_dec_vb2.h | 19 +
> .../samsung/exynos-mfc/mfc_enc_v4l2.c | 4614 +++++++++++++++++
> .../samsung/exynos-mfc/mfc_enc_v4l2.h | 20 +
> .../platform/samsung/exynos-mfc/mfc_enc_vb2.c | 443 ++
> .../platform/samsung/exynos-mfc/mfc_enc_vb2.h | 19 +
> .../platform/samsung/exynos-mfc/mfc_rm.c | 2652 ++++++++++
> .../platform/samsung/exynos-mfc/mfc_rm.h | 110 +
> 68 files changed, 34773 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/samsung,exynos-mfc.yaml
> create mode 100644 arch/arm64/boot/dts/exynos/exynosautov920-evt2-mfc.dtsi
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/Kconfig
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/Makefile
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_buf.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_buf.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_common.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_data_struct.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_debug.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_format.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_macros.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_media.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_mem.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_mem.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_qos.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_qos.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_queue.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_queue.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_rate_calculate.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_rate_calculate.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_regs.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_regs_mfc.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_sched.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_utils.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/base/mfc_utils.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_buf_ctrl.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_cmd.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_cmd.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_enc_param.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_enc_param.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_hw_reg_api.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_hw_reg_api.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_hwlock.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_hwlock.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_intlock.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_intlock.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_isr.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_isr.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_ops.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_ops.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_pm.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_pm.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_reg_api.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_reg_api.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_run.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_run.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_sched_prio.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_sync.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_core_sync.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_ctx_ctrl.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_debugfs.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_debugfs.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_dec_v4l2.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_dec_v4l2.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_dec_vb2.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_dec_vb2.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_enc_v4l2.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_enc_v4l2.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_enc_vb2.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_enc_vb2.h
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_rm.c
> create mode 100644 drivers/media/platform/samsung/exynos-mfc/mfc_rm.h
On Tue, 30 Sept 2025 at 12:55, Himanshu Dewangan <h.dewangan(a)samsung.com> wrote:
>
> From: Nagaraju Siddineni <nagaraju.s(a)samsung.com>
>
> Introduce the device‑tree entries for the Samsung Exynos AUTO V920
> multimedia‑function controller (MFC). The patch defines:
> - Reserved memory regions for firmware and CMA buffers.
> - Core0 and Core1 memory mappings.
> - The main MFC node with basic properties (compatible, reg, interrupts,
> clocks, DMA window, firmware name, debug mode, etc.).
> - Per‑core sub‑nodes (MFC‑0 and MFC‑1) with their own sysmmu,
> firmware region, and configuration parameters.
> - Resource table listing supported codecs and their capabilities.
>
> Adds full support for the V920 MFC hardware to the mainline kernel
> device‑tree, enabling proper memory allocation, interrupt handling and
> codec operation on this platform.
>
> Signed-off-by: Nagaraju Siddineni <nagaraju.s(a)samsung.com>
> Signed-off-by: Himanshu Dewangan <h.dewangan(a)samsung.com>
> ---
> .../dts/exynos/exynosautov920-evt2-mfc.dtsi | 187 ++++++++++++++++++
No, there are no such files. Don't push your downstream here.
> .../arm64/boot/dts/exynos/exynosautov920.dtsi | 1 +
> 2 files changed, 188 insertions(+)
> create mode 100644 arch/arm64/boot/dts/exynos/exynosautov920-evt2-mfc.dtsi
>
This doesn't belong to media patchset, don't combine them.
Anyway, you completely disregarded DTS coding style and how we were
Samsung DTS. Please don't send us downstream code.
I won't be reviewing this, you need to start from scratch looming at
other recent code.
Remember also about Samsung maintainer profile, although with such
completely broken and non working bindings it's pointless now - this
code couldn't even be reliably tested with them.
Best regards,
Krzysztof