Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
51 user(s) are online (35 user(s) are browsing Forums)

Members: 0
Guests: 51

more...

Support us!

Headlines

 
  Register To Post  

graphics drivers question
Home away from home
Home away from home


See User information
@All (but mostly Balaton and Joerg):

Want to play with graphics drivers a bit to understand how it all works on low level, and so far found that PCIgraphics.card contain hardcoded list of supported graphics cards (by name of *.chip files or by vendor/ids value?) and adding any new card which not in, can be done or by creating new xxxx.card, or by patching PCIGraphics.card. That correct ?

I just grep on strings inside of PCIgraphics.card, and found those:

Picasso96/%s
RadeonHD
.chip
ATIRadeon
.chip
3dfxVoodoo
.chip
3DLabsPermedia2
.chip
SiliconMotion502
.chip


So, like anything else is out and if i want to add any new vendor/id/driver-name i need to create own *.card file or patch PCIgraphics.card , right ?


What is interesting, is that PCIGraphics.card does not have RadeonRX.chip string, so that mean RadeonHd there only for supporting "lite" version of the driver which come with the OS4 installation.

I disassembly RadeonRX driver, and found that it do have 2 resident tags : RadeonRX.chip main code, and RXCardPatch cold-start resident. RXCardPatch runs early, and have high priority, so it scan/build RadeonRX card info, and then opens PCIGraphics.card , get its main interface and via SetMethod() replace FindCard() and InitCard(). Then, when time come and PCIGraphics.card runs, it's already patched and do what need to do.

So, the way to add any new card which is not in PCIGraphics.card is probably that one, right ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: graphics drivers question
Not too shy to talk
Not too shy to talk


See User information
@kas1e

Thats how im doing it - see https://github.com/derfsss/VirtIOGPU

The other way is to fake it and add your driver as a known entry.

Go to top
Re: graphics drivers question
Home away from home
Home away from home


See User information
@derfs
Cool!

If description generated by AI on your link is correct then you do it exactly same way as radeonrx : patching pcigraphics by setmethod. I also see you alreade restructure private boardinfo structures, that nice :)

Btw, is your virtuogpu fast in 2d in compare with any other emulated card ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: graphics drivers question
Not too shy to talk
Not too shy to talk


See User information
@kas1e

currently no, as its full of debug and not optimized. Its at the 'get anything working' stage.

Go to top
Re: graphics drivers question
Home away from home
Home away from home


See User information
But those private boardinfo restructurisation are fine already? Just want to use it for my tests

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: graphics drivers question
Quite a regular
Quite a regular


See User information
@kas1e
I don’t know if this will be useful, but I’ve just remembered something…
Falke tried to do something along these lines using AI.
He couldn’t get a new graphics card to initialise via PCIGraphics.card
He created a separate virtovga.card. The graphics card did initialise and was visible in the system, but it couldn’t be started.

@jorg wrote about an entry in p96config in the bootloader and loading a new driver from there. I don’t think that worked.
screen - > https://ibb.co/bRybTDvc

Go to top
Re: graphics drivers question
Home away from home
Home away from home


See User information
@smarkusg
The way how Falke did is pure vibe coding, the way how Derfs do is more looks like real programming even with help of AI : i check the logs of repo , and he did quite lot of work for 2 months : he does same as if me does it : disassembly RadeonRX, disasembly PCIGraphics.card, disassembly graphics.library, then used all the opensources variants of all possible related drivers (even no directly os4 ones), and he fully reconstruct private BoardInfo structure which is "closed sourced".

Also, he go the way how RadeonRX driver do : create 2 residents in one binary, one which patch PCIGraphics.card via setmethod so to add "gate" to add more cards to the PCIgraphics.card together with usage of full stuff from PCIgraphics.card, and another resident is actual code.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: graphics drivers question
Just popping in
Just popping in


See User information
@derfs

Just compiled your driver and tested it on qemu under debian 13,
the mouse pointer appears briefly with a bluish tint, then dissapears as soon as i click or move it, never to be seen again.
Tried both Virtio-gpu and virtio-gpu-gl,with same result.
I am using pegasos 2 version.CPU is AMD Ryzen 3 7320C with Radeon Graphics.

Go to top
Re: graphics drivers question
Not too shy to talk
Not too shy to talk


See User information
@Ami603

Yup its marked as Beta, so its still a work in progress.

Go to top
Re: graphics drivers question
Quite a regular
Quite a regular


See User information
@Ami603
This is the first public release.
I tested it on my Asahi Linux ARM64 Fedora 44 Wayland system QEMU-11 and didn't have any issues with mouse colors.
Sometimes the mouse/pointer freezes up strangely—just right-click and it works fine again..
Settings I’m using: I have all transparency and shadow options for compositing turned off.
Overall, the one major issue I’ve noticed is that with compositing disabled, the driver runs terribly slow—really slow—and there are errors with proper color rendering and window display.
But this is just a demo/beta version. It’s normal for it to behave this way and have bugs.

Go to top
Re: graphics drivers question
Just popping in
Just popping in


See User information
@derfs
See issue posted on github, it was solved by changing rendering from something else to SDL.

Go to top
Re: graphics drivers question
Home away from home
Home away from home


See User information
@kas1e

RXPatchCard patches PCIGraphics.card's FindCard function.

You see RadeonHD.chip in PCIGraphics.card, because I initially started adding its PCI IDs to PCIGraphics.card. I initially had permission to distribute PCIGraphics.card with the driver, but that got revoked. So, I switched to patching the FindCard function.

There's a bit of a trick to getting it working while still allowing other cards to work. But, it allows us to add any graphics to the system, without having to replace PCIGraphics.card, or wait for Hyperion to release an update with new PCI IDs.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project