2008-08-13 12:23:32     DirectFB problem with lq043 and bf537

Document created by Aaronwu Employee on Aug 8, 2013
Version 1Show Document
  • View in full screen mode

2008-08-13 12:23:32     DirectFB problem with lq043 and bf537

Cyril HAENEL (FRANCE)

Message: 60415   

 

Hi all,

 

I have troubles with directFB for my BF537 based board.

I have successfully built directFB1.1.1 for blackfin with the uclinux2008 distribution but there is a crash when I lauch any DirectFB application :

 

"Undefined instruction

- May be used to emulate instructions that are not defined for a particular

processor implementation."

 

My LQ043 framebuffer homemade driver works well because I can print jpeg picture on the screen with jpegview).

 

I added the complete log of the error at the end of this message

 

Any idea ?

 

Regards,

 

Cyril HAENEL

 

 

=======================| 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-08-08 10:22)

(*) Direct/Thread: Running &apsPS/2 Input&aps (INPUT, 217)...

(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)

Direct/Modules: Could not open module directory

`/usr/lib/directfb-1.1-0/gf!

--> No such file or directory

(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)

(*) DirectFB/Core/WM: Default 0.3 (directfb.org)

(*) FBDev/Mode: Testing 320x240

DirectFB/DirectFBCreate: Setting desktop resolution to 320x240 failed!

-> Using default resolution.

DirectFB/DirectFBCreate: Setting desktop format faUled!

-> 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 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

Undefined instruction

- May be used to emulate instructions that are not defined for

a particular processor implementation.

Defered Exception context

CURRENT PROCESS:

COMM=df_texture PID=215

TEXT = 0x00260000-0x00265b00 DATA = 0x033a0b00-0x033a0f8c

BSS = 0x033a0f8c-0x002c0000 USER-STACK = 0x002dfea0

 

return address: [0x003b5d58]; contents of:

0x003b5d30: 0000 0000 002c 0000 5830 003b c158 0026

0x003b5d40: c298 0026 c3d4 0026 c9dc 0026 cb0c 0026

0x003b5d50: c510 0026 c778 0026 [c8ac] 0026 cc44 0026

0x003b5d60: 0010 0000 5d74 003b 0003 0000 0001 0000

 

SEQUENCER STATUS: Not tainted

SEQSTAT: 00000021 IPEND: 0030 SYSCFG: 0006

HWERRCAUSE: 0x0

EXCAUSE : 0x21

RETE: <0x00000000> /* Maybe null pointer? */

RETN: <0x00270000> [ /bin/busybox + 0x56000 ]

RETX: <0x003b5d58> [ df_texture + 0x1d58 ]

RETS: <0x003c4444> [

/usr/lib/directfb-1.1-0/systems/libdirectfb_fbdev.so

+ 0x]

PC : <0x003b5d58> [ df_texture + 0x1d58 ]

DCPLB_FAULT_ADDR: <0x00a35c44> [ df_texture + 0xc44 ]

ICPLB_FAULT_ADDR: <0x003b5d58> [ df_texture + 0x1d58 ]

 

PROCESSOR STATE:

R0 : 002aef0c R1 : 0003fc00 R2 : 000003c0 R3 : 00000001

R4 : 002afba8 R5 : 00000110 R6 : 000001e0 R7 : 00352500

P0 : 00a35f78 P1 : 003b5d58 P2 : 002afba8 P3 : 033c1790

P4 : 00a35c48 P5 : 00000110 FP : 002df804 SP : 0026ff24

LB0: 0091ef29 LT0: 0091ef26 LC0: 00000000

LB1: 003c4423 LT1: 003c4422 LC1: 00000000

B0 : 00000448 L0 : 00000000 M0 : 00000000 I0 : 002df7ec

B1 : 000000e0 L1 : 00000000 M1 : 00000000 I1 : 00000000

B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 00000000

B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 0034ec20

A0.w: 00072c00 A0.x: 00000000 A1.w: 00005f3a A1.x: 00000000

USP : 002df678 ASTAT: 02003025

 

Stack from 0026ff08:

ffc00014 ffa00660 001b856c 001b856c 00000003 0000004e 00007848

003b5d58

00000030 00000021 00000000 00270000 003b5d58 003b5d58 003c4444

002aef0c

02003025 003c4423 0091ef29 003c4422 0091ef26 00000000 00000000

00005f3a

00000000 00072c00 00000000 00000000 00000000 000000e0 00000448

00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000

0034ec20

00000000 00000000 002df7ec 002df678 002df804 00000110 00a35c48

033c1790

 

Call Trace:

[<0003fc00>] _locks_mandatory_locked+0xc/0x3c

 

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: PrepUring switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Surface: Allocated 480x272 16bit RGB16 buffer at offset 0 and

pitch 9.

(*) FBDev/Mode: (Post)Setting 480x272 RGB16

(*) FBDev/Mode: Switched to 480x272 (480x272) at 16 bit RGB16 (wanted

RGB16). ndefined instruction

- May be used to emulate instructions that are not defined for

a particular processor implementation.

Defered Exception context

CURRENT PROCESS:

COMM=df_texture PID=215

TEXT = 0x00260000-0x00265b00 DATA = 0x033a0b00-0x033a0f8c

BSS = 0x033a0f8c-0x002c0000 USER-STACK = 0x002dfea0

 

return address: [0x003b5cf6]; contents of:

0x003b5cd0: 0000 0000 0000 0000 5ce4 003b 0000 0000

0x003b5ce0: 001c 0000 c510 0026 0000 0000 0000 0000

0x003b5cf0: 0000 0000 5d00 [003b] 0000 0000 001c 0000

0x003b5d00: c778 0026 0000 0000 0000 0000 0000 0000

 

SEQUENCER STATUS: Not tainted

SEQSTAT: 00060021 IPEND: 0030 SYSCFG: 0006

HWERRCAUSE: 0x18

EXCAUSE : 0x21

RETE: <0x00000000> /* Maybe null pointer? */

RETN: <0x00270000> [ /bin/busybox + 0x56000 ]

RETX: <0x003b5cf6> [ df_texture + 0x1cf6 ]

RETS: <0x003c6ab8> [

/usr/lib/directfb-1.1-0/systems/libdirectfb_fbdev.so

+ 0x]

PC : <0x003b5cf6> [ df_texture + 0x1cf6 ]

DCPLB_FAULT_ADDR: <0x00a35a0c> [ df_texture + 0xa0c ]

ICPLB_FAULT_ADDR: <0x003b5cf6> [ df_texture + 0x1cf6 ]

 

PROCESSOR STATE:

R0 : 002aef0c R1 : 002aeef4 R2 : 002aef00 R3 : 00000001

R4 : 003c9dcc R5 : 003c98c8 R6 : 002aee64 R7 : 002b4260

P0 : 00a357b8 P1 : 003b5ce8 P2 : 002b5890 P3 : 033c1790

P4 : 01ea0728 P5 : 002aeef4 FP : 002df2e0 SP : 0026ff24

LB0: 0091ef29 LT0: 0091ef26 LC0: 00000000

LB1: 0091cf7b LT1: 0091cf7a LC1: 00000000

B0 : 00000448 L0 : 00000000 M0 : 00000000 I0 : 002bde94

B1 : 000000e0 L1 : 00000000 M1 : 00000000 I1 : 00000000

B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 00000000

B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 0034ec20

A0.w: 00072c00 A0.x: 00000000 A1.w: 00005f3a A1.x: 00000000

USP : 002df2d4 ASTAT: 02003005

 

Stack from 0026ff08:

ffc00014 ffa00660 001b8570 001b8570 00000001 003c9dcc 00007848

003b5cf6

00000030 00060021 00000000 00270000 003b5cf6 003b5cf6 003c6ab8

002aef0c

02003005 0091cf7b 0091ef29 0091cf7a 0091ef26 00000000 00000000

00005f3a

00000000 00072c00 00000000 00000000 00000000 000000e0 00000448

00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000

0034ec20

00000000 00000000 002bde94 002df2d4 002df2e0 002aeef4 01ea0728

033c1790

 

Call Trace:

 

[ 215: 0.000] --> Caught signal 4 (at 0x3b5d58, illegal opcode)

<-- (!!!) *** WARNING [still objects in &apsLayer Region Pool&aps] ***

[../../../Direct]

(!!!) *** WARNING [still objects in &apsLayer Context Pool&aps] ***

[../../../Direc]

[ 215: 0.010] --> Caught signal 4 (at 0x3b5cf6, illegal opcode)

<-- Illegal instruction

--

 

TranslateQuoteReplyEditDelete

 

 

2008-08-13 12:40:20     Re: DirectFB problem with lq043 and bf537

Mike Frysinger (UNITED STATES)

Message: 60417   

 

i found directfb tends to crash when the format it supports is not supported by the hardware rather than gracefully shutting down

 

check your /etc/directfbrc and that the video format your LCD uses is actually supported by DirectFB ...

QuoteReplyEditDelete

 

 

2008-09-05 11:19:03     Re: DirectFB problem with lq043 and bf537

Thomas ARVIEU (FRANCE)

Message: 61704   

 

Hi all,

 

I'm working with Cyril Haenel on the blackfin 537. As Cyril said, we are using directfb with the LQ043 TFT screen as a dashboard for an electrical vehicle. I have seen on your website and on youtube that you have successfully ported directfb on blackfin 548 with LQ043 screen. As Cyril said the directfb examples crash with Undefined instruction. Mike Frysinger say that it could come from directfbrc and the resolution we use. I checked directfbrc and there is only "mode = 480x272 and depth=16" in our directfbrc file. 480x272 is to my knowledge the resolution of the LQ043. I'm probably missing something but what? Does the developpers who ported directfb on BF548 (or anyone else) have an idea?  Did you use resolution = 480x272?

 

Thank you for your help.

TranslateQuoteReplyEditDelete

 

 

2008-09-05 11:36:00     Re: DirectFB problem with lq043 and bf537

Mike Frysinger (UNITED STATES)

Message: 61705   

 

it is most likely the pixel format screwing things up, not the resolution.  the kernel dump is just noise -- ignore it.  run `dmesg -n 1` so it doesnt show up on your console, or run the directfb app from a telnet session.  then focus on the actual output coming from DirectFB.

QuoteReplyEditDelete

 

 

2008-09-05 11:54:11     Re: DirectFB problem with lq043 and bf537

Thomas ARVIEU (FRANCE)

Message: 61709   

 

Ok it's done. I run dmesg -n 1 and then launch df_texture one of the directfb examples.

 

First error :

 

root:/> ./usr/bin/df_texture

 

     =======================|  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-08-12 14:06)

(*) Direct/Thread: Running 'VT Switcher' (CRITICAL, 216)...

[  210:    0.000] --> Caught signal 4 (at 0xdbdfb0, illegal opcode) <--

Illegal instruction

 

 

I skip this error with the dfb option "no-vt"

 

root:/> ./usr/bin/df_texroot:/> ./usr/bin/df_texture --dfb:no-vt

 

     =======================|  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-08-12 14:06)

(*) Direct/Thread: Running 'PS/2 Input' (INPUT, 223)...

(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)

Direct/Modules: Could not open module directory `/usr/lib/directfb-1.1-0/gf!

    --> No such file or directory

