Skip navigation.
Home
The QNX Community Portal

View topic - Communication with graphics driver

Communication with graphics driver

Read-only archive of qnx.ddk (Writing device drivers for scanners, video card, optical mouse, etc) at inn.qnx.com

Communication with graphics driver

Postby Mike Gorchak » Wed Oct 24, 2007 11:42 am

Hello, All!

Is it possible to communicate somehow with loaded 2D graphics driver while
using Photon ? As far as I can understand mesa3d which is shipped with QNX
uses such interface to obtain 3D graphics interface if it is available in
loaded driver by calling devg_get_3dfuncs driver's function. Could anyone
tell me more about how to do that ? Really driver has devg_get_myown_funcs
call, which is responsible for obtaining pointers to few very important
functions to which common graphics DDK doesn't provide interface, for
example, controlling gamma, color LUTs, backlight control and other
chip-specific functions.

P.S. I've an interesting question about graphics driver functions
reenterability also. Is it need to provide mutex locking of the context and
core functions set of the graphics driver ? Because I can observe the
following behaviour: when "gears" mesa3d demo (shipped with QNX also) is
running, all works as suspected, but when I dragging "gears" window over
screen, graphics driver's context blit function can be called twice, the
second time, while first function call still executed, which causes 2D
accellerator lockup.

Blit function looks like this:

1. Setup Accellerator Context data: ROP, Chroma, etc
2. Prepear Graphics Engine command.
3. Execute GE command
4. Wait for command completeness

So when first call waiting in step 4 (window blit), the second call got
stuck in the step 3(GL data offscreen blit), because it is impossible to
execute another GE command, while the first command being processed.

This happen only with mesa3d demos shipped with QNX, other photon
applications works without race conditions in the graphics driver functions.
Looks like mesa3d driver obtaining not only 3d interface and a 2d interface
driver functions also and call them directly, disregarding on the current
graphics driver state.

Thanks in advance for the answers !

With best regards, Mike Gorchak. E-mail: mike@malva.ua
Mike Gorchak
 

Re: Communication with graphics driver

Postby Mike Gorchak » Thu Oct 25, 2007 6:19 pm

Hello, Mike!

MG> Is it possible to communicate somehow with loaded 2D graphics driver
MG> while using Photon ?

Sorry for importunity ...... any comments ?

With best regards, Mike Gorchak. E-mail: mike@malva.ua
Mike Gorchak
 

Re: Communication with graphics driver

Postby Brian Edmond » Fri Oct 26, 2007 4:28 pm

Officially QNX does not support loading the graphics driver directly. If
you want to do something like that and not use Photon then you should look
into the Advanced Graphics TDK. This is exactly what it was meant for. You
can use a thin library called "gf" and under the covers you are really just
loading the graphics driver. The newer Driver also have a method to add
your own driver functionality through the GF interface.

Mesa3D uses a Photon draw stream interpreter which is not documented. Also
Mesa3D is no longer supported and you should look into the OpenGL ES
implementation.

Brian

"Mike Gorchak" <mike@malva.ua> wrote in message
news:ffnavr$52$1@inn.qnx.com...
Hello, All!

Is it possible to communicate somehow with loaded 2D graphics driver while
using Photon ? As far as I can understand mesa3d which is shipped with QNX
uses such interface to obtain 3D graphics interface if it is available in
loaded driver by calling devg_get_3dfuncs driver's function. Could anyone
tell me more about how to do that ? Really driver has devg_get_myown_funcs
call, which is responsible for obtaining pointers to few very important
functions to which common graphics DDK doesn't provide interface, for
example, controlling gamma, color LUTs, backlight control and other
chip-specific functions.

P.S. I've an interesting question about graphics driver functions
reenterability also. Is it need to provide mutex locking of the context
and core functions set of the graphics driver ? Because I can observe the
following behaviour: when "gears" mesa3d demo (shipped with QNX also) is
running, all works as suspected, but when I dragging "gears" window over
screen, graphics driver's context blit function can be called twice, the
second time, while first function call still executed, which causes 2D
accellerator lockup.

Blit function looks like this:

1. Setup Accellerator Context data: ROP, Chroma, etc
2. Prepear Graphics Engine command.
3. Execute GE command
4. Wait for command completeness

So when first call waiting in step 4 (window blit), the second call got
stuck in the step 3(GL data offscreen blit), because it is impossible to
execute another GE command, while the first command being processed.

This happen only with mesa3d demos shipped with QNX, other photon
applications works without race conditions in the graphics driver
functions. Looks like mesa3d driver obtaining not only 3d interface and a
2d interface driver functions also and call them directly, disregarding on
the current graphics driver state.

Thanks in advance for the answers !

With best regards, Mike Gorchak. E-mail: mike@malva.ua
Brian Edmond
 

Re: Communication with graphics driver

Postby Mike Gorchak » Sun Oct 28, 2007 6:46 am

Hello, Brian!

BE> Officially QNX does not support loading the graphics driver directly.
BE> If you want to do something like that and not use Photon then you
BE> should look into the Advanced Graphics TDK.

No, I'm not interested nor in loading driver directly nor using AG TDK.

BE> Mesa3D uses a Photon draw stream interpreter which is not documented.

Could you tell me how Mesa3D obtains 3d function pointers which driver
spreads ? Through the draw stream interpreter also ?

BE> Also Mesa3D is no longer supported and you should look into the OpenGL
BE> ES implementation.

My question in that case will be how OpenGL ES implementation communicates
with graphics driver while using Photon ? If OpenGL ES working without
Photon only, loading driver directly, - it's easy and not interesting for
me.

Looks like I need to add few details in my post: It is exist my own graphics
driver and all that I need is to communicate somehow from Photon's
application to already loaded by Photon my own graphics driver. And I do not
want to add resource manager code into my graphics driver

With best regards, Mike Gorchak. E-mail: mike@malva.ua
Mike Gorchak
 

Re: Communication with graphics driver

Postby Brian Edmond » Wed Oct 31, 2007 2:13 pm

Could you tell me how Mesa3D obtains 3d function pointers which driver
spreads ? Through the draw stream interpreter also ?

To my knowledge this is not documented and is depricated in new versions.
You would have to get a sample from QNX I think.

My question in that case will be how OpenGL ES implementation communicates
with graphics driver while using Photon ? If OpenGL ES working without
Photon only, loading driver directly, - it's easy and not interesting for
me.

The OpenGL ES implementation runs with the AGTDK and does not run through
Photon. io-graphics does not know anything about it and does not
communicate with it. I originnally misunderstood what you were doing.

Looks like I need to add few details in my post: It is exist my own
graphics
driver and all that I need is to communicate somehow from Photon's
application to already loaded by Photon my own graphics driver. And I do
not
want to add resource manager code into my graphics driver

I don't think there is any information out there that will tell you how to
get a 3D driver working in Photon. You would need an example from QNX.

Sorry,
Brian
Brian Edmond
 

Re: Communication with graphics driver

Postby Mike Gorchak » Wed Oct 31, 2007 2:50 pm

Hello, Brian!

My question in that case will be how OpenGL ES implementation
communicates with graphics driver while using Photon ? If OpenGL ES
working without Photon only, loading driver directly, - it's easy and
not interesting for me.
BE> The OpenGL ES implementation runs with the AGTDK and does not run

BE> through Photon. io-graphics does not know anything about it and does
BE> not communicate with it. I originnally misunderstood what you were
BE> doing.

This is news for me, all that time I was sure that OpenGL ES works under
Photon, though I've never saw nor OpenGL ES nor AGTDK from QSSL. Thanks for
the information.

Looks like I need to add few details in my post: It is exist my own
graphics
driver and all that I need is to communicate somehow from Photon's
application to already loaded by Photon my own graphics driver. And I do
not want to add resource manager code into my graphics driver
BE> I don't think there is any information out there that will tell you how

BE> to get a 3D driver working in Photon. You would need an example from
BE> QNX.

Thank you very much for the explanation!

With best regards, Mike Gorchak. E-mail: mike@malva.ua
Mike Gorchak
 


Return to qnx.ddk

Who is online

Users browsing this forum: No registered users and 1 guest

cron