hexdump0815 / imagebuilder

velvet os - simple script framework to build ubuntu 22.04 lts jammy (in older versions also 20.04 lts focal) and debian 12 bookworm (in older versions also 11 bullseye) bootable usb / sd card images for some arm and intel devices - lots of prebuilt images as well
GNU General Public License v3.0
283 stars 43 forks source link

chromebook_oak: misc: PowerVR Vulkan driver #34

Open EMLommers opened 2 years ago

EMLommers commented 2 years ago

There was a new release of open source vulkan driver for PowerVR. see: https://lists.freedesktop.org/archives/mesa-dev/2022-March/225699.html

Can you add this in the new version for the 8173 Oak version?

hexdump0815 commented 2 years ago

hi,

i'm aware of this and will include it as soon as its somewhat useable, but the current state is very basic and not really useable for anything at all right now - i guess it will be about half a year to a year until it has reached a state where it might start to be basically useful ... if that project does not disappear in the meantime (which sadly happens to such projects from time to time as well, but i hope that this one will make progress)

best wishes - hexdump

EMLommers commented 2 years ago

Hi,

Is a bit basic and bit working better than nothing at all? If it improves performance it has at lease some use. Performance without GPU sucks big time, won't you agree?

rgrds ,EML

hexdump0815 commented 2 years ago

i did not look closer at it, but the way i read the announcement it looks like so far it can only draw some triangles in a kms test app - so still quite far away from being able to drive xorg or a wayland session which both need a lot of properly working functionality

EMLommers commented 2 years ago

Thanks! Let's wait and see.....

a-priestley commented 1 year ago

Just wanted to chime in and add that I am also waiting eagerly for this capability. But I'm not well-versed in how to gauge the progression of kernel-level developments. Judging by the volume of activity here, it seems like things are progressing very nicely, but I have no idea how to make even an educated guess as to when it will be ready.

hexdump0815 commented 1 year ago

@a-priestley - i think its still quite a bit of way to go until this starts to be useable - i definitely have this effort on my radar and will try to integrate it into the mt8173 tree as soon as it gets useable - my current assumption is that this might be early or mid next year ...

EMLommers commented 11 months ago

In your opinion is their (imagination) gitlab.freedesktop (frankbinn) povervr kernel driver (review v4, kernel 6.4) good enough to embed in your next build? Together maybe with beaglebone build of Mesa driver for pvr? PowerVR firmware is also available. Was planning to build this somewhere this week. Worth the effort? Llvmpipe works, but GPU acceleration is nicer.

hexdump0815 commented 11 months ago

as far as i understand there is still a bit of way to go until the driver starts to be useable - there is only a very minimal set of vulkan extensions implemented and a lot is missing to get zink running on top of it ... also it requires quite a few extra patches on top - so for now i'll wait until it starts to be useable before thinking about including it into my oak kernel builds ... see also: https://oftc.irclog.whitequark.org/linux-cros-arm/2023-06-25#32258477

EMLommers commented 10 months ago

What I read is TI is referring users to use: https://git.ti.com/cgit/graphics/ti-img-rogue-driver/tree/?h=linuxws/kirkstone/k6.1/23.1.6404501 (kernel 6.1)

according to: https://forum.pine64.org/printthread.php?tid=18301&page=1

(PowerVR 6 (RGX, Rogue) GX6250, (TI SK-AM62 board) AXE-1-16M, Renesas RZ/G2x board, all the same GPU / driver except for device nr. - > BVNC)

Currently, imagination tech, has changed their target board from Chromebook R13 to TI SK-AM62, which has the same GPU, I guess due to lifespan of R13 (5 years old) they moved to active board.

The driver has also the config for Mt8173, Linux incl kernel patches. Why would TI point users to use this driver for Rogue GPU, if it wasn't working?

The previous version ddk for kernel 5.10 was also working on TI. Same counts for Renesas RZ/Gxx board, also equipped with GX6250, and providing driver for kernel 5.10

The BVNC, BNC,( config) should match device. (There are approx 60 boards supported now, the number of different config/core files) The correct values can be obtained by checking kernel 3.18 from for example Chromiumos and oak.

BVNC for Mt8173 is 4.40.2.51 BNC for MT8173 is 4.V.2.51

rgxcore_km_4.40.2.51.h rgxconfig_km_4.V.2.51.h

Which is correct when building driver for mt8173-linux

firmware for kernel > 4.8 must be signed (new driver) name will be rgx.fw.signed.4.40.2.51, if the correct firmware exist, in oak case rgx.fw_4.40.2.51, it will sign firmware when installing driver when kernel > 4.8 Which is mentioned in core.mk, of course this can be disabled.

I would not be surprised if TI is the OEM of the GPU. TI has decades of experience with VDP/GPU architecture.. Also holding several patents including 3D rendering with texture compression and programmable interrupt routing in multiprocessor devices.

I would not wait for imgtec, but go for TI driver.

just FYI..

hexdump0815 commented 10 months ago

i currently do not have any time to look deeper into this (just trying to follow the progress info of the open source img driver work). in case you get anything working based on the ti driver, then please let me know.

EMLommers commented 10 months ago

Sure. It is not a TI driver alone, it is an img rogue driver, (made by or for imgtec). I have checked the code and using same rogue firmware as chromeos, no new build firmware needed. The 5.10 kernel driver is only for TI AM62x and Mt8173 (Chromebook OAK/ELM R13, 4.40.2.51) The 6.1 kernel has more TI devices and RK3368. Besides Rogue, also being prepared for Oceanic and Vulcanic driver

I was planning to build the driver for 6.1 on OAK, have copied the firmware files from CrOS already and they match to this driver. The driver version is successor of version 1.18, which is 1 version over latest OAK CrOS recovery image, which is 1.17

After closely checking the code, I have 100% confidence, this is a working driver. I will use your script for the 6.1, OAK, include driver and replace kernel, modules and driver (incl. Mesa Img).

The driver is some kind of Middleware between kernel, fb llvm driver and GPU. It is a better driver than VisionFive2 img rogue driver for risc.

a-priestley commented 5 months ago

Some news.. the powervr kernel driver for this device is in 6.8, of which there are now release candidates available (I believe release is slated for March). AFAIK this does not necessarily mean vulkan is in full working condition, but I think this is a big update still.

hexdump0815 commented 5 months ago

@a-priestley - i'm following the progress news there as well - as far as i know the main target for the development is some ti sbc now and no longer the elm chromebook, so i expect it to not to be fully supported with what is in v6.8 and mesa now but hopefully soon as at least support for oak is at least still considered - see: https://lists.freedesktop.org/archives/dri-devel/2023-June/410995.html and https://gitlab.freedesktop.org/frankbinns/mesa/-/commit/7de7761c82d2b90692bd96e9340109ee1b89acbe

i currently do not have time to play around with the current code, but in case someone else is actually giving it a try, please add some info here