There is no picture in lcd
-
What OS are you running on your target ?
-
The distribution would be more useful.
Also, are you running your application as root ?
What exact message are you getting on the console when you launch the application ?
-
The distribution would be more useful.
Also, are you running your application as root ?
What exact message are you getting on the console when you launch the application ?
@SGaist
yes, we run an application with root access.
we test with Qt/examples/qws/framebuffer, the message is below:root@mdm9607:/home# ./framebuffer
./framebuffer
The framebuffer device was opened successfully.Fixed screen info:
id: mdssfb_20000
smem_start: 0x8fc80000
smem_len: 155648
type: 0
type_aux: 0
visual: 2
xpanstep: 1
ypanstep: 1
ywrapstep: 0
line_length: 480
mmio_start: 0x0
mmio_len: 0
accel: 0The framebuffer device was mapped to memory successfully.
Successfully switched to graphics mode.
Variable screen info:
xres: 240
yres: 320
xres_virtual: 240
yres_virtual: 320
yoffset: 0
xoffset: 0
bits_per_pixel: 16
grayscale: 0
red: offset: 11, length: 5, msb_right: 0
green: offset: 5, length: 6, msb_right: 0
blue: offset: 0, length: 5, msb_right: 0
transp: offset: 0, length: 0, msb_right: 0
nonstd: 0
activate: 16
height: -1
width: -1
accel_flags: 0x0
pixclock: 0
left_margin: 0
right_margin: 0
upper_margin: 0
lower_margin: 0
hsync_len: 0
vsync_len: 0
sync: 0
vmode: 0Frame Buffer Performance test...
Average: 395 usecs
Bandwidth: 375.791 MByte/Sec
Max. FPS: 2531.646 fpsWill draw 3 rectangles on the screen,
they should be colored red, green and blue (in that order).
Done.
root@mdm9607:/home#l change the Qt/examples/qws/framebuffer/main.c
void drawRect_rgb16(int x0, int y0, int width, int height, int color)
{
const int bytesPerPixel = 2;
const int stride = finfo.line_length / bytesPerPixel;
const int red = (color & 0xff0000) >> (16 + 3);
const int green = (color & 0xff00) >> (8 + 2);
const int blue = (color & 0xff) >> 3;
const short color16 = blue | (green << 5) | (red << (5 + 6));short *dest = (short*)(frameBuffer) + (y0 + vinfo.yoffset) * stride + (x0 + vinfo.xoffset); int x, y; for (y = 0; y < height; ++y) { for (x = 0; x < width; ++x) { dest[x] = color16; } dest += stride; }//add by junzhang if(ioctl(fbFd, FBIOPAN_DISPLAY, &vinfo)!= 0) { return -1; }//}
there is nothing in lcd unless l add that code when l test with framebuffer example, the message is the same whether l add that code or not. -
The distribution would be more useful.
Also, are you running your application as root ?
What exact message are you getting on the console when you launch the application ?
@SGaist
l want to add
if(ioctl(fbFd, FBIOPAN_DISPLAY, &vinfo)!= 0)
{
return -1;
}/
to the code which update framebuffer in Qt,
it's mean that if something update in Qt, it will be write data to framebuffer, so, i will add that code in the function which update framebuffer.
it's that ok?
if ok, pls tell which function update framebuffer. thx. -
You likely should check the QLinuxFbScreen class.
-
Do you mean by adding you ioctl code ?
-
Ok
Then please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)