(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)

(*) DirectFB/Core/WM: Default 0.3 (directfb.org)

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Surface: Allocated 480x272 16bit RGB16 buffer at offset 0 and pitch 9.

(*) FBDev/Mode: (Post)Setting 480x272 RGB16

(*) FBDev/Mode: Switched to 480x272 (480x272) at 16 bit RGB16 (wanted RGB16).

[  221:    0.000] --> Caught signal 4 (at 0xd82024, illegal opcode) <--

(!!!)  *** WARNING [still objects in 'Layer Region Pool'] *** [../../../Direct]

(!!!)  *** WARNING [still objects in 'Layer Context Pool'] *** [../../../Direc]

[  221:    0.008] --> Caught signal 4 (at 0xd81cea, illegal opcode) <--

Illegal instruction

ture --dfb:no-vt

 

and then

 

 

 

 

 

 

 

 

 

 

 

 

TranslateQuoteReplyEditDelete

 

 

2008-09-09 06:35:09     Re: DirectFB problem with lq043 and bf537

Thomas ARVIEU (FRANCE)

Message: 61828   

 

I looked in the bf54x-lq043.c code and see some things about RGB666 and RGB888

 

/* EPPI Control register configuration value for RGB out

161  * - EPPI as Output

162  * GP 2 frame sync mode,

163  * Internal Clock generation disabled, Internal FS generation enabled,

164  * Receives samples on EPPI_CLK raising edge, Transmits samples on EPPI_CLK falling edge,

165  * FS1 & FS2 are active high,

166  * DLEN = 6 (24 bits for RGB888 out) or 5 (18 bits for RGB666 out)

167  * DMA Unpacking disabled when RGB Formating is enabled, otherwise DMA unpacking enabled

168  * Swapping Enabled,

169  * One (DMA) Channel Mode,

170  * RGB Formatting Enabled for RGB666 output, disabled for RGB888 output

171  * Regular watermark - when FIFO is 100% full,

172  * Urgent watermark - when FIFO is 75% full

173  */

 

