Alex Vazquez
2016-07-06 10:17:23 UTC
Hi All!
I have a sama5d3 Explained with 4.3" LCD (TM4301).
My problem is the next:
After booting the system and try to draw first using DRM using planes don't
paint anything on the LCD displays, but from the second time is painted
correctly on the LCD.
I have seen a couple of things:
- After starting / sys/class/drm/card0/card0-LVDS-1/enabled is disabled
After running the program for the first time or paint something using the
framebuffer, the state becomes enabled and can be drawn correctly using
planes.
- If I don't use planes and use CRTC it works correctly.
- If I open the device with drmOpen() it works correctly. (works because
this function calls drmAvailable(). I tried to modify the code libdrm and
if we comment drmAvailable() does not work modetest using planes.)
Attached two codes: In the first I do not use drmAvailable() and the second
use drmAvailable().
I don't want to use drmOpen() because you have to indicate the driver and
want to do it generically using the function open().
I tried to enable drm from kernel_mode_setting (video=LVDS-1:480x272-16:e)
but don't work.
I am almost certain that the first time does not paint because DRM is
disabled and using planes seems not enabled properly until the sample
application is closed. Viewing code of drmAvailable() I can see that opens
and closes the device with what happens to an enabled state.
I'm not sure if it's a bug in the driver or libdrm or is my mistake...
Code:
http://pastebin.com/2jKvhFWD
http://pastebin.com/4aWi5e2X
Thanks!
Regards!
I have a sama5d3 Explained with 4.3" LCD (TM4301).
My problem is the next:
After booting the system and try to draw first using DRM using planes don't
paint anything on the LCD displays, but from the second time is painted
correctly on the LCD.
I have seen a couple of things:
- After starting / sys/class/drm/card0/card0-LVDS-1/enabled is disabled
After running the program for the first time or paint something using the
framebuffer, the state becomes enabled and can be drawn correctly using
planes.
- If I don't use planes and use CRTC it works correctly.
- If I open the device with drmOpen() it works correctly. (works because
this function calls drmAvailable(). I tried to modify the code libdrm and
if we comment drmAvailable() does not work modetest using planes.)
Attached two codes: In the first I do not use drmAvailable() and the second
use drmAvailable().
I don't want to use drmOpen() because you have to indicate the driver and
want to do it generically using the function open().
I tried to enable drm from kernel_mode_setting (video=LVDS-1:480x272-16:e)
but don't work.
I am almost certain that the first time does not paint because DRM is
disabled and using planes seems not enabled properly until the sample
application is closed. Viewing code of drmAvailable() I can see that opens
and closes the device with what happens to an enabled state.
I'm not sure if it's a bug in the driver or libdrm or is my mistake...
Code:
http://pastebin.com/2jKvhFWD
http://pastebin.com/4aWi5e2X
Thanks!
Regards!