[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Ltib] Re: LPC3250 board, X server fault: Invalid argument
From: |
Daniel Widyanto |
Subject: |
RE: [Ltib] Re: LPC3250 board, X server fault: Invalid argument |
Date: |
Thu, 6 Aug 2009 19:19:59 +0800 |
Hi Dmitry,
Quote:
k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &var);
if (k < 0)
{
fprintf (stderr, "error: %s\n", strerror (errno));
return FALSE;
}
means:
Call FBIOPUT_VSCREENINFO service from framebuffer driver (or any driver that's
pointed by priv->fd). The arguments that the service needs (and/or the output
of the service) are put in 'var'. But the frame buffer driver said that the
'var' argument was invalid. Hence, it returned k < 0.
I think the frame buffer FBIOPUT_VSCREENINFO service has changed their
parameters (function signature) since the last X-server include them.
Since you've known your 'var' structure, you can search for frame buffer's
IOCTL function inside the kernel and match the argument signature of
FBIOPUT_VSCREENINFO with 'var' signature.
Happy hunting =)
Cheers,
-daniel
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Dmitry Vinokurov
Sent: Thursday, August 06, 2009 6:24 PM
To: address@hidden
Subject: [Ltib] Re: LPC3250 board, X server fault: Invalid argument
Some news again.
Executing 'Xfbdev -nolisten tcp -ac -mouse mouse -keybd keyboard'
results in:
===
Warning: mode not found, using default
error: Invalid argument
Fatal server error:
no screens found
===
If mode is set (as Daniel advised), 'Xfbdev -nolisten tcp -ac -mouse
mouse -keybd keyboard -screen 320x240x18' (where 18 (6 for each R,G,B)
is depth for my display, according to documentation) results in:
===
error: Invalid argument
Fatal server error:
no screens found
===
Settings resolution to 240x320 or something other lead to mode not found
warning.
I've digged a little in the source and found function throwing an error
-- it is fbdevScreenInitialize. Here is fragment of this function,
containing error (as I think):
===
if (k < 0 || (t->horizontal != var.xres || t->vertical != var.yres))
fbdevConvertMonitorTiming (t, &var);
var.activate = FB_ACTIVATE_NOW;
var.bits_per_pixel = screen->fb[0].depth;
var.nonstd = 0;
var.grayscale = 0;
k = ioctl (priv->fd, FBIOPUT_VSCREENINFO, &var);
if (k < 0)
{
fprintf (stderr, "error: %s\n", strerror (errno));
return FALSE;
}
===
I think error is here because before this code 'struct fb_var_screeninfo
var' was initialized using 'k = ioctl (priv->fd, FBIOGET_VSCREENINFO,
&var);' and all changes of 'var' structure is located exactly in this
code. By the way, 'fbdevConvertMonitorTiming' executes because var.xres
= 240 but t->horizontal = 320 and var.yres = 320 but t->vertical = 240
Adding 'fprintf(stderr, "%dx%dx%d\n", var.xres, var.yres,
var.bits_per_pixel);' before 'k = ioctl (priv->fd, FBIOPUT_VSCREENINFO,
&var);' give '320x240x18'.
Have anybody ideas about this error? I've completely stuck at this point.
--
Best Regards,
Dmitry Vinokurov
<address@hidden>