DRM KMS Modesetting
dh.herrmann at googlemail.com
Mon Nov 14 12:47:09 PST 2011
On Mon, Nov 14, 2011 at 9:38 PM, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> On Mon, 14 Nov 2011 21:25:56 +0100
> David Herrmann <dh.herrmann at googlemail.com> wrote:
>> 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:
>> 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:
>> 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.
> Hm I get a full white screen with a gray triangle in the lower right
> hand corner.
Yes, thats what should be displayed.
> I had to modify the resolution the test was searching for
> to 1920x1200 instead of 1024x600 since I tested on a DP attached
> monitor, and fix the connector id, but other than that it seemed to
> work fine.
Thanks for testing. At least my code seems right now, but I still
cannot get it to work on my machine. The output of modetest is:
There is only one connected connector+encoder+mode so I don't know
where the problem exactly is. Are there any debug options? Is it
possible to query the EGLImage for width/height?
> Jesse Barnes, Intel Open Source Technology Center
More information about the dri-devel