On Wed, Oct 15, 2025 at 09:12:07AM +0800, Zhaoyang Huang wrote:
> > Could be that we need to make this behavior conditional, but somebody would need to come up with some really good arguments to justify the complexity.
> ok, should we use CONFIG_DMA_BUF_BULK_ALLOCATION or a variable
> controlled by sysfs interface?
No. Explain what you're trying to solve, because you haven't yet.
On 14.10.25 17:10, Petr Tesarik wrote:
> On Tue, 14 Oct 2025 15:04:14 +0200
> Christian König <christian.koenig(a)amd.com> wrote:
>
>> On 14.10.25 14:44, Zhaoyang Huang wrote:
>>> On Tue, Oct 14, 2025 at 7:59 PM Christian König
>>> <christian.koenig(a)amd.com> wrote:
>>>>
>>>> On 14.10.25 10:32, zhaoyang.huang wrote:
>>>>> From: Zhaoyang Huang <zhaoyang.huang(a)unisoc.com>
>>>>>
>>>>> The size of once dma-buf allocation could be dozens MB or much more
>>>>> which introduce a loop of allocating several thousands of order-0 pages.
>>>>> Furthermore, the concurrent allocation could have dma-buf allocation enter
>>>>> direct-reclaim during the loop. This commit would like to eliminate the
>>>>> above two affections by introducing alloc_pages_bulk_list in dma-buf's
>>>>> order-0 allocation. This patch is proved to be conditionally helpful
>>>>> in 18MB allocation as decreasing the time from 24604us to 6555us and no
>>>>> harm when bulk allocation can't be done(fallback to single page
>>>>> allocation)
>>>>
>>>> Well that sounds like an absolutely horrible idea.
>>>>
>>>> See the handling of allocating only from specific order is *exactly* there to avoid the behavior of bulk allocation.
>>>>
>>>> What you seem to do with this patch here is to add on top of the behavior to avoid allocating large chunks from the buddy the behavior to allocate large chunks from the buddy because that is faster.
>>> emm, this patch doesn't change order-8 and order-4's allocation
>>> behaviour but just to replace the loop of order-0 allocations into
>>> once bulk allocation in the fallback way. What is your concern about
>>> this?
>>
>> As far as I know the bulk allocation favors splitting large pages into smaller ones instead of allocating smaller pages first. That's where the performance benefit comes from.
>>
>> But that is exactly what we try to avoid here by allocating only certain order of pages.
>
> This is a good question, actually. Yes, bulk alloc will split large
> pages if there are insufficient pages on the pcp free list. But is
> dma-buf indeed trying to avoid it, or is it merely using an inefficient
> API? And does it need the extra speed? Even if it leads to increased
> fragmentation?
DMA-buf-heaps is completly intentionally trying rather hard to avoid splitting large pages. That's why you have the distinction between HIGH_ORDER_GFP and LOW_ORDER_GFP as well.
Keep in mind that this is mostly used on embedded system with only small amounts of memory.
Not entering direct reclaim and instead preferring to split large pages until they are used up is an absolutely no-go for most use cases as far as I can see.
Could be that we need to make this behavior conditional, but somebody would need to come up with some really good arguments to justify the complexity.
Regards,
Christian.
>
> Petr T
On Tue, Oct 14, 2025 at 04:32:28PM +0800, zhaoyang.huang wrote:
> From: Zhaoyang Huang <zhaoyang.huang(a)unisoc.com>
>
> This series of patches would like to introduce alloc_pages_bulk_list in
> dma-buf which need to call back the API for page allocation.
Start with the problem you're trying to solve.
On 14.10.25 14:44, Zhaoyang Huang wrote:
> On Tue, Oct 14, 2025 at 7:59 PM Christian König
> <christian.koenig(a)amd.com> wrote:
>>
>> On 14.10.25 10:32, zhaoyang.huang wrote:
>>> From: Zhaoyang Huang <zhaoyang.huang(a)unisoc.com>
>>>
>>> The size of once dma-buf allocation could be dozens MB or much more
>>> which introduce a loop of allocating several thousands of order-0 pages.
>>> Furthermore, the concurrent allocation could have dma-buf allocation enter
>>> direct-reclaim during the loop. This commit would like to eliminate the
>>> above two affections by introducing alloc_pages_bulk_list in dma-buf's
>>> order-0 allocation. This patch is proved to be conditionally helpful
>>> in 18MB allocation as decreasing the time from 24604us to 6555us and no
>>> harm when bulk allocation can't be done(fallback to single page
>>> allocation)
>>
>> Well that sounds like an absolutely horrible idea.
>>
>> See the handling of allocating only from specific order is *exactly* there to avoid the behavior of bulk allocation.
>>
>> What you seem to do with this patch here is to add on top of the behavior to avoid allocating large chunks from the buddy the behavior to allocate large chunks from the buddy because that is faster.
> emm, this patch doesn't change order-8 and order-4's allocation
> behaviour but just to replace the loop of order-0 allocations into
> once bulk allocation in the fallback way. What is your concern about
> this?
As far as I know the bulk allocation favors splitting large pages into smaller ones instead of allocating smaller pages first. That's where the performance benefit comes from.
But that is exactly what we try to avoid here by allocating only certain order of pages.
Regards,
Christian.
>>
>> So this change here doesn't looks like it will fly very high. Please explain what you're actually trying to do, just optimize allocation time?
>>
>> Regards,
>> Christian.
>>
>>> Signed-off-by: Zhaoyang Huang <zhaoyang.huang(a)unisoc.com>
>>> ---
>>> drivers/dma-buf/heaps/system_heap.c | 36 +++++++++++++++++++----------
>>> 1 file changed, 24 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c
>>> index bbe7881f1360..71b028c63bd8 100644
>>> --- a/drivers/dma-buf/heaps/system_heap.c
>>> +++ b/drivers/dma-buf/heaps/system_heap.c
>>> @@ -300,8 +300,8 @@ static const struct dma_buf_ops system_heap_buf_ops = {
>>> .release = system_heap_dma_buf_release,
>>> };
>>>
>>> -static struct page *alloc_largest_available(unsigned long size,
>>> - unsigned int max_order)
>>> +static void alloc_largest_available(unsigned long size,
>>> + unsigned int max_order, unsigned int *num_pages, struct list_head *list)
>>> {
>>> struct page *page;
>>> int i;
>>> @@ -312,12 +312,19 @@ static struct page *alloc_largest_available(unsigned long size,
>>> if (max_order < orders[i])
>>> continue;
>>>
>>> - page = alloc_pages(order_flags[i], orders[i]);
>>> - if (!page)
>>> + if (orders[i]) {
>>> + page = alloc_pages(order_flags[i], orders[i]);
>>> + if (page) {
>>> + list_add(&page->lru, list);
>>> + *num_pages = 1;
>>> + }
>>> + } else
>>> + *num_pages = alloc_pages_bulk_list(LOW_ORDER_GFP, size / PAGE_SIZE, list);
>>> +
>>> + if (list_empty(list))
>>> continue;
>>> - return page;
>>> + return;
>>> }
>>> - return NULL;
>>> }
>>>
>>> static struct dma_buf *system_heap_allocate(struct dma_heap *heap,
>>> @@ -335,6 +342,8 @@ static struct dma_buf *system_heap_allocate(struct dma_heap *heap,
>>> struct list_head pages;
>>> struct page *page, *tmp_page;
>>> int i, ret = -ENOMEM;
>>> + unsigned int num_pages;
>>> + LIST_HEAD(head);
>>>
>>> buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
>>> if (!buffer)
>>> @@ -348,6 +357,8 @@ static struct dma_buf *system_heap_allocate(struct dma_heap *heap,
>>> INIT_LIST_HEAD(&pages);
>>> i = 0;
>>> while (size_remaining > 0) {
>>> + num_pages = 0;
>>> + INIT_LIST_HEAD(&head);
>>> /*
>>> * Avoid trying to allocate memory if the process
>>> * has been killed by SIGKILL
>>> @@ -357,14 +368,15 @@ static struct dma_buf *system_heap_allocate(struct dma_heap *heap,
>>> goto free_buffer;
>>> }
>>>
>>> - page = alloc_largest_available(size_remaining, max_order);
>>> - if (!page)
>>> + alloc_largest_available(size_remaining, max_order, &num_pages, &head);
>>> + if (!num_pages)
>>> goto free_buffer;
>>>
>>> - list_add_tail(&page->lru, &pages);
>>> - size_remaining -= page_size(page);
>>> - max_order = compound_order(page);
>>> - i++;
>>> + list_splice_tail(&head, &pages);
>>> + max_order = folio_order(lru_to_folio(&head));
>>> + size_remaining -= PAGE_SIZE * (num_pages << max_order);
>>> + i += num_pages;
>>> +
>>> }
>>>
>>> table = &buffer->sg_table;
>>
On 14.10.25 10:32, zhaoyang.huang wrote:
> From: Zhaoyang Huang <zhaoyang.huang(a)unisoc.com>
>
> The size of once dma-buf allocation could be dozens MB or much more
> which introduce a loop of allocating several thousands of order-0 pages.
> Furthermore, the concurrent allocation could have dma-buf allocation enter
> direct-reclaim during the loop. This commit would like to eliminate the
> above two affections by introducing alloc_pages_bulk_list in dma-buf's
> order-0 allocation. This patch is proved to be conditionally helpful
> in 18MB allocation as decreasing the time from 24604us to 6555us and no
> harm when bulk allocation can't be done(fallback to single page
> allocation)
Well that sounds like an absolutely horrible idea.
See the handling of allocating only from specific order is *exactly* there to avoid the behavior of bulk allocation.
What you seem to do with this patch here is to add on top of the behavior to avoid allocating large chunks from the buddy the behavior to allocate large chunks from the buddy because that is faster.
So this change here doesn't looks like it will fly very high. Please explain what you're actually trying to do, just optimize allocation time?
Regards,
Christian.
> Signed-off-by: Zhaoyang Huang <zhaoyang.huang(a)unisoc.com>
> ---
> drivers/dma-buf/heaps/system_heap.c | 36 +++++++++++++++++++----------
> 1 file changed, 24 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c
> index bbe7881f1360..71b028c63bd8 100644
> --- a/drivers/dma-buf/heaps/system_heap.c
> +++ b/drivers/dma-buf/heaps/system_heap.c
> @@ -300,8 +300,8 @@ static const struct dma_buf_ops system_heap_buf_ops = {
> .release = system_heap_dma_buf_release,
> };
>
> -static struct page *alloc_largest_available(unsigned long size,
> - unsigned int max_order)
> +static void alloc_largest_available(unsigned long size,
> + unsigned int max_order, unsigned int *num_pages, struct list_head *list)
> {
> struct page *page;
> int i;
> @@ -312,12 +312,19 @@ static struct page *alloc_largest_available(unsigned long size,
> if (max_order < orders[i])
> continue;
>
> - page = alloc_pages(order_flags[i], orders[i]);
> - if (!page)
> + if (orders[i]) {
> + page = alloc_pages(order_flags[i], orders[i]);
> + if (page) {
> + list_add(&page->lru, list);
> + *num_pages = 1;
> + }
> + } else
> + *num_pages = alloc_pages_bulk_list(LOW_ORDER_GFP, size / PAGE_SIZE, list);
> +
> + if (list_empty(list))
> continue;
> - return page;
> + return;
> }
> - return NULL;
> }
>
> static struct dma_buf *system_heap_allocate(struct dma_heap *heap,
> @@ -335,6 +342,8 @@ static struct dma_buf *system_heap_allocate(struct dma_heap *heap,
> struct list_head pages;
> struct page *page, *tmp_page;
> int i, ret = -ENOMEM;
> + unsigned int num_pages;
> + LIST_HEAD(head);
>
> buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
> if (!buffer)
> @@ -348,6 +357,8 @@ static struct dma_buf *system_heap_allocate(struct dma_heap *heap,
> INIT_LIST_HEAD(&pages);
> i = 0;
> while (size_remaining > 0) {
> + num_pages = 0;
> + INIT_LIST_HEAD(&head);
> /*
> * Avoid trying to allocate memory if the process
> * has been killed by SIGKILL
> @@ -357,14 +368,15 @@ static struct dma_buf *system_heap_allocate(struct dma_heap *heap,
> goto free_buffer;
> }
>
> - page = alloc_largest_available(size_remaining, max_order);
> - if (!page)
> + alloc_largest_available(size_remaining, max_order, &num_pages, &head);
> + if (!num_pages)
> goto free_buffer;
>
> - list_add_tail(&page->lru, &pages);
> - size_remaining -= page_size(page);
> - max_order = compound_order(page);
> - i++;
> + list_splice_tail(&head, &pages);
> + max_order = folio_order(lru_to_folio(&head));
> + size_remaining -= PAGE_SIZE * (num_pages << max_order);
> + i += num_pages;
> +
> }
>
> table = &buffer->sg_table;
On Mon, Sep 29, 2025 at 1:54 PM Frank Li <Frank.li(a)nxp.com> wrote:
>
> On Fri, Sep 26, 2025 at 03:00:48PM -0500, Rob Herring (Arm) wrote:
> > Add a binding schema for Arm Ethos-U65/U85 NPU. The Arm Ethos-U NPUs are
> > designed for edge AI inference applications.
> >
> > Signed-off-by: Rob Herring (Arm) <robh(a)kernel.org>
> > ---
> > .../devicetree/bindings/npu/arm,ethos.yaml | 79 ++++++++++++++++++++++
> > 1 file changed, 79 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/npu/arm,ethos.yaml b/Documentation/devicetree/bindings/npu/arm,ethos.yaml
> > new file mode 100644
> > index 000000000000..716c4997f976
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/npu/arm,ethos.yaml
> > @@ -0,0 +1,79 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/npu/arm,ethos.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Arm Ethos U65/U85
> > +
> > +maintainers:
> > + - Rob Herring <robh(a)kernel.org>
> > +
> > +description: >
> > + The Arm Ethos-U NPUs are designed for IoT inference applications. The NPUs
> > + can accelerate 8-bit and 16-bit integer quantized networks:
> > +
> > + Transformer networks (U85 only)
> > + Convolutional Neural Networks (CNN)
> > + Recurrent Neural Networks (RNN)
> > +
> > + Further documentation is available here:
> > +
> > + U65 TRM: https://developer.arm.com/documentation/102023/
> > + U85 TRM: https://developer.arm.com/documentation/102685/
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - items:
> > + - enum:
> > + - fsl,imx93-npu
> > + - const: arm,ethos-u65
> > + - items:
> > + - {}
>
> what's means {} here ?, just not allow arm,ethos-u85 alone?
Yes, u85 support is currently on a FVP model. The naming for it isn't
really clear yet nor is it clear if it ever will be. So really just a
placeholder until there is a chip using it. It keeps folks from using
just the fallback.
>
> Reviewed-by: Frank Li <Frank.Li(a)nxp.com>
Thanks,
Rob
On Tue, Oct 07, 2025 at 11:10:32PM -0700, Kees Cook wrote:
> The dma-buf pseudo-filesystem should never have executable mappings nor
> device nodes. Set SB_I_NOEXEC and SB_I_NODEV on the superblock to enforce
> this at the filesystem level, similar to secretmem, commit 98f99394a104
> ("secretmem: use SB_I_NOEXEC").
>
> Fix the syzbot-reported warning from the exec code to enforce this
> requirement:
Can you please just enforce this in init_pseudo? If a file system
really wants to support devices or executable it can clear them,
but a quick grep suggests that none of them should.
On Thu, Oct 02, 2025 at 05:12:35PM +0900, Byungchul Park wrote:
> Functionally no change. This patch is a preparation for DEPT(DEPendency
> Tracker) to track dependencies related to a scheduler API,
> wait_for_completion().
>
> Unfortunately, struct i2c_algo_pca_data has a callback member named
> wait_for_completion, that is the same as the scheduler API, which makes
> it hard to change the scheduler API to a macro form because of the
> ambiguity.
>
> Add a postfix _cb to the callback member to remove the ambiguity.
>
> Signed-off-by: Byungchul Park <byungchul(a)sk.com>
This patch seems reasonable in any case. I'll pick it, so you have one
dependency less. Good luck with the series!
Applied to for-next, thanks!
On Fri, Oct 03, 2025 at 10:46:41AM +0900, Byungchul Park wrote:
> On Thu, Oct 02, 2025 at 12:39:31PM +0100, Mark Brown wrote:
> > 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?
> Thanks for the feedback but I'm afraid I don't get you. Can you explain
> in more detail with example?
Your commit log says we need to track every entrance from user mode to
kernel mode but the code only adds tracking to syscalls and some memory
faults. The exception types listed above (and some others) also result
in entries to the kernel from userspace.
> JFYI, pairs of wait and its event need to be tracked to see if each
> event can be prevented from being reachable by other waits like:
> context X context Y
>
> lock L
> ...
> initiate event A context start toward event A
> ... ...
> wait A // wait for event A and lock L // wait for unlock L and
> // prevent unlock L // prevent event A
> ... ...
> unlock L unlock L
> ...
> event A
> I meant things like this need to be tracked.
I don't think that's at all clear from the above context, and the
handling for some of the above exception types (eg, the vector
extensions) includes taking locks.
On Thu, Oct 02, 2025 at 05:12:28PM +0900, Byungchul Park wrote:
> This document describes the concept and APIs of dept.
>
> Signed-off-by: Byungchul Park <byungchul(a)sk.com>
> ---
> Documentation/dependency/dept.txt | 735 ++++++++++++++++++++++++++
> Documentation/dependency/dept_api.txt | 117 ++++
> 2 files changed, 852 insertions(+)
> create mode 100644 Documentation/dependency/dept.txt
> create mode 100644 Documentation/dependency/dept_api.txt
What about writing dept docs in reST (like the rest of kernel documentation)?
---- >8 ----
diff --git a/Documentation/dependency/dept.txt b/Documentation/locking/dept.rst
similarity index 92%
rename from Documentation/dependency/dept.txt
rename to Documentation/locking/dept.rst
index 5dd358b96734e6..7b90a0d95f0876 100644
--- a/Documentation/dependency/dept.txt
+++ b/Documentation/locking/dept.rst
@@ -8,7 +8,7 @@ How lockdep works
Lockdep detects a deadlock by checking lock acquisition order. For
example, a graph to track acquisition order built by lockdep might look
-like:
+like::
A -> B -
\
@@ -16,12 +16,12 @@ like:
/
C -> D -
- where 'A -> B' means that acquisition A is prior to acquisition B
- with A still held.
+where 'A -> B' means that acquisition A is prior to acquisition B
+with A still held.
Lockdep keeps adding each new acquisition order into the graph in
runtime. For example, 'E -> C' will be added when the two locks have
-been acquired in the order, E and then C. The graph will look like:
+been acquired in the order, E and then C. The graph will look like::
A -> B -
\
@@ -32,10 +32,10 @@ been acquired in the order, E and then C. The graph will look like:
\ /
------------------
- where 'A -> B' means that acquisition A is prior to acquisition B
- with A still held.
+where 'A -> B' means that acquisition A is prior to acquisition B
+with A still held.
-This graph contains a subgraph that demonstrates a loop like:
+This graph contains a subgraph that demonstrates a loop like::
-> E -
/ \
@@ -67,6 +67,8 @@ mechanisms, lockdep doesn't work.
Can lockdep detect the following deadlock?
+::
+
context X context Y context Z
mutex_lock A
@@ -80,6 +82,8 @@ Can lockdep detect the following deadlock?
No. What about the following?
+::
+
context X context Y
mutex_lock A
@@ -101,7 +105,7 @@ What leads a deadlock
---------------------
A deadlock occurs when one or multi contexts are waiting for events that
-will never happen. For example:
+will never happen. For example::
context X context Y context Z
@@ -121,24 +125,24 @@ We call this *deadlock*.
If an event occurrence is a prerequisite to reaching another event, we
call it *dependency*. In this example:
- Event A occurrence is a prerequisite to reaching event C.
- Event C occurrence is a prerequisite to reaching event B.
- Event B occurrence is a prerequisite to reaching event A.
+ * Event A occurrence is a prerequisite to reaching event C.
+ * Event C occurrence is a prerequisite to reaching event B.
+ * Event B occurrence is a prerequisite to reaching event A.
In terms of dependency:
- Event C depends on event A.
- Event B depends on event C.
- Event A depends on event B.
+ * Event C depends on event A.
+ * Event B depends on event C.
+ * Event A depends on event B.
-Dependency graph reflecting this example will look like:
+Dependency graph reflecting this example will look like::
-> C -> A -> B -
/ \
\ /
----------------
- where 'A -> B' means that event A depends on event B.
+where 'A -> B' means that event A depends on event B.
A circular dependency exists. Such a circular dependency leads a
deadlock since no waiters can have desired events triggered.
@@ -152,7 +156,7 @@ Introduce DEPT
--------------
DEPT(DEPendency Tracker) tracks wait and event instead of lock
-acquisition order so as to recognize the following situation:
+acquisition order so as to recognize the following situation::
context X context Y context Z
@@ -165,18 +169,18 @@ acquisition order so as to recognize the following situation:
event A
and builds up a dependency graph in runtime that is similar to lockdep.
-The graph might look like:
+The graph might look like::
-> C -> A -> B -
/ \
\ /
----------------
- where 'A -> B' means that event A depends on event B.
+where 'A -> B' means that event A depends on event B.
DEPT keeps adding each new dependency into the graph in runtime. For
example, 'B -> D' will be added when event D occurrence is a
-prerequisite to reaching event B like:
+prerequisite to reaching event B like::
|
v
@@ -184,7 +188,7 @@ prerequisite to reaching event B like:
.
event B
-After the addition, the graph will look like:
+After the addition, the graph will look like::
-> D
/
@@ -209,6 +213,8 @@ How DEPT works
Let's take a look how DEPT works with the 1st example in the section
'Limitation of lockdep'.
+::
+
context X context Y context Z
mutex_lock A
@@ -220,7 +226,7 @@ Let's take a look how DEPT works with the 1st example in the section
mutex_unlock A
mutex_unlock A
-Adding comments to describe DEPT's view in terms of wait and event:
+Adding comments to describe DEPT's view in terms of wait and event::
context X context Y context Z
@@ -248,7 +254,7 @@ Adding comments to describe DEPT's view in terms of wait and event:
mutex_unlock A
/* event A */
-Adding more supplementary comments to describe DEPT's view in detail:
+Adding more supplementary comments to describe DEPT's view in detail::
context X context Y context Z
@@ -283,7 +289,7 @@ Adding more supplementary comments to describe DEPT's view in detail:
mutex_unlock A
/* event A that's been valid since 4 */
-Let's build up dependency graph with this example. Firstly, context X:
+Let's build up dependency graph with this example. Firstly, context X::
context X
@@ -292,7 +298,7 @@ Let's build up dependency graph with this example. Firstly, context X:
/* start to take into account event B's context */
/* 2 */
-There are no events to create dependency. Next, context Y:
+There are no events to create dependency. Next, context Y::
context Y
@@ -317,13 +323,13 @@ waits between 3 and the event, event B does not create dependency. For
event A, there is a wait, folio_lock B, between 1 and the event. Which
means event A cannot be triggered if event B does not wake up the wait.
Therefore, we can say event A depends on event B, say, 'A -> B'. The
-graph will look like after adding the dependency:
+graph will look like after adding the dependency::
A -> B
- where 'A -> B' means that event A depends on event B.
+where 'A -> B' means that event A depends on event B.
-Lastly, context Z:
+Lastly, context Z::
context Z
@@ -343,7 +349,7 @@ wait, mutex_lock A, between 2 and the event - remind 2 is at a very
start and before the wait in timeline. Which means event B cannot be
triggered if event A does not wake up the wait. Therefore, we can say
event B depends on event A, say, 'B -> A'. The graph will look like
-after adding the dependency:
+after adding the dependency::
-> A -> B -
/ \
@@ -367,6 +373,8 @@ Interpret DEPT report
The following is the example in the section 'How DEPT works'.
+::
+
context X context Y context Z
mutex_lock A
@@ -402,7 +410,7 @@ The following is the example in the section 'How DEPT works'.
We can Simplify this by replacing each waiting point with [W], each
point where its event's context starts with [S] and each event with [E].
-This example will look like after the replacement:
+This example will look like after the replacement::
context X context Y context Z
@@ -419,6 +427,8 @@ This example will look like after the replacement:
DEPT uses the symbols [W], [S] and [E] in its report as described above.
The following is an example reported by DEPT for a real problem.
+::
+
Link: https://lore.kernel.org/lkml/6383cde5-cf4b-facf-6e07-1378a485657d@I-love.SA…
Link: https://lore.kernel.org/lkml/1674268856-31807-1-git-send-email-byungchul.pa…
@@ -620,6 +630,8 @@ The following is an example reported by DEPT for a real problem.
Let's take a look at the summary that is the most important part.
+::
+
---------------------------------------------------
summary
---------------------------------------------------
@@ -639,7 +651,7 @@ Let's take a look at the summary that is the most important part.
[W]: the wait blocked
[E]: the event not reachable
-The summary shows the following scenario:
+The summary shows the following scenario::
context A context B context ?(unknown)
@@ -652,7 +664,7 @@ The summary shows the following scenario:
[E] unlock(&ni->ni_lock:0)
-Adding supplementary comments to describe DEPT's view in detail:
+Adding supplementary comments to describe DEPT's view in detail::
context A context B context ?(unknown)
@@ -677,7 +689,7 @@ Adding supplementary comments to describe DEPT's view in detail:
[E] unlock(&ni->ni_lock:0)
/* event that's been valid since 2 */
-Let's build up dependency graph with this report. Firstly, context A:
+Let's build up dependency graph with this report. Firstly, context A::
context A
@@ -697,13 +709,13 @@ wait, folio_lock(&f1), between 2 and the event. Which means
unlock(&ni->ni_lock:0) is not reachable if folio_unlock(&f1) does not
wake up the wait. Therefore, we can say unlock(&ni->ni_lock:0) depends
on folio_unlock(&f1), say, 'unlock(&ni->ni_lock:0) -> folio_unlock(&f1)'.
-The graph will look like after adding the dependency:
+The graph will look like after adding the dependency::
unlock(&ni->ni_lock:0) -> folio_unlock(&f1)
- where 'A -> B' means that event A depends on event B.
+where 'A -> B' means that event A depends on event B.
-Secondly, context B:
+Secondly, context B::
context B
@@ -719,14 +731,14 @@ very start and before the wait in timeline. Which means folio_unlock(&f1)
is not reachable if unlock(&ni->ni_lock:0) does not wake up the wait.
Therefore, we can say folio_unlock(&f1) depends on unlock(&ni->ni_lock:0),
say, 'folio_unlock(&f1) -> unlock(&ni->ni_lock:0)'. The graph will look
-like after adding the dependency:
+like after adding the dependency::
-> unlock(&ni->ni_lock:0) -> folio_unlock(&f1) -
/ \
\ /
------------------------------------------------
- where 'A -> B' means that event A depends on event B.
+where 'A -> B' means that event A depends on event B.
A new loop has been created. So DEPT can report it as a deadlock! Cool!
diff --git a/Documentation/dependency/dept_api.txt b/Documentation/locking/dept_api.rst
similarity index 97%
rename from Documentation/dependency/dept_api.txt
rename to Documentation/locking/dept_api.rst
index 8e0d5a118a460e..96c4d65f4a9a2d 100644
--- a/Documentation/dependency/dept_api.txt
+++ b/Documentation/locking/dept_api.rst
@@ -10,6 +10,8 @@ already applied into the existing synchronization primitives e.g.
waitqueue, swait, wait_for_completion(), dma fence and so on. The basic
APIs of SDT are:
+.. code-block:: c
+
/*
* After defining 'struct dept_map map', initialize the instance.
*/
@@ -27,6 +29,8 @@ APIs of SDT are:
The advanced APIs of SDT are:
+.. code-block:: c
+
/*
* After defining 'struct dept_map map', initialize the instance
* using an external key.
@@ -83,6 +87,8 @@ Do not use these APIs directly. These are the wrappers for typical
locks, that have been already applied into major locks internally e.g.
spin lock, mutex, rwlock and so on. The APIs of LDT are:
+.. code-block:: c
+
ldt_init(map, key, sub, name);
ldt_lock(map, sub_local, try, nest, ip);
ldt_rlock(map, sub_local, try, nest, ip, queued);
@@ -96,6 +102,8 @@ Raw APIs
--------
Do not use these APIs directly. The raw APIs of dept are:
+.. code-block:: c
+
dept_free_range(start, size);
dept_map_init(map, key, sub, name);
dept_map_reinit(map, key, sub, name);
diff --git a/Documentation/locking/index.rst b/Documentation/locking/index.rst
index 6a9ea96c8bcb70..7ec3dce7fee425 100644
--- a/Documentation/locking/index.rst
+++ b/Documentation/locking/index.rst
@@ -24,6 +24,8 @@ Locking
percpu-rw-semaphore
robust-futexes
robust-futex-ABI
+ dept
+ dept_api
.. only:: subproject and html
> +Can lockdep detect the following deadlock?
> +
> + context X context Y context Z
> +
> + mutex_lock A
> + folio_lock B
> + folio_lock B <- DEADLOCK
> + mutex_lock A <- DEADLOCK
> + folio_unlock B
> + folio_unlock B
> + mutex_unlock A
> + mutex_unlock A
> +
> +No. What about the following?
> +
> + context X context Y
> +
> + mutex_lock A
> + mutex_lock A <- DEADLOCK
> + wait_for_complete B <- DEADLOCK
> + complete B
> + mutex_unlock A
> + mutex_unlock A
Can you explain how DEPT detects deadlock on the second example above (like
the first one being described in "How DEPT works" section)?
Confused...
--
An old man doll... just what I always wanted! - Clara
On Thu, Oct 2, 2025 at 12:47 AM Maxime Ripard <mripard(a)redhat.com> wrote:
> 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?
For things like distro kernels (or in Android's case, the GKI),
there's a benefit for modules that can be loaded permanently (not
having a module_exit hook).
One doesn't have to bloat the base kernel image/memory usage for
everyone, while still not having to necessarily deal with
complications from module unloading issues.
thanks
-john
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
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 a new DT binding file for exynos-mfc
>
> Documentation/devicetree/bindings/media/samsung,exynos-mfc.yaml
> which describes the Exynos Multi‑Format Codec (MFC) IP. The schema
> covers the core node properties, required fields, and provides an
> example snippet.
>
> Signed-off-by: Himanshu Dewangan <h.dewangan(a)samsung.com>
> Signed-off-by: Nagaraju Siddineni <nagaraju.s(a)samsung.com>
> ---
> .../bindings/media/samsung,exynos-mfc.yaml | 77 +++++++++++++++++++
> MAINTAINERS | 10 +++
> 2 files changed, 87 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/samsung,exynos-mfc.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/samsung,exynos-mfc.yaml b/Documentation/devicetree/bindings/media/samsung,exynos-mfc.yaml
> new file mode 100644
> index 000000000000..fbed987fb9cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/samsung,exynos-mfc.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/samsung,exynos-mfc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung Exynos Multi Format Codec (MFC)
> +
> +maintainers:
> + - Nagaraju Siddineni <nagaraju.s(a)samsung.com>
> + - Himanshu Dewangan <h.dewangan(a)samsung.com>
> +
> +description:
> + Multi Format Codec (MFC) is the IP present in Samsung SoCs which
> + supports high resolution decoding and encoding functionalities.
> +
> +properties:
> + compatible:
> + oneOf:
> + - enum:
> + - samsung,exynos-mfc # Exynos920
> + - samsung,mfc_core0_mem # Reserved Memory
> + - samsung,mfc_core1_mem # Reserved Memory
NAK
These bindings duplicate existing ones, do not follow any existing
standards (wrong compatible) and are written completely different than
any other binding, which means you probably created big AI slop.
I'm not going to review this, it's quality is just beyond basic
standards. Sending something like this from Samsung means you do not
respect our time. You need to stay from scratch and read existing
documentation and existing bindings
I'll be organizing a mini meeting with Samsung on 13th Oct in Seoul,
feel free to join if you are around. I can explain then more why
wasting our time is making me very grumpy.
Best regards,
Krzysztof