On Thu, Jun 05, 2025 at 09:47:01PM +0530, Aneesh Kumar K.V wrote:
> Jason Gunthorpe writes:
>
> > On Thu, Jun 05, 2025 at 05:33:52PM +0530, Aneesh Kumar K.V wrote:
> >
> >> > +
> >> > +/* To ensure no host side MMIO
do
pci_request_regions_exclusive() once at the very start and it should
stay that way.
There is no reason to change it dynamically.
The only decision to make is if all vfio should switch to exclusive
mode or if we need to make it optional for userspace.
Jason
mware fails the MMIO unmap for S2. For
> AMD, will trigger some HW protection called "ASID fence" [1]. Not sure
> how ARM handles this?
This seems even more extreme, if the guest gets a bad DMA address into
the device then the entire device gets killed? No chance to debug it?
Jason
certainly your tests *should* be failing as special entries should
never ever be converted to struct page.
Jason
On Wed, Jun 04, 2025 at 04:54:43PM +0200, Simona Vetter wrote:
> On Tue, Jun 03, 2025 at 07:29:52PM -0300, Jason Gunthorpe wrote:
> > On Mon, May 26, 2025 at 10:15:17PM +0530, Ghimiray, Himal Prasad wrote:
> > >
> > >
> > > On 26-05-2025 20:36, Dan Carpent
On Wed, Jun 04, 2025 at 02:10:43PM +0530, Aneesh Kumar K.V wrote:
> Jason Gunthorpe writes:
>
> > On Tue, Jun 03, 2025 at 02:20:51PM +0800, Xu Yilun wrote:
> >> > Wouldn’t it be simpler to skip the reference count increment altogether
> >> > and just cal
#x27;ERR_PTR'
>
> Hi Dan,
>
> Thanks for pointing this out. I see there's a gap in how hmm_range_fault()
> adheres to its documented behavior. I believe the function should sanitize
> positive return values from walk_page_range() to ensure consistency.
>
> Jason can comment f
On Thu, May 29, 2025 at 04:32:13PM +1000, Alistair Popple wrote:
> It's no longer used so remove it.
>
> Signed-off-by: Alistair Popple
> ---
> mm/memremap.c | 27 ---
> 1 file changed, 27 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
toph Hellwig
Yay!
Reviewed-by: Jason Gunthorpe
Jason
le.h | 19 +--
> mm/Kconfig| 4 +-
> mm/debug_vm_pgtable.c | 59 +
> mm/hmm.c | 3 +-
> mm/madvise.c | 8 +--
> 25 files changed, 17 insertions(+), 318 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
-
> arch/powerpc/mm/book3s64/radix_pgtable.c | 5 ++---
> arch/powerpc/mm/pgtable.c| 2 +-
> 6 files changed, 10 insertions(+), 14 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
t;
> Signed-off-by: Alistair Popple
> ---
> mm/khugepaged.c | 2 --
> 1 file changed, 2 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
2 +-
> mm/mremap.c| 5 ++---
> mm/page_vma_mapped.c | 5 ++---
> mm/pagewalk.c | 8 +++-
> mm/pgtable-generic.c | 7 +++
> mm/userfaultfd.c | 4 ++--
> mm/vmscan.c| 3 ---
> 15 files changed, 40 insertions(+), 66 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
yway so can be removed.
>
> Signed-off-by: Alistair Popple
> ---
> include/linux/huge_mm.h | 3 +-
> mm/gup.c| 162 +
> mm/huge_memory.c| 40 +--
> 3 files changed, 5 insertions(+), 200 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
| 2 +-
> include/linux/pfn_t.h | 25 ++---
> mm/memory.c| 4 ++--
> 7 files changed, 11 insertions(+), 36 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
.c| 3 ---
> mm/memory.c | 20 ++--
> mm/vmscan.c | 2 +-
> 3 files changed, 3 insertions(+), 22 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
ike to see DAX pages?
I guess it makes sense from the perspective of not changing things,
but it seems like a comment should be left behind explaining that this
is just for legacy reasons until someone audits the callers.
Jason
2 +-
> mm/userfaultfd.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
Christoph Hellwig
> ---
> include/linux/pfn_t.h | 31 +++
> mm/memory.c | 2 --
> tools/testing/nvdimm/test/iomap.c | 4
> 3 files changed, 3 insertions(+), 34 deletions(-)
Reviewed-by: Jason Gunthorpe
Jason
n concern, there is also an IOMMU_DESTROY
> ioctl. User could just free the vdevice instance if no refcount, while VFIO
> is still in bound state. That seems not the correct free order.
Freeing the vdevice should automatically unbind it..
Jason
On Thu, May 29, 2025 at 01:34:43PM +0800, Xu Yilun wrote:
> This series has 3 sections:
I really think this is too big to try to progress, even in RFC
form.
> Patch 1 - 11 deal with the private MMIO mapping in KVM MMU via DMABUF.
> Leverage Jason & Vivek's latest VFIO dmab
ulated into the standard
DMABUF API in some way.
Jason
address when generating instructions to ensure GCE accesses the correct
DRAM address. CMDQ users can then call CMDQ helper APIs as usual.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/soc
no longer in use.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 49 ++
include/linux/soc/mediatek/mtk-cmdq.h | 35 --
2 files changed, 18 insertions(+), 66 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
b
Since all users have migrated to the new cmdq_pkt_jump* APIs without
shift_pa, the wrapper APIs cmdq_pkt_jump() and cmdq_pkt_jump_rel_temp()
can be removed.
Fixes: ade176534112 ("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
d
. gce_vm: For GCE hardware virtualization control
Currently, the first version of the mt8196 mailbox controller only
requires setting the VM-related registers to enable the permissions
of a host VM.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 12
1 file
Add GCE header define for GCE Thread Priority and GCE Event IDs
that used in the MT8196 dtsi.
Signed-off-by: Jason-JH Lin
---
arch/arm64/boot/dts/mediatek/mt8196-gce.h | 612 ++
1 file changed, 612 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8196-gce.h
cmdq_pkt_write_mask_pa() and
cmdq_pkt_write_mask_subsys().
The original cmdq_pkt_write() and cmdq_pkt_write_mask() will be removed
after all CMDQ users have migrated to the new APIs.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 41 +
include/linux/soc/mediatek
thread for the host VM.
2. VM_CPR_GSIZE
It is used to allocate the CPR SRAM size to each VM. Each VM has 4-bit
configuration, where setting bit 0-3 to configures the size of host VM.
This setting must be configured before the VM configuration to prevent
resource leakage.
Signed-off-by: Jason-JH
Since the mailbox driver data can be obtained using cmdq_get_mbox_priv()
and all CMDQ users have transitioned to cmdq_get_mbox_priv(),
cmdq_get_shift_pa() can be removed.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drive
meter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 8
include/linux/soc/mediatek/mtk-cmdq.h | 18 +++---
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
b/d
tform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 8
include/linux/mailbox/mtk-cmdq-mailbox.h | 18 ++
2 files changed, 26 insertions(+)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
b/drivers/mailbox/mtk-cmdq-mailbox.c
index a3
("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 6 ++
include/linux/soc/mediatek/mtk-cmdq.h | 9 +
2 files changed, 15 insertions(+)
diff --git a/drivers/soc/mediatek/mtk-cmdq-h
the cmdq_mbox_priv of
cmdq_pkt and add the mminfra_offset to the DRAM address in GCE
instructions.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 6 --
include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/driv
Add cmdq_get_mbox_priv() in cmdq_pkt_create() to ensure getting private
data before generating GCE instructions.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 1 +
1 file changed, 1
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
.../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 14 +++-
.../platform/mediatek/mdp3/mtk-mdp3-comp.h| 70 ++-
2 files
pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 --
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h | 1 -
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git
("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 43
include/linux/mailbox/mtk-cmdq-mailbox.h | 10 ++
2 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/drivers/mailbo
cmdq_pkt_write_mask_pa()
to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
index
-jason-jh@mediatek.com/
Change in v4:
1. Remove dt-binding header and add a gce header in dts folder.
2. Remove dot in sign-off name.
3. Change addr type from u32 to dma_addr_t for cmdq_reg_shift_addr() and
cmdq_reg_revert_addr().
Change in v3:
1. Merge 2 dt-bindings pathes together and add
physical address
is the only option to achieve the same functionality.
This commit adds a pa_base parsing flow to the cmdq_client_reg structure
to handle hardware without subsys ID support.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +--
include/linux/soc
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-mmsys.c | 12 +---
drivers/soc/mediatek/mtk-mutex.c | 8 ++--
2 files changed, 15 insertions(+), 5
_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
index 555d35ad553e..7575ec376
s the PCI memory enable bit, doesn't it?
Jason
() callback,indicating that the GCE IRQ has been triggered.
Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_crtc.c | 30
drivers/gpu/drm/mediatek/mtk_crtc.h | 1 +
d
tell the already existing secure vIOMMU
that it is allowed to translate for a specific vPCI function.
Jason
> *TDX tdi free
> 48.
> *enable mmio
> 49.*cb dmabuf recover
> 50.workable shared dev
This is a nice chart, it would be good to see a comparable chart for
AMD and ARM
Jason
ce
destruction trigger vdevice destruction
>-> tsm_tdi_unbind()
> -> tdi stop
> -> callback to VFIO, dmabuf_move_notify(revoke)
> -> KVM unmap MMIO
> -> tdi metadata remove
This omits the viommu. It won't get destroyed until the iommufd
closes, so iommufd will be holding the kvm and it will do the final
put.
Jason
doesn't know about this.
>
> I have to interpret this as VFIO firstly hand over device CC features
> and MMIO resources to IOMMUFD, so VFIO never cares about them.
>
> [1] https://lore.kernel.org/all/20250218111017.491719-15-...@amd.com/
There is also the PCI layer involved here and maybe PCI should be
participating in managing some of this. Like it makes a bit of sense
that PCI would block the FLR on platforms that require this?
Jason
ce things, it can destroy all these IOMMUFD objects and talk to
> VFIO too, I've tried, so far it is looking easier to manage. Thanks,
Yes, qemu should be sequencing this. The kernel only needs to enforce
any rules required to keep the system from crashing.
Jason
Since the mailbox driver data can be obtained using cmdq_get_mbox_priv()
and all CMDQ users have transitioned to cmdq_get_mbox_priv(),
cmdq_get_shift_pa() can be removed.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drive
_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
index e5ccf673e152..aa245bf7e
physical address
is the only option to achieve the same functionality.
This commit adds a pa_base parsing flow to the cmdq_client_reg structure
to handle hardware without subsys ID support.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +--
include/linux/soc
thread for the host VM.
2. VM_CPR_GSIZE
It is used to allocate the CPR SRAM size to each VM. Each VM has 4-bit
configuration, where setting bit 0-3 to configures the size of host VM.
This setting must be configured before the VM configuration to prevent
resource leakage.
Signed-off-by: Jason-JH
cmdq_pkt_write_mask_pa() and
cmdq_pkt_write_mask_subsys().
The original cmdq_pkt_write() and cmdq_pkt_write_mask() will be removed
after all CMDQ users have migrated to the new APIs.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 41 +
include/linux/soc/mediatek
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-mmsys.c | 12 +---
drivers/soc/mediatek/mtk-mutex.c | 8 ++--
2 files changed, 15 insertions(+), 5
address when generating instructions to ensure GCE accesses the correct
DRAM address. CMDQ users can then call CMDQ helper APIs as usual.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/soc
("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
include/linux/soc/mediatek/mtk-cmdq.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/include/linux/soc/mediatek/mtk-cmdq.h
b/include/linux/soc/mediatek/mtk-cmdq.h
index 0c
the cmdq_mbox_priv of
cmdq_pkt and add the mminfra_offset to the DRAM address in GCE
instructions.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 6 --
include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/driv
cmdq_pkt_write_mask_pa()
to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
index
no longer in use.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 49 ++
include/linux/soc/mediatek/mtk-cmdq.h | 35 --
2 files changed, 18 insertions(+), 66 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
b
tform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 8
include/linux/mailbox/mtk-cmdq-mailbox.h | 18 ++
2 files changed, 26 insertions(+)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
b/drivers/mailbox/mtk-cmdq-mailbox.c
index a3
Add cmdq_get_mbox_priv() in cmdq_pkt_create() to ensure getting private
data before generating GCE instructions.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 1 +
1 file changed, 1
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
.../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 14 +++-
.../platform/mediatek/mdp3/mtk-mdp3-comp.h| 70 ++-
2 files
Since all users have migrated to the new cmdq_pkt_jump* APIs without
shift_pa, the wrapper APIs cmdq_pkt_jump() and cmdq_pkt_jump_rel_temp()
can be removed.
Fixes: ade176534112 ("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
include
meter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 8
include/linux/soc/mediatek/mtk-cmdq.h | 20
2 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 43
include/linux/mailbox/mtk-cmdq-mailbox.h | 10 ++
2 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/drivers/mailbo
() APIs to
replace the cmdq_pkt_write().
[1] mailbox: mtk-cmdq: Refine GCE_GCTL_VALUE setting
-
https://patchwork.kernel.org/project/linux-mediatek/patch/20250421035650.441383-1-jason-jh@mediatek.com/
Change in v4:
1. Remove dt-binding header and add a gce header in dts folder.
2. Remove dot in
Add GCE header define for GCE Thread Priority and GCE Event IDs
that used in the MT8196 dtsi.
Signed-off-by: Jason-JH Lin
---
arch/arm64/boot/dts/mediatek/mt8196-gce.h | 612 ++
1 file changed, 612 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8196-gce.h
. gce_vm: For GCE hardware virtualization control
Currently, the first version of the mt8196 mailbox controller only
requires setting the VM-related registers to enable the permissions
of a host VM.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 12
1 file
pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 --
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h | 1 -
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git
Table cleanup for the TDI
> 4. TDI ownership reclaim and metadata free
So your issue is you need to shoot down the dmabuf during vPCI device
destruction?
VFIO also needs to shoot down the MMIO during things like FLR
I don't think moving to iommufd really fixes it, it sounds like you
need more coordination between the two parts??
Jason
just for flash. Some
internal improvement kernel side to allow streaming from large
user-space RPC buffers instead of a single alloc and copy would be
sufficient..
Jason
gt; + * FWCTL info.uctx_caps: FWCTL_XE_PCODE_LATEBINDING
> + * FWCTL rpc.scope: FWCTL_RPC_CONFIGURATION
> + *
> + * Command 0x5C - LATE_BINDING
> + * Param10x0 - GET_CAPABILITY_STATUS
> + * Param20
> + * Data in None
> + * Data out:
> + *
> + * - Bit0: ate binding for V1 Fan Tables is supported.
"ate" is a typo?
This seems fine, though very simple in what it can do. Do you imagine
more commands down the road?
Jason
On Tue, Apr 29, 2025 at 06:58:32AM -0700, Rob Clark wrote:
> On Tue, Apr 29, 2025 at 5:28 AM Jason Gunthorpe wrote:
> >
> > On Mon, Apr 28, 2025 at 01:54:10PM -0700, Rob Clark wrote:
> > > From: Rob Clark
> > >
> > > In situations where mapp
should have the WARN_ON?
eg iommufd already has a WARN_ON around iommu_unmap failures so having
one in the ARM page table is a double WARN.
Don't really like using a quirk to change the API contract.
Jason
thread for the host VM.
2. VM_CPR_GSIZE
It is used to allocate the CPR SRAM size to each VM. Each VM has 4-bit
configuration, where setting bit 0-3 to configures the size of host VM.
This setting must be configured before the VM configuration to prevent
resource leakage.
Signed-off-by: Jason-JH
. gce_vm: For GCE hardware virtualization control
Currently, the first version of the mt8196 mailbox controller only
requires setting the VM-related registers to enable the permissions
of a host VM.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 12
1 file
Add cmdq_get_mbox_priv() in cmdq_pkt_create() to ensure getting private
data before generating GCE instructions.
Fixes: 0858fde496f8 ("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 1 +
1 file changed, 1
meter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 8
include/linux/soc/mediatek/mtk-cmdq.h | 20
2 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
no longer in use.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 49 ++
include/linux/soc/mediatek/mtk-cmdq.h | 35 --
2 files changed, 18 insertions(+), 66 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c
b
_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
index e5ccf673e152..aa245bf7e
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-mmsys.c | 12 +---
drivers/soc/mediatek/mtk-mutex.c | 8 ++--
2 files changed, 15 insertions(+), 5
("mailbox: cmdq: variablize address shift in platform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 43
include/linux/mailbox/mtk-cmdq-mailbox.h | 10 ++
2 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/drivers/mailbo
the cmdq_mbox_priv of
cmdq_pkt and add the mminfra_offset to the DRAM address in GCE
instructions.
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 6 --
include/linux/mailbox/mtk-cmdq-mailbox.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/driv
pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 2 +-
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 --
drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h | 1 -
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git
address when generating instructions to ensure GCE accesses the correct
DRAM address. CMDQ users can then call CMDQ helper APIs as usual.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/soc
Add GCE header define for GCE Thread Priority and GCE Event IDs
that used in the MT8196 dtsi.
Signed-off-by: Jason-JH Lin
---
arch/arm64/boot/dts/mediatek/mt8196-gce.h | 612 ++
1 file changed, 612 insertions(+)
create mode 100644 arch/arm64/boot/dts/mediatek/mt8196-gce.h
Since all users have migrated to the new cmdq_pkt_jump* APIs without
shift_pa, the wrapper APIs cmdq_pkt_jump() and cmdq_pkt_jump_rel_temp()
can be removed.
Fixes: ade176534112 ("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
include
cmdq_pkt_write_mask_pa() and
cmdq_pkt_write_mask_subsys().
The original cmdq_pkt_write() and cmdq_pkt_write_mask() will be removed
after all CMDQ users have migrated to the new APIs.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 41 +
include/linux/soc/mediatek
("soc: mediatek: cmdq: Add parameter shift_pa to
cmdq_pkt_jump()")
Signed-off-by: Jason-JH Lin
---
include/linux/soc/mediatek/mtk-cmdq.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/include/linux/soc/mediatek/mtk-cmdq.h
b/include/linux/soc/mediatek/mtk-cmdq.h
index 0c
cmdq_pkt_write_mask_pa()
to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 24 ++--
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
index
subsys ID is invalid, the flow will call cmdq_pkt_write_pa() and
cmdq_pkt_write_mask_pa() to achieve the same functionality.
Signed-off-by: Jason-JH Lin
---
.../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 14 +++-
.../platform/mediatek/mdp3/mtk-mdp3-comp.h| 70 ++-
2 files
physical address
is the only option to achieve the same functionality.
This commit adds a pa_base parsing flow to the cmdq_client_reg structure
to handle hardware without subsys ID support.
Signed-off-by: Jason-JH Lin
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 15 +--
include/linux/soc
/linux-mediatek/patch/20250421035650.441383-1-jason-jh@mediatek.com/
Change in v4:
1. Remove dt-binding header and add a gce header in dts folder.
2. Remove dot in sign-off name.
3. Change addr type from u32 to dma_addr_t for cmdq_reg_shift_addr() and
cmdq_reg_revert_addr().
Change in v3:
1
tform")
Signed-off-by: Jason-JH Lin
---
drivers/mailbox/mtk-cmdq-mailbox.c | 6 +++---
include/linux/mailbox/mtk-cmdq-mailbox.h | 18 --
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
b/drivers/mailbox/mtk-cmdq-mailb
ot any worse than that.
That isn't fully true.. UIO isn't fitting into the security model by
allowing DMA capable devices to be exposed without checking for
CAP_SYS_RAW_IO first.
Jason
On Tue, Apr 08, 2025 at 09:42:36PM +0300, Jani Nikula wrote:
> On Tue, 08 Apr 2025, Jason Gunthorpe wrote:
> > On Tue, Apr 08, 2025 at 11:27:58AM +0300, Jani Nikula wrote:
> >> On Mon, 07 Apr 2025, Jason Gunthorpe wrote:
> >> > On Mon, Apr 07, 2025 at 10:17
On Tue, Apr 08, 2025 at 11:27:58AM +0300, Jani Nikula wrote:
> On Mon, 07 Apr 2025, Jason Gunthorpe wrote:
> > On Mon, Apr 07, 2025 at 10:17:40AM +0300, Jani Nikula wrote:
> >
> >> Even with Jason's idea [1], you *still* have to start small and opt-in
> >>
y.
> And this is the primary reason subsystems and drivers hack up stuff in
> their little corners of the kernel instead of sticking their necks out
> and trying to generalize anything.
Seems to me like this is the usual case of generalizing being actually
hard, you almost always have to actually do more work to succeed.
Jason
1 - 100 of 2326 matches
Mail list logo