PDA

View Full Version : blit_setup(): Screen depth 15 not supported!



Forest
23rd August 2013, 06:45
when I opened framebuffer with ARGB8888,then run the sample ./simpledecoration -wqs,the program run well.
but when I opened framebuffer with ARGB1555,run the sample ./simpledecoration -wqs again,
got the following error:
blit_setup(): Screen depth 15 not supported!
Aborted

I changed the -depths to -depths all,and configured again, the same error.
I even changed the qscreenlinuxfb_qws.cpp. change QScreen::setPixelFormat(format) to
QScreen::setPixelFormat(QImage::Format_RGB16),stil l got the same error.
the Qt version is 4.8.2

why? Thanks a lot.
Forest

wysota
23rd August 2013, 07:35
Most likely the framebuffer doesn't support 15 bit displays.

Forest
23rd August 2013, 08:37
I cat the fb info.
cat /proc/graphics/hifb1
layer name :layer_1
Open count :2
Show state :ON
Start position (0, 0)
xres, yres (1280, 720)
xres_virtual, yres_virtual (1280, 1440)
xoffset, yoffset (0, 0)
fix.line_length :2560
Mem size: :8100 KB
Layer Scale (hw): :NO
ColorFormat: :ARGB1555
Alpha Enable :ON
AlphaChannel Enable :OFF
Alpha0, Alpha1 :255, 255
Alpha Global :128
Colorkey Enable :OFF
Colorkey value :0x0
Deflicker Mode: :NONE
Deflicker Level: :AUTO
Display Buffer mode :unkown
Displaying addr (register) :0x9092f000
display buffer[0] addr :0x9092f000
display buffer[1] addr :0x90af1000
displayrect (1280, 720)
screenrect (1280, 720)
device max resolution :1280, 720
IsNeedFlip(2buf) :NO
BufferIndexDisplaying(2buf) :0
refresh request num(2buf) :0
switch buf num(2buf) :0
union rect (2buf) (0,0,0,0)
canavas updated addr :0x9092f000
canavas updated (w, h) :1280,720
canvas width :1280
canvas height :720
canvas pitch :2560
canvas format :ARGB1555
IsCompress :NO

Added after 38 minutes:


Most likely the framebuffer doesn't support 15 bit displays.

Thanks,how to see whether the framebuffer support 15bit displays?
actually,I want to use ARGB1555,which is 16 bit.

wysota
23rd August 2013, 08:58
actually,I want to use ARGB1555,which is 16 bit.

Apparently the frame buffer thinks differently. Consult your framebuffer manual.

Forest
24th August 2013, 02:51
Apparently the frame buffer thinks differently. Consult your framebuffer manual.

The framebuffer only support ARGB8888 and ARGB1555,I tried setting QT to RGB565(force d=16 in qscreenlinuxfb_qws.cpp),the error disappeared,but the output color was strange.
How to set QT use ARGB1555?

wysota
24th August 2013, 08:00
Hmm... how exactly did you try setting the framebuffer into ARGB1555 in Qt? As far as I can see such format is not supported by Qt.

Forest
26th August 2013, 10:23
Hmm... how exactly did you try setting the framebuffer into ARGB1555 in Qt? As far as I can see such format is not supported by Qt.
hi,wysota,thanks for your help.I can not set the framebuffer into ARGB1555 in Qt.Such format is not supported by Qt,really?
but I find the format in qscreenlinuxfb_qws.cpp.
void QLinuxFbScreen::setPixelFormat(struct fb_var_screeninfo info)
{
const fb_bitfield rgba[4] = { info.red, info.green,
info.blue, info.transp };

QImage::Format format = QImage::Format_Invalid;

switch (d) {
case 15: {
const fb_bitfield rgb1555[4] = {{10, 5, 0}, {5, 5, 0},
{0, 5, 0}, {15, 1, 0}};
const fb_bitfield bgr1555[4] = {{0, 5, 0}, {5, 5, 0},
{10, 5, 0}, {15, 1, 0}};
if (memcmp(rgba, rgb1555, 3 * sizeof(fb_bitfield)) == 0) {
format = QImage::Format_RGB555;
} else if (memcmp(rgba, bgr1555, 3 * sizeof(fb_bitfield)) == 0) {
format = QImage::Format_RGB555;
pixeltype = QScreen::BGRPixel;
}
break;
}
QScreen::setPixelFormat(format);
}

we can see,Qt treats ARGB1555 as Format_RGB555.

wysota
26th August 2013, 10:32
And apparently it tries to set that as the framebuffer format, giving you 15 bits which is not supported by your hardware. It looks like either a bug in Qt, your code or in the driver.