Does this means that the LQ043 only support this format?

 

The driver we use is not the same (because we use a bf537), it's the driver developped by Cyril from the bf537-lq035 driver. I am looking into this one about pixel format.

 

 

TranslateQuoteReplyEditDelete

 

 

2008-09-10 08:35:29     Re: DirectFB problem with lq043 and bf537

Thomas ARVIEU (FRANCE)

Message: 61889   

 

Hi all,

 

Always this problem of pixel format.

 

I looked in the Directfbrc man and see that the possible pixel format for directfb are

 

pixelformat=<pixelformat>

    Sets the default pixel format. This is similar to the depth parameter described above but allows more fine-grained control. Possible values for pixelformat are LUT8, RGB332, RGB16, RGB24 and RGB32. Some drivers may also support the more exotic pixel formats A8, ALUT44, ARGB, ARGB1555, I420, UYVY, YUY2 and YV12.

 

In the bf54x-lq043.c files there is some line about pixel who speak about RGB666 and RGB888 format

 

What format should we use in our bf53x-lq043 driver, with how many bit per pixel : 18? (RGB666) 24? (RGB888) another?

 

What did you use when porting directfb to the blackfin bf548 with LQ43 !

 

Thanks a lot for our help !

TranslateQuoteReplyEditDelete

 

 

