DRM KMS Modesetting

David Herrmann dh.herrmann at googlemail.com
Mon Nov 14 12:25:56 PST 2011


Hi

I thought it's better to ask this question here again as it is easier
to comment via mail.

I tried writing a simple kms modesetting program. I have written it similar to:
http://virtuousgeek.org/blog/index.php/jbarnes?blog=2&title=writing_stanalone_programs_with_egl_and_
and wayland compositor-drm.c
and modetest.c in libdrm/tests

My problem is, the program compiles and runs fine, however, the
framebuffer is only displayed on the left quarter of the screen. The
vertical size is perfect but the horizontal size is just the left
quarter. I've double checked all the drm parameters and they are equal
to the ones in modetest.c and compositor-drm.c.

./modetest runs fine and also reports only a single mode and encoder
for my connector so I cannot choose the wrong mode, either.

The code is here:
https://gist.github.com/1364994
It should compile fine with:
gcc -o bin file.c `pkg-config --cflags --libs egl gbm gl`

I would be glad if someone could run this or look over the code.

Regards
David


More information about the dri-devel mailing list