Re: [EXTERNAL] Re: [PATCH v9 00/20] Imagination Technologies PowerVR DRM driver

2023-11-28 Thread Donald Robson
Hi Nikolaus,

I can't say it won't happen, but for commercial reasons we need to concentrate
our efforts on current and next generation product lines. We just don't have the
resources to look back at the moment.

Thanks,
Donald

On Thu, 2023-11-23 at 10:04 +0100, H. Nikolaus Schaller wrote:
> *** CAUTION: This email originates from a source not known to Imagination 
> Technologies. Think before you click a link or open an attachment ***
> 
> 
> 
> > Am 22.11.2023 um 20:34 schrieb Maxime Ripard :
> > 
> > Hi,
> > 
> > On Wed, Nov 22, 2023 at 04:34:21PM +, Donald Robson wrote:
> > > This patch series adds the initial DRM driver for Imagination 
> > > Technologies PowerVR
> > > GPUs, starting with those based on our Rogue architecture. It's worth 
> > > pointing
> > > out that this is a new driver, written from the ground up, rather than a
> > > refactored version of our existing downstream driver (pvrsrvkm).
> > > 
> > > This new DRM driver supports:
> > > - GEM shmem allocations
> > > - dma-buf / PRIME
> > > - Per-context userspace managed virtual address space
> > > - DRM sync objects (binary and timeline)
> > > - Power management suspend / resume
> > > - GPU job submission (geometry, fragment, compute, transfer)
> > > - META firmware processor
> > > - MIPS firmware processor
> > > - GPU hang detection and recovery
> > > 
> > > Currently our main focus is on the AXE-1-16M GPU. Testing so far has been 
> > > done
> > > using a TI SK-AM62 board (AXE-1-16M GPU). The driver has also been 
> > > confirmed to
> > > work on the BeaglePlay board. Firmware for the AXE-1-16M can be found 
> > > here:
> > > https://urldefense.com/v3/__https://gitlab.freedesktop.org/frankbinns/linux-firmware/-/tree/powervr__;!!KCwjcDI!yZZE_N0XquRbG3VaxrJrJJ19ddP0moZpD-DPJPVOJfMLizcx68mSiCDl2ynN7QAwYSKkGnhRuWmtYQX2$
> > >  
> > > 
> > > A Vulkan driver that works with our downstream kernel driver has already 
> > > been
> > > merged into Mesa [1][2]. Support for this new DRM driver is being 
> > > maintained in
> > > a merge request [3], with the branch located here:
> > > https://urldefense.com/v3/__https://gitlab.freedesktop.org/frankbinns/mesa/-/tree/powervr-winsys__;!!KCwjcDI!yZZE_N0XquRbG3VaxrJrJJ19ddP0moZpD-DPJPVOJfMLizcx68mSiCDl2ynN7QAwYSKkGnhRubWjA943$
> > >  
> > > 
> > > Vulkan driver links referred to above:
> > > [1] 
> > > https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15243__;!!KCwjcDI!yZZE_N0XquRbG3VaxrJrJJ19ddP0moZpD-DPJPVOJfMLizcx68mSiCDl2ynN7QAwYSKkGnhRuZ5VTcM5$
> > >  
> > > [2] 
> > > https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/imagination/vulkan__;!!KCwjcDI!yZZE_N0XquRbG3VaxrJrJJ19ddP0moZpD-DPJPVOJfMLizcx68mSiCDl2ynN7QAwYSKkGnhRueSpfoT-$
> > >  
> > > [3] 
> > > https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15507__;!!KCwjcDI!yZZE_N0XquRbG3VaxrJrJJ19ddP0moZpD-DPJPVOJfMLizcx68mSiCDl2ynN7QAwYSKkGnhRuTmZ1wrW$
> > >  
> > > 
> > > Job stream formats are documented at:
> > > https://urldefense.com/v3/__https://gitlab.freedesktop.org/mesa/mesa/-/blob/f8d2b42ae65c2f16f36a43e0ae39d288431e4263/src/imagination/csbgen/rogue_kmd_stream.xml__;!!KCwjcDI!yZZE_N0XquRbG3VaxrJrJJ19ddP0moZpD-DPJPVOJfMLizcx68mSiCDl2ynN7QAwYSKkGnhRuac_cqbR$
> > >  
> > > 
> > > The Vulkan driver is progressing towards Vulkan 1.0. The current 
> > > combination of this
> > > kernel driver with the Mesa Vulkan driver (powervr-mesa-next branch) 
> > > successfully
> > > completes Vulkan CTS 1.3.4.1 in our local runs. The driver is expected to 
> > > pass the
> > > Khronos Conformance Process once the submission is made.
> > > 
> > > The code in this patch series, along with the needed dts changes can be 
> > > found here:
> > > https://urldefense.com/v3/__https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/dev/v9_dts__;!!KCwjcDI!yZZE_N0XquRbG3VaxrJrJJ19ddP0moZpD-DPJPVOJfMLizcx68mSiCDl2ynN7QAwYSKkGnhRuSVv2Zfk$
> > >  
> > > The full development history can be found here:
> > > https://urldefense.com/v3/__https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/powervr-next__;!!KCwjcDI!yZZE_N0XquRbG3VaxrJrJJ19ddP0moZpD-DPJPVOJfMLizcx68mSiCDl2ynN7QAwYSKkGnhRuQaCnjgE$
> > >  
> > 
> > I just merged all the patches to drm-misc-next.
> > 
> > Congrats :)
> 
> A big applause to the team that accomplished this!
> 
> Let me take this opportunity to ask if there could be a similar effort 
> supported by imgtec
> for the SGX drivers? There are still a lot of devices using this version of 
> PVR in the wild,
> like OpenPandora or Pyra Handheld, that are stuck with older Linux kernels 
> (which are now
> unmaintained) because there are no compatible SGX drivers for modern kernels.
> 
> And we have the openpvrsgx community that can definitely help with debugging 
> (we all own
> various OMAP and jz4780 devices), but we lack the documentation to actually 
> develop and
> upstream such a driver (and user-space code) ourselves.
> 
> Nikolaus
> 