2008-09-10 09:43:54     Re: DirectFB problem with lq043 and bf537

Thomas ARVIEU (FRANCE)

Message: 61891   

 

Hi all,

 

Always this problem of pixel format.

 

I looked in the Directfbrc man and see that the possible pixel format for directfb are

 

pixelformat=<pixelformat>

    Sets the default pixel format. This is similar to the depth parameter described above but allows more fine-grained control. Possible values for pixelformat are LUT8, RGB332, RGB16, RGB24 and RGB32. Some drivers may also support the more exotic pixel formats A8, ALUT44, ARGB, ARGB1555, I420, UYVY, YUY2 and YV12.

 

In the bf54x-lq043.c files there is some line about pixel who speak about RGB666 and RGB888 format

 

What format should we use in our bf53x-lq043 driver, with how many bit per pixel : 18? (RGB666) 24? (RGB888) another?

 

What did you use when porting directfb to the blackfin bf548 with LQ43 !

 

Thanks a lot for your help !

 

---

TranslateQuoteReplyEditDelete

 

 

2008-09-10 10:54:27     Re: DirectFB problem with lq043 and bf537

Robin Getz (UNITED STATES)

Message: 61893   

 

Tomas:

 

The pixel format is defined in:

 

rgetz@imhotep:~/blackfin/trunk/uClinux-dist> find vendors/AnalogDevices/ -name directfbrc

vendors/AnalogDevices/BF548-EZKIT/directfbrc

vendors/AnalogDevices/BF527-EZKIT/directfbrc

 

 

and installed via:

 

rgetz@imhotep:~/blackfin/trunk/uClinux-dist> grep directfbrc vendors/AnalogDevices/*/Makefile

vendors/AnalogDevices/BF527-EZKIT/Makefile:     $(ROMFSINST) -o $(CONFIG_LIB_DIRECTFB_FORCE)$(CONFIG_LIB_DIRECTFB) /etc/directfbrc

vendors/AnalogDevices/BF548-EZKIT/Makefile:     $(ROMFSINST) -o $(CONFIG_LIB_DIRECTFB_FORCE)$(CONFIG_LIB_DIRECTFB) /etc/directfbrc

 

 

-Robin

QuoteReplyEditDelete

 

 

2008-09-10 11:30:14     Re: DirectFB problem with lq043 and bf537

Thomas ARVIEU (FRANCE)

Message: 61894   

 

Ok!

 

I just copied vendors/AnalogDevices/BF548-EZKIT/directfbrc copied to /romfs/etc/ then make image and launched ./usr/bin/df_texture.

 

I still have an error with vt-switch that I skip with the dfb option no-vt.

 

Direct/Thread: Running 'VT Switcher' (CRITICAL, 218)...Undefined instruction

- May be used to emulate instructions that are not defined for

   a particular processor implementation.

 

After that directfb try to use the parameters written in directfbrc : resolution=480x272 depth=24 pixelformat=RGB24 but there is still some problems :

 

 

 

    =======================|  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-08-12 14:06)

(*) Direct/Thread: Running 'PS/2 Input' (INPUT, 225)...

(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)

Direct/Modules: Could not open module directory `/usr/lib/directfb-1.1-0/gf!

    --> No such file or directory

(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)

(*) DirectFB/Core/WM: Default 0.3 (directfb.org)

(*) FBDev/Mode: Testing 480x272 RGB24

DirectFB/DirectFBCreate: Setting desktop resolution to 480x272 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 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

NULL pointer access (probably)

Defered Exception context

 

 

 

Call Trace:

 

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Mode: Testing 480x272 RGB16

(*) FBDev/Mode: Preparing switch to 480x272 RGB16

(*) FBDev/Surface: Allocated 480x272 16bit RGB16 buffer at offset 0 and pitch 9.

(*) FBDev/Mode: (Post)Setting 480x272 RGB16

(*) FBDev/Mode: Switched to 480x272 (480x272) at 16 bit RGB16 (wanted RGB16).

[  223:    0.000] --> Caught signal 11 (unknown origin) <--

 

Any ideas where this could come from?

 

What about our screen driver which has is bit per pixel defined to 16? It works very well with jpegview, but what about directfb?

 

Thanks a lot

TranslateQuoteReplyEditDelete

 

 

2008-09-10 19:41:01     Re: DirectFB problem with lq043 and bf537

Robin Getz (UNITED STATES)

Message: 61914   

 

Tomas:

 

The person who figured out most of this stuff (who wrote alot of the video drivers) is out on vacation this week - he will be back by Monday.

 

-Robin

QuoteReplyEditDelete

 

 

2008-09-15 07:44:29     Re: DirectFB problem with lq043 and bf537

Michael Hennerich (GERMANY)

Message: 62167   

 

You said you’re using a modified version of the lq043 driver on BF537.

So I assume your connected PPI 16-bit to the LQ043.

 

Then your directfbrc should include following lines:

 

mode=480x272

depth=16

pixelformat=RGB16

 

-Michael

 

QuoteReplyEditDelete

 

 

2008-09-18 11:17:51     Re: DirectFB problem with lq043 and bf537

Thomas ARVIEU (FRANCE)

Message: 62388   

 

Hi,

 

Thanks all for your help.

 

I saw your post just 10 mins ago.  I checked my directfbrc files and  these 3 lines are into. In fact there is only these lines.

 

I cannot undertand from where come this crash.

 

 

TranslateQuoteReplyEditDelete

 

 

2008-10-13 13:33:26     Re: DirectFB problem with lq043 and bf537

David Calvery (UNITED STATES)

Message: 63573   

 

I have a similar problem on the BF548 EZKit with my application that uses DirectFB 1.1.1.

 

Booting from either flash or ram with the uImage.initramfs kernel + filesystem - this works.  Yay!

 

Booting from either flash or ram with the vmImage kernel and using either a jffs2 or nfs filesystem - DirectFB initialization crashes at VT Switcher with signal 4, illegal opcode (or later if "no-VT" is applied).  Grrr!

 

These files are all from the same build after a clean make.

Attachments

    Outcomes