[PATCH v4 2/3] dma-buf: heaps: Parameterize heap name in __add_cma_heap()

2025-06-10 Thread Jared Kangas
Prepare for the introduction of a fixed-name CMA heap by replacing the unused void pointer parameter in __add_cma_heap() with the heap name. Reviewed-by: Maxime Ripard Signed-off-by: Jared Kangas --- drivers/dma-buf/heaps/cma_heap.c | 18 +++--- 1 file changed, 11 insertions(+), 7 d

RE: [PATCH v4 5/5] drm/i915/dp: Disable the AUX DPCD probe quirk if it's not required

2025-06-10 Thread Kahola, Mika
> -Original Message- > From: Intel-gfx On Behalf Of Imre > Deak > Sent: Monday, 9 June 2025 15.56 > To: intel-...@lists.freedesktop.org; intel...@lists.freedesktop.org; > dri-devel@lists.freedesktop.org > Cc: Ville Syrjälä ; Jani Nikula > > Subject: [PATCH v

[PATCH v4 3/3] dma-buf: heaps: Give default CMA heap a fixed name

2025-06-10 Thread Jared Kangas
The CMA heap's name in devtmpfs can vary depending on how the heap is defined. Its name defaults to "reserved", but if a CMA area is defined in the devicetree, the heap takes on the devicetree node's name, such as "default-pool" or "linux,cma". To simplify naming, unconditionally name it "default_c

[PATCH v4 1/3] Documentation: dma-buf: heaps: Fix code markup

2025-06-10 Thread Jared Kangas
Code snippets should be wrapped in double backticks to follow reStructuredText semantics; the use of single backticks uses the :title-reference: role by default, which isn't quite what we want. Add double backticks to code snippets to fix this. Reviewed-by: Maxime Ripard Signed-off-by: Jared Kang

[PATCH v4 0/3] dma-buf: heaps: Use constant name for CMA heap

2025-06-10 Thread Jared Kangas
Hi all, This patch series is based on a previous discussion around CMA heap naming. [1] The heap's name depends on the device name, which is generally "reserved", "linux,cma", or "default-pool", but could be any arbitrary name given to the default CMA area in the devicetree. For a consistent users

Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-10 Thread Christian König
; linux-me...@vger.kernel.org; dri- >> de...@lists.freedesktop.org; linaro-mm-...@lists.linaro.org; linux- >> ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- >> m...@kvack.org; wangbintian(BintianWang) ; >> yipengxiang ; liulu 00013167 >> ; hanfeng 00012985

[PATCH v4 1/6] drm/syncobj: Remove unhelpful helper

2025-06-10 Thread Tvrtko Ursulin
Helper which fails to consolidate the code and instead just forks into two copies of the code based on a boolean parameter is not very helpful or readable. Lets just remove it and proof in the pudding is the net smaller code. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra Canal --- v2: * Assi

[PATCH v4 4/6] drm/syncobj: Avoid temporary allocation in drm_syncobj_timeline_signal_ioctl

2025-06-10 Thread Tvrtko Ursulin
We can avoid one of the two temporary allocations if we read the userspace supplied timeline points as we go along. The only new complication is to unwind unused fence chains on the error path, but even that code was already present in the function. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maí

[PATCH v4 3/6] drm/syncobj: Avoid one temporary allocation in drm_syncobj_array_find

2025-06-10 Thread Tvrtko Ursulin
Drm_syncobj_array_find() helper is used from many userspace ioctl entry points with the task of looking up userspace handles to internal objects. We can easily avoid one temporary allocation by making it read the handles as it is looking them up. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra

[PATCH v4 5/6] drm/syncobj: Add a fast path to drm_syncobj_array_wait_timeout

2025-06-10 Thread Tvrtko Ursulin
Running the Cyberpunk 2077 benchmark we can observe that waiting on DRM sycobjs is relatively hot, but the 96% of the calls are for a single object. (~4% for two points, and never more than three points. While a more trivial workload like vkmark under Plasma is even more skewed to single point wait

[PATCH v4 6/6] drm/syncobj: Add a fast path to drm_syncobj_array_find

2025-06-10 Thread Tvrtko Ursulin
Running the Cyberpunk 2077 benchmark we can observe that the lookup helper is relatively hot, but the 97% of the calls are for a single object. (~3% for two points, and never more than three points. While a more trivial workload like vkmark under Plasma is even more skewed to single point lookups.)

[PATCH v4 0/6] A few drm_syncobj optimisations

2025-06-10 Thread Tvrtko Ursulin
A small set of drm_syncobj optimisations which should make things a tiny bit more efficient on the CPU side of things. Improvement seems to be around 1.5%* more FPS if observed with "vkgears -present-mailbox" on a Steam Deck Plasma desktop, but I am reluctant to make a definitive claim on the numb

[PATCH v4 2/6] drm/syncobj: Do not allocate an array to store zeros when waiting

2025-06-10 Thread Tvrtko Ursulin
When waiting on syncobjs the current code allocates a temporary array only to fill it up with all zeros. We can avoid that by relying on the allocated entry array already being zero allocated. For the timeline mode we can fetch the timeline point values as we populate the entries array so also do

Re: [PATCH v4] drm: add overview diagram for drm stack

2025-06-09 Thread Abdulrasaq Lawani
Hi, Should I go ahead make the diagram more detailed or just add the links in 'Slides and articles' & 'Conference talks' to the existing diagram? Best regards, On Wed, Jun 4, 2025 at 10:37 AM Simona Vetter wrote: > > On Mon, Jun 02, 2025 at 08:28:30AM +0700, Bagas Sanjaya wrote: > > On Sun, Ju

Re: [PATCH v4 7/8] drm/xe/userptr: replace xe_hmm with gpusvm

2025-06-09 Thread Matthew Brost
On Mon, May 12, 2025 at 04:06:45PM +0100, Matthew Auld wrote: > Goal here is cut over to gpusvm and remove xe_hmm, relying instead on > common code. The core facilities we need are get_pages(), unmap_pages() > and free_pages() for a given useptr range, plus a vm level notifier > lock, which is now

Re: [PATCH v4 6/8] drm/xe/vm: split userptr bits into separate file

2025-06-09 Thread Matthew Brost
On Mon, May 12, 2025 at 04:06:44PM +0100, Matthew Auld wrote: > This will simplify compiling out the bits that depend on DRM_GPUSVM in a > later patch. Without this we end up littering the code with ifdef > checks, plus it becomes hard to be sure that something won't blow at > runtime due to someth

Re: [PATCH v4 3/8] drm/bridge: ti-sn65dsi86: use the auxiliary device

2025-06-09 Thread Doug Anderson
Hi, On Mon, Jun 9, 2025 at 6:02 AM Jerome Brunet wrote: > > On Tue 25 Feb 2025 at 08:04, Doug Anderson wrote: > > > Hi, > > > > On Tue, Feb 18, 2025 at 11:30 AM Jerome Brunet wrote: > >> > >> The auxiliary device creation of this driver is simple enough to > >> use the available auxiliary devic

[PATCH v4 4/5] drm/dp: Add an EDID quirk for the DPCD register access probe

2025-06-09 Thread Imre Deak
Reading DPCD registers has side-effects and some of these can cause a problem for instance during link training. Based on this it's better to avoid the probing quirk done before each DPCD register read, limiting this to the monitor which requires it. Add an EDID quirk for this. Leave the quirk enab

Re: [PATCH v4 3/8] drm/bridge: ti-sn65dsi86: use the auxiliary device

2025-06-09 Thread Jerome Brunet
On Tue 25 Feb 2025 at 08:04, Doug Anderson wrote: > Hi, > > On Tue, Feb 18, 2025 at 11:30 AM Jerome Brunet wrote: >> >> The auxiliary device creation of this driver is simple enough to >> use the available auxiliary device creation helper. >> >> Use it and remove some boilerplate code. >> >> Sig

[PATCH v4 5/5] drm/i915/dp: Disable the AUX DPCD probe quirk if it's not required

2025-06-09 Thread Imre Deak
Reading DPCD registers has side-effects and some of these can cause a problem for instance during link training. Based on this it's better to avoid the probing quirk done before each DPCD register read, limiting this to the monitor which requires it. The only known problematic monitor is an externa

RE: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-09 Thread wangtao
inaro-mm-...@lists.linaro.org; linux- > ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- > m...@kvack.org; wangbintian(BintianWang) ; > yipengxiang ; liulu 00013167 > ; hanfeng 00012985 > Subject: Re: [PATCH v4 0/4] Implement dmabuf direct I/O via > copy_file_range &g

RE: [PATCH v4 0/1] drm: rcar-du: rzg2l_mipi_dsi: add MIPI DSI command support

2025-06-08 Thread Biju Das
> Subject: [PATCH v4 0/1] drm: rcar-du: rzg2l_mipi_dsi: add MIPI DSI command > support > > From: Hugo Villeneuve > > Hello, > this patch series add support for sending MIPI DSI command packets to the > Renesas RZ/G2L MIPI DSI > driver. > > Tested on a custom

Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-06 Thread Christian König
; baolin.w...@linux.alibaba.com; linux-me...@vger.kernel.org; dri- >> de...@lists.freedesktop.org; linaro-mm-...@lists.linaro.org; linux- >> ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- >> m...@kvack.org; wangbintian(BintianWang) ; >> yipengxiang ; liulu 00013167 >>

RE: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-06 Thread wangtao
inaro-mm-...@lists.linaro.org; linux- > ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- > m...@kvack.org; wangbintian(BintianWang) ; > yipengxiang ; liulu 00013167 > ; hanfeng 00012985 > Subject: Re: [PATCH v4 0/4] Implement dmabuf direct I/O via > copy_file_range &g

RE: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-06 Thread wangtao
inaro-mm-...@lists.linaro.org; linux- > ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- > m...@kvack.org; wangbintian(BintianWang) ; > yipengxiang ; liulu 00013167 > ; hanfeng 00012985 > Subject: Re: [PATCH v4 0/4] Implement dmabuf direct I/O via > copy_file_range &g

Re: [PATCH v4 2/4] drm/panel: Add refcount support

2025-06-06 Thread Jani Nikula
On Fri, 06 Jun 2025, Maxime Ripard wrote: > Thanks for working on that. Your two patches (the one you sent here, and > the one in the other subthread) look good to me. So if that works, it > looks like we have a way forward. Coincidentally, I just posted the first non-draft patches [1]. Thanks fo

Re: [PATCH v4 2/4] drm/panel: Add refcount support

2025-06-06 Thread Maxime Ripard
On Tue, May 27, 2025 at 10:40:49PM +0300, Jani Nikula wrote: > On Tue, 27 May 2025, Maxime Ripard wrote: > > On Tue, May 20, 2025 at 01:09:47PM +0300, Jani Nikula wrote: > >> > >> Maxime - > >> > >> I'm cutting a lot of context here. Not because I don't think it deserves > >> an answer, but beca

Re: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host transfers

2025-06-05 Thread Hugo Villeneuve
On 6/5/25 04:18, Biju Das wrote: Hi Hugo, Thanks for the patch. -Original Message- From: dri-devel On Behalf Of Hugo Villeneuve Sent: 04 June 2025 15:53 Subject: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host transfers From: Hugo Villeneuve Add support for sending

Re: [PATCH v4 1/5] dt-bindings: arm: qcom: Add Lenovo TB16 support

2025-06-05 Thread Rob Herring (Arm)
On Sat, 24 May 2025 13:48:36 +0200, Jens Glathe wrote: > Document the x1p-42-100/x1-26-100 variants of the Thinkbook 16 G7 QOY. > > [1]: > https://psref.lenovo.com/syspool/Sys/PDF/ThinkBook/ThinkBook_16_G7_QOY/ThinkBook_16_G7_QOY_Spec.pdf > > Signed-off-by: Jens Glathe > --- > Documentation/

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-05 Thread Joel Fernandes
On 6/5/2025 12:21 PM, Danilo Krummrich wrote: > On Thu, Jun 05, 2025 at 12:09:46PM -0400, Joel Fernandes wrote: +impl PmuLookupTable { +fn new(pdev: &pci::Device, data: &[u8]) -> Result { +if data.len() < 4 { +return Err(EINVAL); +} +

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-05 Thread Danilo Krummrich
On Thu, Jun 05, 2025 at 12:09:46PM -0400, Joel Fernandes wrote: > >> +impl PmuLookupTable { > >> +fn new(pdev: &pci::Device, data: &[u8]) -> Result { > >> +if data.len() < 4 { > >> +return Err(EINVAL); > >> +} > >> + > >> +let header_len = data[1] as usize; >

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-05 Thread Joel Fernandes
On 6/3/2025 5:15 PM, Lyude Paul wrote: > On Tue, 2025-05-27 at 16:38 -0400, Joel Fernandes wrote: >> Hello, >> I split this particular patch into 3 patches: >> >> gpu: nova-core: vbios: Add support for FWSEC ucode extraction >> gpu: nova-core: vbios: Add support to look up PMU table in FWSEC >>

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-05 Thread Joel Fernandes
Hi Lyude, >> +bios_image! { >> +PciAt PciAtBiosImage, // PCI-AT compatible BIOS image >> +Efi EfiBiosImage, // EFI (Extensible Firmware Interface) >> +Nbsi NbsiBiosImage, // NBSI (Nvidia Bios System Interface) >> +FwSecPartial FwSecBiosPartial, // FWSEC (Firmware Securi

RE: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host transfers

2025-06-05 Thread Biju Das
sktop.org; linux-renesas-...@vger.kernel.org; > linux-ker...@vger.kernel.org; > Chris Brandt > Subject: Re: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host > transfers > > On 6/5/25 04:18, Biju Das wrote: > > Hi Hugo, > > > > Thanks for the patch. > &g

Re: [PATCH v4 17/20] gpu: nova-core: compute layout of the FRTS region

2025-06-05 Thread Alexandre Courbot
On Wed Jun 4, 2025 at 7:23 PM JST, Danilo Krummrich wrote: > On Wed, May 21, 2025 at 03:45:12PM +0900, Alexandre Courbot wrote: >> +impl Chipset { >> +/// Returns the HAL corresponding to this chipset. >> +pub(super) fn get_fb_fal(self) -> &'static dyn FbHal { > > Please don't use the 'get'

Re: [PATCH v4 17/20] gpu: nova-core: compute layout of the FRTS region

2025-06-05 Thread Alexandre Courbot
On Wed Jun 4, 2025 at 7:24 PM JST, Danilo Krummrich wrote: > On Wed, Jun 04, 2025 at 01:18:37PM +0900, Alexandre Courbot wrote: >> On Wed Jun 4, 2025 at 6:14 AM JST, Lyude Paul wrote: >> > On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote: >> >> +const NV_PRAMIN_SIZE: u64 =

RE: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host transfers

2025-06-05 Thread Chris Brandt
...@gmail.com; sim...@ffwll.ch Cc: dri-devel@lists.freedesktop.org; linux-renesas-...@vger.kernel.org; linux-ker...@vger.kernel.org; h...@hugovil.com; Chris Brandt ; Hugo Villeneuve Subject: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host transfers From: Hugo Villeneuve Add support for

RE: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host transfers

2025-06-05 Thread Biju Das
Hi Hugo, Thanks for the patch. > -Original Message- > From: dri-devel On Behalf Of Hugo > Villeneuve > Sent: 04 June 2025 15:53 > Subject: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host transfers > > From: Hugo Villeneuve > > Add support f

Re: [PATCH v4] drm: add overview diagram for drm stack

2025-06-04 Thread Bagas Sanjaya
On Wed, Jun 04, 2025 at 04:37:27PM +0200, Simona Vetter wrote: > On Mon, Jun 02, 2025 at 08:28:30AM +0700, Bagas Sanjaya wrote: > > On Sun, Jun 01, 2025 at 06:18:47PM -0400, Abdulrasaq Lawani wrote: > > > Add an overview diagram of Linux DRM architecture for > > > graphics and compute to introducti

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-04 Thread Joel Fernandes
On 6/2/2025 9:33 AM, Danilo Krummrich wrote: >> +/// Try to find NPDE in the data, the NPDE is right after the PCIR. >> +fn find_in_data( >> +pdev: &pci::Device, >> +data: &[u8], >> +rom_header: &PciRomHeader, >> +pcir: &PcirStruct, >> +) -> Option { >

[PATCH v4 0/1] drm: rcar-du: rzg2l_mipi_dsi: add MIPI DSI command support

2025-06-04 Thread Hugo Villeneuve
From: Hugo Villeneuve Hello, this patch series add support for sending MIPI DSI command packets to the Renesas RZ/G2L MIPI DSI driver. Tested on a custom board with a SolidRun RZ/G2L SOM, with two different LCD panels using the jd9365da and st7703 drivers. Tested short and long writes. Tested

[PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host transfers

2025-06-04 Thread Hugo Villeneuve
From: Hugo Villeneuve Add support for sending MIPI DSI command packets from the host to a peripheral. This is required for panels that need configuration before they accept video data. Also for long reads to work properly, set DCS maximum return packet size to the value of the DMA buffer size.

Re: [PATCH v4] drm: add overview diagram for drm stack

2025-06-04 Thread Simona Vetter
On Mon, Jun 02, 2025 at 08:28:30AM +0700, Bagas Sanjaya wrote: > On Sun, Jun 01, 2025 at 06:18:47PM -0400, Abdulrasaq Lawani wrote: > > Add an overview diagram of Linux DRM architecture for > > graphics and compute to introduction.rst > > > > Signed-off-by: Abdulrasaq Lawani > > --- > > ... > > d

Re: [PATCH v4 19/20] gpu: nova-core: extract FWSEC from BIOS and patch it to run FWSEC-FRTS

2025-06-04 Thread Danilo Krummrich
On Wed, May 21, 2025 at 03:45:14PM +0900, Alexandre Courbot wrote: > +impl FirmwareDmaObject { > +/// Patch the Fwsec firmware image in `fw` to run the command `cmd`. > +fn patch_command(&mut self, v3_desc: &FalconUCodeDescV3, cmd: > FwsecCommand) -> Result<()> { Same comment as on the pr

Re: [PATCH v4 18/20] gpu: nova-core: add types for patching firmware binaries

2025-06-04 Thread Danilo Krummrich
On Wed, May 21, 2025 at 03:45:13PM +0900, Alexandre Courbot wrote: > +/// A [`DmaObject`] containing a specific microcode ready to be loaded into > a falcon. > +/// > +/// This is module-local and meant for sub-modules to use internally. > +struct FirmwareDmaObject(DmaObject, PhantomData); > + > +

Re: [PATCH v4 17/20] gpu: nova-core: compute layout of the FRTS region

2025-06-04 Thread Danilo Krummrich
On Wed, Jun 04, 2025 at 01:18:37PM +0900, Alexandre Courbot wrote: > On Wed Jun 4, 2025 at 6:14 AM JST, Lyude Paul wrote: > > On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote: > >> +const NV_PRAMIN_SIZE: u64 = 0x10; > > > > Don't leave those size constants out, they're

Re: [PATCH v4 17/20] gpu: nova-core: compute layout of the FRTS region

2025-06-04 Thread Danilo Krummrich
On Wed, May 21, 2025 at 03:45:12PM +0900, Alexandre Courbot wrote: > +impl Chipset { > +/// Returns the HAL corresponding to this chipset. > +pub(super) fn get_fb_fal(self) -> &'static dyn FbHal { Please don't use the 'get' prefix here. Also, I feel like it's a bit random to have this on

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-04 Thread Miguel Ojeda
On Tue, Jun 3, 2025 at 11:05 PM Lyude Paul wrote: > > Not sure this makes sense - debug_assertions is supposed to be about > assertions, we probably shouldn't try to use it for other things (especially > since we've already got dev_dbg! here) Yeah, we added it in `pr_debug!`, but I think we shoul

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-04 Thread Benno Lossin
On Wed Jun 4, 2025 at 1:54 AM CEST, Alexandre Courbot wrote: > On Wed Jun 4, 2025 at 7:53 AM JST, Benno Lossin wrote: >> On Mon Jun 2, 2025 at 11:39 AM CEST, Danilo Krummrich wrote: >>> On Thu, May 29, 2025 at 09:27:33AM +0200, Benno Lossin wrote: That's also fair, but we lose the constness of

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-04 Thread Benno Lossin
On Wed Jun 4, 2025 at 2:05 AM CEST, Alexandre Courbot wrote: > On Wed Jun 4, 2025 at 8:02 AM JST, Benno Lossin wrote: >> On Mon Jun 2, 2025 at 3:09 PM CEST, Alexandre Courbot wrote: >>> On Thu May 29, 2025 at 4:27 PM JST, Benno Lossin wrote: On Thu May 29, 2025 at 3:18 AM CEST, Alexandre Courb

Re: [PATCH v4 17/20] gpu: nova-core: compute layout of the FRTS region

2025-06-03 Thread Alexandre Courbot
On Wed Jun 4, 2025 at 6:14 AM JST, Lyude Paul wrote: > On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote: >> FWSEC-FRTS is run with the desired address of the FRTS region as >> parameter, which we need to compute depending on some hardware >> parameters. >> >> Do this in a `FbLayout` stru

Re: [PATCH v4 15/20] gpu: nova-core: firmware: add ucode descriptor used by FWSEC-FRTS

2025-06-03 Thread Alexandre Courbot
On Mon Jun 2, 2025 at 9:26 PM JST, Danilo Krummrich wrote: > On Wed, May 21, 2025 at 03:45:10PM +0900, Alexandre Courbot wrote: >> FWSEC-FRTS is the first firmware we need to run on the GSP falcon in >> order to initiate the GSP boot process. Introduce the structure that >> describes it. >> >> Sig

Re: [PATCH v4 20/20] gpu: nova-core: load and run FWSEC-FRTS

2025-06-03 Thread Alexandre Courbot
On Wed Jun 4, 2025 at 6:45 AM JST, Lyude Paul wrote: > On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote: >> With all the required pieces in place, load FWSEC-FRTS onto the GSP >> falcon, run it, and check that it successfully carved out the WPR2 >> region out of framebuffer memory. >> >>

Re: [PATCH v4 20/20] gpu: nova-core: load and run FWSEC-FRTS

2025-06-03 Thread Alexandre Courbot
On Fri May 30, 2025 at 6:30 AM JST, Timur Tabi wrote: > On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote: > > I noticed something interesting in this change to Gpu::new(). > >> +    // Check that the WPR2 region does not already exists - if it does, >> the GPU needs to be >> +   

Re: [PATCH v4 19/20] gpu: nova-core: extract FWSEC from BIOS and patch it to run FWSEC-FRTS

2025-06-03 Thread Alexandre Courbot
On Wed Jun 4, 2025 at 6:32 AM JST, Lyude Paul wrote: >> +unsafe fn transmute<'a, 'b, T: Sized + FromBytes>( >> +fw: &'a DmaObject, >> +offset: usize, >> +) -> Result<&'b T> { >> +if offset + core::mem::size_of::() > fw.size() { >> +return Err(EINVAL); >> +} >> +if (fw.s

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-03 Thread Alexandre Courbot
On Wed Jun 4, 2025 at 8:02 AM JST, Benno Lossin wrote: > On Mon Jun 2, 2025 at 3:09 PM CEST, Alexandre Courbot wrote: >> On Thu May 29, 2025 at 4:27 PM JST, Benno Lossin wrote: >>> On Thu May 29, 2025 at 3:18 AM CEST, Alexandre Courbot wrote: On Thu May 29, 2025 at 5:17 AM JST, Benno Lossin wr

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-03 Thread Alexandre Courbot
On Wed Jun 4, 2025 at 7:53 AM JST, Benno Lossin wrote: > On Mon Jun 2, 2025 at 11:39 AM CEST, Danilo Krummrich wrote: >> On Thu, May 29, 2025 at 09:27:33AM +0200, Benno Lossin wrote: >>> That's also fair, but we lose the constness of `next_multiple_of`, so >>> you can't use `align_up` in a const fu

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-03 Thread Benno Lossin
On Mon Jun 2, 2025 at 3:09 PM CEST, Alexandre Courbot wrote: > On Thu May 29, 2025 at 4:27 PM JST, Benno Lossin wrote: >> On Thu May 29, 2025 at 3:18 AM CEST, Alexandre Courbot wrote: >>> On Thu May 29, 2025 at 5:17 AM JST, Benno Lossin wrote: On Wed May 21, 2025 at 8:44 AM CEST, Alexandre Cou

Re: [PATCH v4 04/20] rust: add new `num` module with useful integer operations

2025-06-03 Thread Benno Lossin
On Mon Jun 2, 2025 at 11:39 AM CEST, Danilo Krummrich wrote: > On Thu, May 29, 2025 at 09:27:33AM +0200, Benno Lossin wrote: >> That's also fair, but we lose the constness of `next_multiple_of`, so >> you can't use `align_up` in a const function. That might confuse people >> and then they write the

Re: [PATCH v4 20/20] gpu: nova-core: load and run FWSEC-FRTS

2025-06-03 Thread Lyude Paul
On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote: > With all the required pieces in place, load FWSEC-FRTS onto the GSP > falcon, run it, and check that it successfully carved out the WPR2 > region out of framebuffer memory. > > Signed-off-by: Alexandre Courbot > --- > drivers/gpu/nova

Re: [PATCH v4 19/20] gpu: nova-core: extract FWSEC from BIOS and patch it to run FWSEC-FRTS

2025-06-03 Thread Lyude Paul
On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote: > The FWSEC firmware needs to be extracted from the VBIOS and patched with > the desired command, as well as the right signature. Do this so we are > ready to load and run this firmware into the GSP falcon and create the > FRTS region. >

Re: [PATCH v4 18/20] gpu: nova-core: add types for patching firmware binaries

2025-06-03 Thread Lyude Paul
Reviewed-by: Lyude Paul On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote: > Some of the firmwares need to be patched at load-time with a signature. > Add a couple of types and traits that sub-modules can use to implement > this behavior, while ensuring that the correct kind of signature

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-03 Thread Lyude Paul
On Tue, 2025-05-27 at 16:38 -0400, Joel Fernandes wrote: > Hello, > I split this particular patch into 3 patches: > > gpu: nova-core: vbios: Add support for FWSEC ucode extraction > gpu: nova-core: vbios: Add support to look up PMU table in FWSEC > gpu: nova-core: vbios: Add base support for VBIOS

Re: [PATCH v4 17/20] gpu: nova-core: compute layout of the FRTS region

2025-06-03 Thread Lyude Paul
On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote: > FWSEC-FRTS is run with the desired address of the FRTS region as > parameter, which we need to compute depending on some hardware > parameters. > > Do this in a `FbLayout` structure, that will be later extended to > describe more memory

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-03 Thread Lyude Paul
Some comments down below (in addition to the ones that Danilo left). Mostly nits since Danilo got to most of the good feedback :P On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote: > From: Joel Fernandes > > Add support for navigating and setting up vBIOS ucode data required for > GSP t

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-03 Thread Tvrtko Ursulin
On 03/06/2025 17:27, Christian König wrote: On 6/3/25 17:00, Tvrtko Ursulin wrote: On 03/06/2025 14:13, Maxime Ripard wrote: Hi, On Mon, Jun 02, 2025 at 04:42:27PM +0200, Christian König wrote: On 6/2/25 15:05, Tvrtko Ursulin wrote: On 15/05/2025 14:15, Christian König wrote: Hey drm-mis

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-03 Thread Christian König
On 6/3/25 17:00, Tvrtko Ursulin wrote: > > On 03/06/2025 14:13, Maxime Ripard wrote: >> Hi, >> >> On Mon, Jun 02, 2025 at 04:42:27PM +0200, Christian König wrote: >>> On 6/2/25 15:05, Tvrtko Ursulin wrote: On 15/05/2025 14:15, Christian König wrote: > Hey drm-misc maintainers, > >>

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-03 Thread Christian König
On 6/3/25 15:13, Maxime Ripard wrote: > Hi, > > On Mon, Jun 02, 2025 at 04:42:27PM +0200, Christian König wrote: >> On 6/2/25 15:05, Tvrtko Ursulin wrote: >>> On 15/05/2025 14:15, Christian König wrote: Hey drm-misc maintainers, can you guys please backmerge drm-next into drm-misc-n

Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-03 Thread Christian König
On 6/3/25 16:28, Christoph Hellwig wrote: > On Tue, Jun 03, 2025 at 04:18:22PM +0200, Christian König wrote: >>> Does it matter compared to the I/O in this case? >> >> It unfortunately does, see the numbers on patch 3 and 4. > > That's kinda weird. Why does the page table lookup tage so much > ti

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-03 Thread Tvrtko Ursulin
On 03/06/2025 14:13, Maxime Ripard wrote: Hi, On Mon, Jun 02, 2025 at 04:42:27PM +0200, Christian König wrote: On 6/2/25 15:05, Tvrtko Ursulin wrote: On 15/05/2025 14:15, Christian König wrote: Hey drm-misc maintainers, can you guys please backmerge drm-next into drm-misc-next? I want to

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-03 Thread Joel Fernandes
On 6/2/2025 9:33 AM, Danilo Krummrich wrote: [...] >> +impl PcirStruct { >> +fn new(pdev: &pci::Device, data: &[u8]) -> Result { >> +if data.len() < core::mem::size_of::() { >> +dev_err!(pdev.as_ref(), "Not enough data for PcirStruct\n"); >> +return Err(EINVAL

Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-03 Thread Christian König
On 6/3/25 15:19, Christoph Hellwig wrote: > On Tue, Jun 03, 2025 at 03:14:20PM +0200, Christian König wrote: >> On 6/3/25 15:00, Christoph Hellwig wrote: >>> This is a really weird interface. No one has yet to explain why dmabuf >>> is so special that we can't support direct I/O to it when we can

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-03 Thread Christian König
On 6/3/25 14:48, Tvrtko Ursulin wrote: > > On 03/06/2025 13:40, Christian König wrote: >> On 6/3/25 13:30, Tvrtko Ursulin wrote: >>> >>> On 02/06/2025 19:00, Christian König wrote: On 6/2/25 17:25, Tvrtko Ursulin wrote: > > On 02/06/2025 15:42, Christian König wrote: >> On 6/2/25

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-03 Thread Danilo Krummrich
On 6/3/25 3:47 PM, Joel Fernandes wrote: On 6/3/2025 4:12 AM, Alexandre Courbot wrote: Would it then make sense to make `FwSecBiosImage` public, add an `fn fwsec_image(&self) -> &FwSecBiosImage` method and have the caller call its methods directly (maybe renamed to `header`, `ucode` and `sigs`)?

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-03 Thread Joel Fernandes
On 6/3/2025 4:12 AM, Alexandre Courbot wrote: > On Tue Jun 3, 2025 at 12:15 AM JST, Joel Fernandes wrote: >> On Mon, Jun 02, 2025 at 03:33:56PM +0200, Danilo Krummrich wrote: >>> On Wed, May 21, 2025 at 03:45:11PM +0900, Alexandre Courbot wrote: +impl Vbios { >>> >>> >>> +pub(crat

Re: [PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-03 Thread Christian König
On 6/3/25 15:00, Christoph Hellwig wrote: > This is a really weird interface. No one has yet to explain why dmabuf > is so special that we can't support direct I/O to it when we can support > it to otherwise exotic mappings like PCI P2P ones. With udmabuf you can do direct I/O, it's just ineffici

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-03 Thread Maxime Ripard
Hi, On Mon, Jun 02, 2025 at 04:42:27PM +0200, Christian König wrote: > On 6/2/25 15:05, Tvrtko Ursulin wrote: > > On 15/05/2025 14:15, Christian König wrote: > >> Hey drm-misc maintainers, > >> > >> can you guys please backmerge drm-next into drm-misc-next? > >> > >> I want to push this patch here

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-03 Thread Tvrtko Ursulin
On 03/06/2025 13:40, Christian König wrote: On 6/3/25 13:30, Tvrtko Ursulin wrote: On 02/06/2025 19:00, Christian König wrote: On 6/2/25 17:25, Tvrtko Ursulin wrote: On 02/06/2025 15:42, Christian König wrote: On 6/2/25 15:05, Tvrtko Ursulin wrote: Hi, On 15/05/2025 14:15, Christian Kö

Re: [PATCH v4 1/4] fs: allow cross-FS copy_file_range for memory file with direct I/O

2025-06-03 Thread Amir Goldstein
x-me...@vger.kernel.org; dri- > > de...@lists.freedesktop.org; linaro-mm-...@lists.linaro.org; linux- > > ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- > > m...@kvack.org; wangbintian(BintianWang) ; > > yipengxiang ; liulu 00013167 > > ; hanfeng 00

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-03 Thread Christian König
On 6/3/25 13:30, Tvrtko Ursulin wrote: > > On 02/06/2025 19:00, Christian König wrote: >> On 6/2/25 17:25, Tvrtko Ursulin wrote: >>> >>> On 02/06/2025 15:42, Christian König wrote: On 6/2/25 15:05, Tvrtko Ursulin wrote: > > Hi, > > On 15/05/2025 14:15, Christian König wrote: >

RE: [PATCH v4 1/4] fs: allow cross-FS copy_file_range for memory file with direct I/O

2025-06-03 Thread wangtao
; ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- > m...@kvack.org; wangbintian(BintianWang) ; > yipengxiang ; liulu 00013167 > ; hanfeng 00012985 > Subject: Re: [PATCH v4 1/4] fs: allow cross-FS copy_file_range for memory > file with direct I/O > > On Tue, Jun 3,

RE: [PATCH v4 2/4] dmabuf: Implement copy_file_range callback for dmabuf direct I/O prep

2025-06-03 Thread wangtao
; ker...@vger.kernel.org; linux-fsde...@vger.kernel.org; linux- > m...@kvack.org; wangbintian(BintianWang) ; > yipengxiang ; liulu 00013167 > ; hanfeng 00012985 > Subject: Re: [PATCH v4 2/4] dmabuf: Implement copy_file_range callback for > dmabuf direct I/O prep > > > > On 6

[PATCH v4 2/4] dmabuf: Implement copy_file_range callback for dmabuf direct I/O prep

2025-06-03 Thread wangtao
First determine if dmabuf reads from or writes to the file. Then call exporter's rw_file callback function. Signed-off-by: wangtao --- drivers/dma-buf/dma-buf.c | 32 include/linux/dma-buf.h | 16 2 files changed, 48 insertions(+) diff --git a

[PATCH v4 0/4] Implement dmabuf direct I/O via copy_file_range

2025-06-03 Thread wangtao
Main steps to load file data into dmabuf: 1. dmabuf_fd = dmabuf_alloc(len, heap_fd) 2. vaddr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd, 0) 3. file_fd = open(file_path, O_RDONLY) 4. read(file_fd, vaddr, len) dmabuf's attachment/map/fence model sets VM_PFNMAP for mmap, which la

Re: [PATCH v4 1/4] fs: allow cross-FS copy_file_range for memory file with direct I/O

2025-06-03 Thread Amir Goldstein
On Tue, Jun 3, 2025 at 11:53 AM wangtao wrote: > > Memory files can optimize copy performance via copy_file_range callbacks: > -Compared to mmap&read: reduces GUP (get_user_pages) overhead > -Compared to sendfile/splice: eliminates one memory copy > -Supports dma-buf direct I/O zero-copy implement

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-03 Thread Tvrtko Ursulin
On 02/06/2025 19:00, Christian König wrote: On 6/2/25 17:25, Tvrtko Ursulin wrote: On 02/06/2025 15:42, Christian König wrote: On 6/2/25 15:05, Tvrtko Ursulin wrote: Hi, On 15/05/2025 14:15, Christian König wrote: Hey drm-misc maintainers, can you guys please backmerge drm-next into drm

[PATCH v4 3/4] udmabuf: Implement udmabuf direct I/O

2025-06-03 Thread wangtao
Construct bio_vec from folios, then call the other file's r/w callbacks for IO operations. Test data shows direct I/O copy_file_range improves performance by over 50% vs direct I/O mmap&read (2557 vs 1534). Test data: |32x32MB Read 1024MB |Creat-ms|Close-ms| I/O-ms|I/O-MB/s| I/O% |--

Re: [PATCH v4 2/4] dmabuf: Implement copy_file_range callback for dmabuf direct I/O prep

2025-06-03 Thread Christian König
On 6/3/25 11:52, wangtao wrote: > First determine if dmabuf reads from or writes to the file. > Then call exporter's rw_file callback function. > > Signed-off-by: wangtao > --- > drivers/dma-buf/dma-buf.c | 32 > include/linux/dma-buf.h | 16

[PATCH v4 4/4] dmabuf:system_heap Implement system_heap dmabuf direct I/O

2025-06-03 Thread wangtao
First verify system_heap exporter has exclusive dmabuf access. Build bio_vec from sgtable, then invoke target file's r/w callbacks for IO. Outperforms buffer IO mmap/read by 250%, beats direct I/O udmabuf copy_file_range by over 30% with initialization time significantly lower than udmabuf. Test d

[PATCH v4 1/4] fs: allow cross-FS copy_file_range for memory file with direct I/O

2025-06-03 Thread wangtao
Memory files can optimize copy performance via copy_file_range callbacks: -Compared to mmap&read: reduces GUP (get_user_pages) overhead -Compared to sendfile/splice: eliminates one memory copy -Supports dma-buf direct I/O zero-copy implementation Suggested by: Christian König Suggested by: Amir G

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-03 Thread Alexandre Courbot
On Tue Jun 3, 2025 at 12:15 AM JST, Joel Fernandes wrote: > On Mon, Jun 02, 2025 at 03:33:56PM +0200, Danilo Krummrich wrote: >> On Wed, May 21, 2025 at 03:45:11PM +0900, Alexandre Courbot wrote: >> > +impl Vbios { >> >> >> >> > +pub(crate) fn fwsec_header(&self, pdev: &device::Device) -> >

Re: [PATCH v4 14/20] gpu: nova-core: add falcon register definitions and base code

2025-06-03 Thread Alexandre Courbot
Hi Lyude, thanks for the review! On Sat May 31, 2025 at 7:22 AM JST, Lyude Paul wrote: >> +/// `target_mem`. >> +/// >> +/// `sec` is set if the loaded firmware is expected to run in secure >> mode. >> +fn dma_wr( >> +&self, >> +bar: &Bar0, >> +dma_handle:

Re: [PATCH v4 14/20] gpu: nova-core: add falcon register definitions and base code

2025-06-03 Thread Alexandre Courbot
On Mon Jun 2, 2025 at 9:06 PM JST, Danilo Krummrich wrote: > On Wed, May 21, 2025 at 03:45:09PM +0900, Alexandre Courbot wrote: >> Add the common Falcon code and HAL for Ampere GPUs, and instantiate the >> GSP and SEC2 Falcons that will be required to boot the GSP. > > Maybe add a few more words ab

[PATCH v4 1/7] drm/panthor: Add GPU specific initialization framework

2025-06-02 Thread Karunika Choo
This patch provides an initialization framework for multiple Mali GPUs by introducing a GPU support look-up table. Each entry contains, at minimum, the architecture major version of the GPU, and may optionally provide feature flags and register offset overrides. Signed-off-by: Karunika Choo ---

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-02 Thread Christian König
On 6/2/25 17:25, Tvrtko Ursulin wrote: > > On 02/06/2025 15:42, Christian König wrote: >> On 6/2/25 15:05, Tvrtko Ursulin wrote: >>> >>> Hi, >>> >>> On 15/05/2025 14:15, Christian König wrote: Hey drm-misc maintainers, can you guys please backmerge drm-next into drm-misc-next?

[PATCH v4 4/7] drm/panthor: Add support for Mali-G710, Mali-G510 and Mali-G310

2025-06-02 Thread Karunika Choo
This patch adds GPU model name and FW binary support for Mali-G710, Mali-G510, and Mali-G310. Signed-off-by: Karunika Choo --- drivers/gpu/drm/panthor/panthor_fw.c | 2 ++ drivers/gpu/drm/panthor/panthor_hw.c | 6 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/panthor/pant

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-02 Thread Danilo Krummrich
On Wed, May 21, 2025 at 03:45:11PM +0900, Alexandre Courbot wrote: > +impl Vbios { > +pub(crate) fn fwsec_header(&self, pdev: &device::Device) -> > Result<&FalconUCodeDescV3> { > +self.fwsec_image.fwsec_header(pdev) > +} > + > +pub(crate) fn fwsec_ucode(&self, pdev: &device:

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-02 Thread Tvrtko Ursulin
On 02/06/2025 15:42, Christian König wrote: On 6/2/25 15:05, Tvrtko Ursulin wrote: Hi, On 15/05/2025 14:15, Christian König wrote: Hey drm-misc maintainers, can you guys please backmerge drm-next into drm-misc-next? I want to push this patch here but it depends on changes which are partia

Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode extraction for boot

2025-06-02 Thread Joel Fernandes
On Mon, Jun 02, 2025 at 03:33:56PM +0200, Danilo Krummrich wrote: > On Wed, May 21, 2025 at 03:45:11PM +0900, Alexandre Courbot wrote: > > +impl Vbios { > > > > > +pub(crate) fn fwsec_header(&self, pdev: &device::Device) -> > > Result<&FalconUCodeDescV3> { > > +self.fwsec_image.fwse

Re: [PATCH v4 2/9] dma-fence: Use a flag for 64-bit seqnos

2025-06-02 Thread Christian König
On 6/2/25 15:05, Tvrtko Ursulin wrote: > > Hi, > > On 15/05/2025 14:15, Christian König wrote: >> Hey drm-misc maintainers, >> >> can you guys please backmerge drm-next into drm-misc-next? >> >> I want to push this patch here but it depends on changes which are partially >> in drm-next and parti

  1   2   3   4   5   6   7   8   9   10   >