Query regarding initial mode setting by X server & /dev/dri/control
Hi,
I am new to DRM & KMS and I had seen your pdf named "why & how to use kms as your user space display api if choice". I have to understand initial mode setting flow of x server. So is it located in /xorg-server/hw/xfree86/modes/ or some where else? And, I don't know use control node. What's use of /dev/dri/control node?
I am using Ubuntu 12.04-3
Thanks in advance.
Akash Hajari.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Akash Hajari
Hi,
I am new to DRM & KMS and I had seen your pdf named "why & how to use kms as your user space display api if choice".
I have to understand initial mode setting flow of x server. So is it located in /xorg-server/hw/xfree86/modes/ or some where else?
currently it is in each different DDX driver (for example, xf86-video-intel, xf86-video-modesetting, etc)
Perhaps either tests/modetest/modetest.c (in libdrm tree) or kmscube
(https://github.com/robclark/kmscube/blob/master/kmscube.c) might be a simpler stand-alone example to look at (the former does only modeset, the later does modeset + gl)
Quoted 1 line
And, I don't know use control node. What's use of
/dev/dri/controlnode?
I don't think it is really used for much yet.. but mostly people just use drmOpen() in libdrm and it figures out what device file to open.
BR,
-R
Quoted 8 lines
Akash Hajari.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Rob,
Thanks for your answer and your example
(https://github.com/robclark/kmscube/blob/master/kmscube.c). I understood standalone KMS without x11 (as written by you @
http://lists.freedesktop.org/archives/dri-devel/2012-September/027348.html
).
But, looking at Linux Graphics stack
(http://en.wikipedia.org/wiki/File:Linux_Graphics_Stack_2013.svg), I am confused. Does libGL calls always directly calls libDRM and never to x-server?
If so, then how simple gl example ‘drawf.c’
(http://www.glprogramming.com/red/chapter08.html) using glBitmap() work well when x11 server running?
Also, when switching between multiple windows, x server running in backgroung, why drm_mode_addfb (DRM_IOCTL_MODE_ADDFB) getting called many times?
(as I think, fb might have already created for multiple windows.)
Thanks for your patience, Rob.
Akash Hajari.
Quoted 35 lines · Rob Clark
Quoted 6 lines · Akash Hajari
Hi,
I am new to DRM & KMS and I had seen your pdf named "why & how to use kms as
your user space display api if choice".
I have to understand initial mode setting flow of x server. So is it located in /xorg-server/hw/xfree86/modes/ or some where else?currently it is in each different DDX driver (for example, xf86-video-intel, xf86-video-modesetting, etc)
Perhaps either
tests/modetest/modetest.c(in libdrm tree) or kmscube
(https://github.com/robclark/kmscube/blob/master/kmscube.c) might be a simpler stand-alone example to look at (the former does only modeset, the later does modeset + gl)Quoted 1 line
And, I don't know use control node. What's use of
/dev/dri/controlnode?I don't think it is really used for much yet.. but mostly people just use
drmOpen()in libdrm and it figures out what device file to open.BR,
-RQuoted 8 lines
Akash Hajari.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Akash Hajari
Hi Rob,
Thanks for your answer and your example
(https://github.com/robclark/kmscube/blob/master/kmscube.c). I understood standalone KMS without x11 (as written by you @
http://lists.freedesktop.org/archives/dri-devel/2012-September/027348.html
).
Quoted 4 lines
But, looking at Linux Graphics stack
(http://en.wikipedia.org/wiki/File:Linux_Graphics_Stack_2013.svg), I am confused. Does libGL calls always directly calls libDRM and never to x-server?
you have two cases:
1) direct rendering: rendering commands (gl/gles) go directly to hw (via kernel execbuf/pushbuf/submit type ioctl, usually utilizing helpers/wrappers in libdrm_{intel,radeon,nouveau,freedreno,etc}. But presentation commands (egl/glx), ie. swapbuffers, etc, go via the display server (x11, wayland, etc).
2) indirect rendering (gl + glx only), everything goes to xserver
In either case, the KMS APIs are used by the display server. Direct vs indirect rendering is only about the rendering part of things.
Quoted 9 lines
If so, then how simple gl example ‘drawf.c’
(http://www.glprogramming.com/red/chapter08.html) usingglBitmap()work well when x11 server running?Also, when switching between multiple windows, x server running in backgroung, why
drm_mode_addfb(DRM_IOCTL_MODE_ADDFB) getting called many times?
(as I think, fb might have already created for multiple windows.)
no, that would be addfb getting called for every page flip. Technically you could just create the fb once and re-use it as you flip back to a previous buffer. But addfb/rmfb is relatively lightweight operation (the fb is just a wrapper for a GEM object, which itself is not re-allocated each frame).
BR,
-R
Quoted 40 lines
Thanks for your patience, Rob.
Akash Hajari.
Quoted 35 lines · Rob Clark
Quoted 6 lines · Akash Hajari
Hi,
I am new to DRM & KMS and I had seen your pdf named "why & how to use kms as
your user space display api if choice".
I have to understand initial mode setting flow of x server. So is it located in /xorg-server/hw/xfree86/modes/ or some where else?currently it is in each different DDX driver (for example, xf86-video-intel, xf86-video-modesetting, etc)
Perhaps either
tests/modetest/modetest.c(in libdrm tree) or kmscube
(https://github.com/robclark/kmscube/blob/master/kmscube.c) might be a simpler stand-alone example to look at (the former does only modeset, the later does modeset + gl)Quoted 1 line
And, I don't know use control node. What's use of
/dev/dri/controlnode?I don't think it is really used for much yet.. but mostly people just use
drmOpen()in libdrm and it figures out what device file to open.BR,
-RQuoted 8 lines
Akash Hajari.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel