Call function from the accelerant

I would like to add my non-standard functions to the video accelerant.It does not matter what these functions are made, but I want call them from my userland apps.

Where can I see an example code or manual how can I call a function that is contained in the accelerant ?
Maybe is there a part of code in the haiku, where is it shown?

Does this help?

I’m not that good in the accelerants, but why? Think that it can have side effect as you and Haiku will fight for controll (Some one that know this stuff can probably tel us if it’s so)

Think the kits are for this kind of stuff and if it’s not perhaps time to expand one of them :slight_smile:


1 Like

I looked there, but understood only about the standard hooks.

The mainly for debugging. I want direct access to graphics card, send command without rebuild accelerant.

Accelerant is userland driver. How to expand its capabilities for specific hardware?

Ok then you have better controll than me :slight_smile:. But that would be great to add so other can use as well :slight_smile:. are there any specific driver you was thinking of or the main accelerant?

The accelerant interface is not really designed to add arbitrary hooks this way.

For the intel driver, we have a specific kernel debugger command (ie_reg) that allows reading and writing video card registers. For the accelerant it depends what you are doing: if you are using it in app_server, maybe the easiest way to reach it is to have some kind of IPC in place in your accelerant, either run a BLooper to receive BMessages, or open a socket. Then your test application can send messages there.

If you do your tests without app_server, I assume you will load your accelerant with load_add_on and at that point you can access any function and variable in it directly.

All needed hooks for user already exist in the accelerant. Kernel mode command like ie_reg is good for debugging. I looked at how it was done in the intel driver.