Re: [PATCH v9 00/20] Imagination Technologies PowerVR DRM driver

2023-11-23 Thread H. Nikolaus Schaller



> Am 22.11.2023 um 20:34 schrieb Maxime Ripard :
> 
> Hi,
> 
> On Wed, Nov 22, 2023 at 04:34:21PM +, Donald Robson wrote:
>> This patch series adds the initial DRM driver for Imagination Technologies 
>> PowerVR
>> GPUs, starting with those based on our Rogue architecture. It's worth 
>> pointing
>> out that this is a new driver, written from the ground up, rather than a
>> refactored version of our existing downstream driver (pvrsrvkm).
>> 
>> This new DRM driver supports:
>> - GEM shmem allocations
>> - dma-buf / PRIME
>> - Per-context userspace managed virtual address space
>> - DRM sync objects (binary and timeline)
>> - Power management suspend / resume
>> - GPU job submission (geometry, fragment, compute, transfer)
>> - META firmware processor
>> - MIPS firmware processor
>> - GPU hang detection and recovery
>> 
>> Currently our main focus is on the AXE-1-16M GPU. Testing so far has been 
>> done
>> using a TI SK-AM62 board (AXE-1-16M GPU). The driver has also been confirmed 
>> to
>> work on the BeaglePlay board. Firmware for the AXE-1-16M can be found here:
>> https://gitlab.freedesktop.org/frankbinns/linux-firmware/-/tree/powervr
>> 
>> A Vulkan driver that works with our downstream kernel driver has already been
>> merged into Mesa [1][2]. Support for this new DRM driver is being maintained 
>> in
>> a merge request [3], with the branch located here:
>> https://gitlab.freedesktop.org/frankbinns/mesa/-/tree/powervr-winsys
>> 
>> Vulkan driver links referred to above:
>> [1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15243
>> [2] 
>> https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/imagination/vulkan
>> [3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15507
>> 
>> Job stream formats are documented at:
>> https://gitlab.freedesktop.org/mesa/mesa/-/blob/f8d2b42ae65c2f16f36a43e0ae39d288431e4263/src/imagination/csbgen/rogue_kmd_stream.xml
>> 
>> The Vulkan driver is progressing towards Vulkan 1.0. The current combination 
>> of this
>> kernel driver with the Mesa Vulkan driver (powervr-mesa-next branch) 
>> successfully
>> completes Vulkan CTS 1.3.4.1 in our local runs. The driver is expected to 
>> pass the
>> Khronos Conformance Process once the submission is made.
>> 
>> The code in this patch series, along with the needed dts changes can be 
>> found here:
>> https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/dev/v9_dts
>> The full development history can be found here:
>> https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/powervr-next
> 
> I just merged all the patches to drm-misc-next.
> 
> Congrats :)

A big applause to the team that accomplished this!

Let me take this opportunity to ask if there could be a similar effort 
supported by imgtec
for the SGX drivers? There are still a lot of devices using this version of PVR 
in the wild,
like OpenPandora or Pyra Handheld, that are stuck with older Linux kernels 
(which are now
unmaintained) because there are no compatible SGX drivers for modern kernels.

And we have the openpvrsgx community that can definitely help with debugging 
(we all own
various OMAP and jz4780 devices), but we lack the documentation to actually 
develop and
upstream such a driver (and user-space code) ourselves.

Nikolaus



Re: [PATCH v9 00/20] Imagination Technologies PowerVR DRM driver

2023-11-22 Thread Maxime Ripard
Hi,

On Wed, Nov 22, 2023 at 04:34:21PM +, Donald Robson wrote:
> This patch series adds the initial DRM driver for Imagination Technologies 
> PowerVR
> GPUs, starting with those based on our Rogue architecture. It's worth pointing
> out that this is a new driver, written from the ground up, rather than a
> refactored version of our existing downstream driver (pvrsrvkm).
> 
> This new DRM driver supports:
> - GEM shmem allocations
> - dma-buf / PRIME
> - Per-context userspace managed virtual address space
> - DRM sync objects (binary and timeline)
> - Power management suspend / resume
> - GPU job submission (geometry, fragment, compute, transfer)
> - META firmware processor
> - MIPS firmware processor
> - GPU hang detection and recovery
> 
> Currently our main focus is on the AXE-1-16M GPU. Testing so far has been done
> using a TI SK-AM62 board (AXE-1-16M GPU). The driver has also been confirmed 
> to
> work on the BeaglePlay board. Firmware for the AXE-1-16M can be found here:
> https://gitlab.freedesktop.org/frankbinns/linux-firmware/-/tree/powervr
> 
> A Vulkan driver that works with our downstream kernel driver has already been
> merged into Mesa [1][2]. Support for this new DRM driver is being maintained 
> in
> a merge request [3], with the branch located here:
> https://gitlab.freedesktop.org/frankbinns/mesa/-/tree/powervr-winsys
> 
> Vulkan driver links referred to above:
> [1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15243
> [2] 
> https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/imagination/vulkan
> [3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15507
> 
> Job stream formats are documented at:
> https://gitlab.freedesktop.org/mesa/mesa/-/blob/f8d2b42ae65c2f16f36a43e0ae39d288431e4263/src/imagination/csbgen/rogue_kmd_stream.xml
> 
> The Vulkan driver is progressing towards Vulkan 1.0. The current combination 
> of this
> kernel driver with the Mesa Vulkan driver (powervr-mesa-next branch) 
> successfully
> completes Vulkan CTS 1.3.4.1 in our local runs. The driver is expected to 
> pass the
> Khronos Conformance Process once the submission is made.
> 
> The code in this patch series, along with the needed dts changes can be found 
> here:
> https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/dev/v9_dts
> The full development history can be found here:
> https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/powervr-next

I just merged all the patches to drm-misc-next.

Congrats :)

Maxime


signature.asc
Description: PGP signature


[PATCH v9 00/20] Imagination Technologies PowerVR DRM driver

2023-11-22 Thread Donald Robson
This patch series adds the initial DRM driver for Imagination Technologies 
PowerVR
GPUs, starting with those based on our Rogue architecture. It's worth pointing
out that this is a new driver, written from the ground up, rather than a
refactored version of our existing downstream driver (pvrsrvkm).

This new DRM driver supports:
- GEM shmem allocations
- dma-buf / PRIME
- Per-context userspace managed virtual address space
- DRM sync objects (binary and timeline)
- Power management suspend / resume
- GPU job submission (geometry, fragment, compute, transfer)
- META firmware processor
- MIPS firmware processor
- GPU hang detection and recovery

Currently our main focus is on the AXE-1-16M GPU. Testing so far has been done
using a TI SK-AM62 board (AXE-1-16M GPU). The driver has also been confirmed to
work on the BeaglePlay board. Firmware for the AXE-1-16M can be found here:
https://gitlab.freedesktop.org/frankbinns/linux-firmware/-/tree/powervr

A Vulkan driver that works with our downstream kernel driver has already been
merged into Mesa [1][2]. Support for this new DRM driver is being maintained in
a merge request [3], with the branch located here:
https://gitlab.freedesktop.org/frankbinns/mesa/-/tree/powervr-winsys

Vulkan driver links referred to above:
[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15243
[2] https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/imagination/vulkan
[3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15507

Job stream formats are documented at:
https://gitlab.freedesktop.org/mesa/mesa/-/blob/f8d2b42ae65c2f16f36a43e0ae39d288431e4263/src/imagination/csbgen/rogue_kmd_stream.xml

The Vulkan driver is progressing towards Vulkan 1.0. The current combination of 
this
kernel driver with the Mesa Vulkan driver (powervr-mesa-next branch) 
successfully
completes Vulkan CTS 1.3.4.1 in our local runs. The driver is expected to pass 
the
Khronos Conformance Process once the submission is made.

The code in this patch series, along with the needed dts changes can be found 
here:
https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/dev/v9_dts
The full development history can be found here:
https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/powervr-next

High level summary of changes:
v9:
* Bug fixes related to rebasing on latest drm_sched changes
* Updated for recent changes to drm_gpuvm
* Switch to dma_resv locking in pvr_vm
* Corrected license identifiers 

v8:
* Documentation clarifications/fixes for UAPI
* CREATE_BO ioctl now returns an error if provided size isn't page aligned
* Optimisations to MMU flush operations
* FWIF change to support CPU cached FW allocations/mappings

v7:
* Fix fence handling in pvr_sync_signal_array_add()
* Add a minimum retry count to pvr_kccb_reserve_slot_sync()
* Don't initialise kernel_vm_ctx when using MIPS firmware processor
* Remove unused gpu label from dt bindings example
* Improve UAPI BYPASS_CACHE documentation
* Add DRM_PVR_SUBMIT_JOB_FRAG_CMD_DISABLE_PIXELMERGE flag to UAPI
* Rename gpuva_manager usage to gpuvm
* Sync GEM objects to device on creation
* Fix out-of-bounds shift bug
* Fix integer overflow in MIPS MMU map error path
* Add missing commit messages

v6:
* Fix a number of error paths
* Attempt to recover GPU on MMU flush command failure
* Defer freeing/releasing page table backing pages until after TLB flush
* Add memory barriers and use WRITE_ONCE() when writing to page tables
* Add Kconfig dependency on CONFIG_PM
* Fix a few issues with GPU VA manager usage
* Split up header commit due to size
* Update compatible string and driver description to match marketing name
* Use alloc_page() to allocate MIPS pagetable
* Remove obsolete documentation

v5:
* Retrieve GPU device information from firmware image header
* Address issues with DT binding and example DTS
* Update VM code for upstream GPU VA manager
* BOs are always zeroed on allocation
* Update copyright

v4:
* Implemented hang recovery via firmware hard reset
* Add support for partial render jobs
* Move to a threaded IRQ
* Remove unnecessary read/write and clock helpers
* Remove device tree elements not relevant to AXE-1-16M
* Clean up resource acquisition
* Remove unused DT binding attributes

v3:
* Use drm_sched for scheduling
* Use GPU VA manager
* Use runtime PM
* Use drm_gem_shmem
* GPU watchdog and device loss handling
* DT binding changes: remove unused attributes, add additionProperties:false

v2:
* Redesigned and simplified UAPI based on RFC feedback from XDC 2022
* Support for transfer and partial render jobs
* Support for timeline sync objects

RFC v1: 
https://lore.kernel.org/dri-devel/20220815165156.118212-1-sarah.wal...@imgtec.com/

RFC v2: 
https://lore.kernel.org/dri-devel/20230413103419.293493-1-sarah.wal...@imgtec.com/

v3: 
https://lore.kernel.org/dri-devel/20230613144800.52657-1-sarah.wal...@imgtec.com/

v4: 
https://lore.kernel.org/dri-devel/20230714142355.111382-1-sarah.wal...@imgtec.com/

v5: 
https://lore.kernel.org/d