Hi all,
I think i have found the root cause of all the problems
In dfb_fbdev_set_mode called from primaryInitLayer (fbdev.c1108) as
Listing from fdbdev.c : 1102
tmp.format = DSPF_RGB16;
tmp.buffermode = DLBM_FRONTONLY;
tmp.source.x = 0;
tmp.source.y = 0;
tmp.source.w = config->width;
tmp.source.h = config->height;
if (dfb_fbdev_set_mode( NULL, NULL, &tmp ))
NOTE: config->width & height have been setup in tmp.source.w & tmp.source.h
But the code inside dfb_fbdev_set_mode (Line fbdev.c:1647)
vxres = config->width;
vyres = config->height;
var.xoffset = source->x;
var.yoffset = source->y;
uses config->width & height for vxres & vyres !
Please note that "config", which is "tmp" in the caller has width & height
uninitialized.
But only tmp.source.w & h initialized.
This was the reason for the huge vxres & vyres values, which led to the
KERNEL PANIC
It was also the reason for the SurfaceCreate failure
I donot know what is the right way to call this API...but changing the lines
to this fixes the issues
vxres = source->w;
vyres = source->h;
i have attached a patch for tracking the exact change.
Please accept the patch in case if required.
On Wed, Mar 5, 2008 at 10:18 PM, Sriram Neelakandan <
[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have some issues with i810 gfxdriver on DirectFB-1.1.1.
>
> The mail is long .. please bare with me .. i have sequenced out as much
> info as possible to aid in debugging !
>
> I had the following issues:
>
> 1. I did not know the primary fb for the i810 is some how /dev/fb1 .. that
> took some time for me to figure out.
>
> [EMAIL PROTECTED] directfb]# *dmesg | grep -i i810*
> agpgart: Detected an Intel i810 Chipset.
> i810-i2c: Probe DDC1 Bus
> i810fb_init_pci: DDC probe successful
> fbcon: I810 (fb1) is primary device
> I810FB: fb1 : Intel(R) 810-DC100 Framebuffer Device v0.9.0
> I810FB: Video RAM : 4096K
> I810FB: Monitor : H: 30-71 KHz V: 50-160 Hz
> I810FB: Mode : [EMAIL PROTECTED]
>
> so i added in directfbrc - fbdev=/dev/fb1
>
>
> 2. After that i do* fbset -fb /dev/fb1 *
> mode "1024x768-84"
> # D: 94.500 MHz, H: 68.677 kHz, V: 84.997 Hz
> geometry 1024 768 1024 768 8
> timings 10582 208 48 36 1 96 3
> hsync high
> vsync high
> rgba 8/0,8/0,8/0,8/0
> endmode
>
> See the offsets are all ZEROs !!
>
> 3. So i manually set up the fb using
>
> *fbset -fb /dev/fb1 -xres 800 -yres 600 -depth 16 -rgba 5,6,5,0
>
> *after that
>
> * fbset -fb /dev/fb1 *
> mode "800x600-85"
> # D: 56.303 MHz, H: 53.724 kHz, V: 85.142 Hz
> geometry 800 600 800 600 16
> timings 17761 152 32 27 1 64 3
> hsync high
> vsync high
> rgba 5/11,6/5,5/0,0/0
> endmode
>
> i *pasted* this to the beginning of * /etc/fb.modes*
>
> 4. i run dfbinfo .. *kernel panic in EIP : i810fb_check_var*
>
> Reason ... fbdev.c : 1835 .. call to FBIOPUT_VSCREENINFO with huge values
> of Virtual RES
>
> (gdb) p var
> $9 = {xres = 1024, yres = 768, xres_virtual = 3214385416, yres_virtual =
> 13357344, xoffset = 0,
> yoffset = 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 = 2, height = 0, width = 0, accel_flags = 0, pixclock = 10582,
> left_margin = 208,
> right_margin = 48, upper_margin = 36, lower_margin = 1, hsync_len = 96,
> vsync_len = 3,
> sync = 3, vmode = 0, rotate = 0, reserved = {0, 0, 0, 0, 0}}
>
>
> So i changed fbdev.c:1801, fbdev.c:1802
>
> var.xres_virtual = mode->xres*3; //vxres; SRIRAM FIX
> var.yres_virtual = mode->yres*3; //vyres; SRIRAM FIX
> printf("\tSRIRAM FIX:(%d,%d,%d,%d)\n", var.xres, var.yres,
> var.xres_virtual, var.yres_virtual);
>
>
> No Kernel PANIC ... Issue fixed
>
> 5. Now i do dfbinfo i get this !!
>
> [EMAIL PROTECTED] directfb]# dfbinfo
>
> =======================| DirectFB 1.1.1 |=======================
> (c) 2001-2007 The DirectFB Organization (directfb.org)
> (c) 2000-2004 Convergence (integrated media) GmbH
> ------------------------------------------------------------
>
> (*) DirectFB/Core: Single Application Core. (2008-03-05 15:29)
> (*) Direct/Thread: Running 'VT Switcher' (CRITICAL, 17887)...
> (*) Direct/Thread: Running 'Keyboard Input' (INPUT, 17888)...
> (*) DirectFB/Input: Keyboard 0.9 (directfb.org)
> (*) Direct/Thread: Running 'PS/2 Input' (INPUT, 17889)...
> (*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
> (*) Direct/Thread: Running 'Linux Input' (INPUT, 17890)...
> (*) DirectFB/Input: Macintosh mouse button emulatio (1) 0.1 (directfb.org)
> (*) Direct/Thread: Running 'Linux Input' (INPUT, 17891)...
> (*) DirectFB/Input: AT Translated Set 2 keyboard (2) 0.1 (directfb.org)
> (*) Direct/Thread: Running 'Linux Input' (INPUT, 17892)...
> (*) DirectFB/Input: ImPS/2 Logitech Wheel Mouse (3) 0.1 (directfb.org)
> (*) Direct/Thread: Running 'Linux Input' (INPUT, 17893)...
> (*) DirectFB/Input: Power Button (FF) (4) 0.1 (directfb.org)
> (*) Direct/Thread: Running 'Linux Input' (INPUT, 17894)...
> (*) DirectFB/Input: Power Button (CM) (5) 0.1 (directfb.org)
> (*) DirectFB/Genefx: MMX detected and enabled
> (*) DirectFB/Graphics: Intel 810/810E/810-DC100/815 0.5 (Tony Daplas)
> SRIRAM FIX:(800,600,2400,1800)
> SRIRAM FIX:(1024,768,3072,2304)
> SRIRAM FIX:(800,600,2400,1800)
> (*) DirectFB/Core/WM: Default 0.3 (directfb.org)
> (*) FBDev/Mode: Testing 800x600 RGB16
> SRIRAM FIX:(800,600,2400,1800)
> (!) DirectFB/DirectFBCreate: Setting desktop resolution to 0x0 failed!
> -> Using default resolution.
> (!) DirectFB/DirectFBCreate: Setting desktop format failed!
> -> Using default format.
> (!) DirectFB/DirectFBCreate: Setting desktop buffer mode failed!
> -> No virtual resolution support or not enough memory?
> Falling back to system back buffer.
> (*) FBDev/Mode: Testing 800x600 RGB16
> SRIRAM FIX:(800,600,2400,1800)
> (*) FBDev/Mode: Preparing switch to 800x600 RGB16
> (*) FBDev/Mode: Testing 800x600 RGB16
> SRIRAM FIX:(800,600,2400,1800)
> (*) FBDev/Mode: Preparing switch to 800x600 RGB16
> (*) FBDev/Mode: Testing 800x600 RGB16
> SRIRAM FIX:(800,600,2400,1800)
> (*) FBDev/Mode: Preparing switch to 800x600 RGB16
> (*) FBDev/Mode: Testing 800x600 RGB16
> SRIRAM FIX:(800,600,2400,1800)
> (*) FBDev/Mode: Preparing switch to 800x600 RGB16
> (*) FBDev/Mode: Testing 800x600 RGB16
> SRIRAM FIX:(800,600,2400,1800)
> (*) FBDev/Mode: Preparing switch to 800x600 RGB16
> (*) FBDev/Surface: Allocated 800x600 16bit RGB16 buffer at offset 0 and
> pitch 1600.
> (*) FBDev/Mode: (Post)Setting 800x600 RGB16
> SRIRAM FIX:(800,600,2400,1800)
> (*) FBDev/Mode: Switched to 800x600 (2400x873) at 16 bit RGB16 (wanted
> RGB16).
> (*) FBDev/Mode: Testing 800x600 RGB16
> SRIRAM FIX:(800,600,2400,1800)
> (*) FBDev/Mode: Preparing switch to 800x600 RGB16
> (*) FBDev/Mode: (Post)Setting 800x600 RGB16
>
>
> Screen (00) FBDev Primary Screen (primary screen)
> Caps: VSYNC POWER_MANAGEMENT
>
> Layer (00) FBDev Primary Layer (primary layer)
> Type: GRAPHICS
> Caps: SURFACE BRIGHTNESS CONTRAST SATURATION
>
> Layer (01) Intel 810/815 Overlay
> Type: GRAPHICS VIDEO STILL_PICTURE
> Caps: SURFACE OPACITY SCREEN_LOCATION DEINTERLACING
> DST_COLORKEY BRIGHTNESS CONTRAST SATURATION SCREEN_POSITION SCREEN_SIZE
>
>
> Input (00) Keyboard (primary keyboard)
> Type: KEYBOARD
> Caps: KEYS
>
> Input (01) IMPS/2 Mouse (primary mouse)
> Type: MOUSE
> Caps: AXES BUTTONS
> Max. Axis: 2
> Max. Button: 2
>
> Input (10) Macintosh mouse button emulatio
> Type: MOUSE
> Caps: AXES BUTTONS
> Max. Axis: 1
> Max. Button: 2
>
> Input (11) AT Translated Set 2 keyboard
> Type: KEYBOARD
> Caps: KEYS
>
> Input (12) ImPS/2 Logitech Wheel Mouse
> Type: MOUSE
> Caps: AXES BUTTONS
> Max. Axis: 2
> Max. Button: 2
>
> Are these fine ?
> *(!) DirectFB/DirectFBCreate: Setting desktop resolution to 0x0 failed!
> -> Using default resolution.
> (!) DirectFB/DirectFBCreate: Setting desktop format failed!
> -> Using default format.
> (!) DirectFB/DirectFBCreate: Setting desktop buffer mode failed!
> -> No virtual resolution support or not enough memory?
> Falling back to system back buffer.*
>
>
>
> DIRECTFBRC -- For reference ---
>
>
> [EMAIL PROTECTED] directfb]# cat /usr/local/etc/directfbrc
> fbdev=/dev/fb1
> fatal-level=none
>
>
> Whats going wrong here ? HELP PLEASE !!!
>
> --
> Sriram Neelakandan
> Author - Embedded Linux System Design And Development (
> http://tinyurl.com/2doosu)
--
Sriram Neelakandan
Author - Embedded Linux System Design And Development (
http://tinyurl.com/2doosu)
*** ../orig/DirectFB-1.1.1/systems/fbdev/fbdev.c 2007-12-15
18:00:28.000000000 +0530
--- systems/fbdev/fbdev.c 2008-03-06 13:19:41.000000000 +0530
*************** dfb_fbdev_set_mode( CoreSurface
*** 1642,1649 ****
if (source->h != mode->yres && shared->fix.ypanstep == 0 &&
shared->fix.ywrapstep == 0)
return DFB_UNSUPPORTED;
! vxres = config->width;
! vyres = config->height;
var.xoffset = source->x;
var.yoffset = source->y;
--- 1642,1649 ----
if (source->h != mode->yres && shared->fix.ypanstep == 0 &&
shared->fix.ywrapstep == 0)
return DFB_UNSUPPORTED;
! vxres = source->w;
! vyres = source->h;
var.xoffset = source->x;
var.yoffset = source->y;
*************** dfb_fbdev_set_mode( CoreSurface
*** 1800,1805 ****
--- 1800,1806 ----
var.yres = mode->yres;
var.xres_virtual = vxres;
var.yres_virtual = vyres;
+ printf("\tFIX:(%d,%d,%d,%d)\n", var.xres, var.yres, var.xres_virtual,
var.yres_virtual);
var.pixclock = mode->pixclock;
var.left_margin = mode->left_margin;
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev