Cyclone V LCD controller framebuffer driver

Hello

I am using the Terasic DE10-Standard development board and Quartus II 18.1 Standard to develop an embedded system based on the Cyclone V and the DE10-Standard_LXDE version of the Linux system provided by Terasic. I cloned the sources for u-boot and the kernel from https://github.com/terasic/u-boot-socfpga.git and https://github.com/terasic/linux-socfpga.git.

I implemented an LCD controller for a dumb LCD display using the Platform Designer and the Intel VIP framebuffer II IP core. I produced an rbf and a dtb and installed them on the FAT partition. The dtb entry for the LCD controller is the following:
alt_vip_cl_vfb_0_lcd: vip@0x100040000 {
compatible = “altr,vip-18.1”, “altr,vip-frame-buffer-2.0”;
reg = <0x00000001 0x00040000 0x00000040>;
clocks = <&pll_0_lcd 1 &clk_50>;
clock-names = “main_clock”, “mem_clock”;
altr,bits-per-symbol = <8>; /* embeddedsw.dts.params.altr,bits-per-symbol type NUMBER /
altr,max-height = <480>; /
embeddedsw.dts.params.altr,max-height type NUMBER /
altr,max-width = <640>; /
embeddedsw.dts.params.altr,max-width type NUMBER /
altr,mem-port-width = <256>; /
embeddedsw.dts.params.altr,mem-port-width type NUMBER */
}; //end vip@0x100040000 (alt_vip_cl_vfb_0_lcd)

I tested the LCD controller with a user program that maps the control registers to generate a test pattern on the display. The LCD controller works as expected.

I used the driver source ~/linux-socfpga/drivers/video/fbdev/altvipfb.c as the template for implementing a framebuffer driver for the LCD controller, which I named altlcdfb. I built the kernel with the driver as built-in.

At system boot the kernel displays the following messages:
[ 0.186871] altlcdfb ff240000.vip: fb0: altlcdfb frame buffer device at 0x2ef00000+0xe1000

The following commands entered on the system console of the dev board produces the results:
n7k@DE10-Standard:~$ cat $(readlink -f /sys/class/graphics/fb0/name)
altlcdfb
n7k@DE10-Standard:~$ cat /proc/fb
0 altlcdfb

The X Window log /var/log/Xorg.0.log contains the following:
[ 6.289] X Protocol Version 11, Revision 0
[ 6.289] Build Operating System: Linux 4.4.0-45-generic armv7l Ubuntu
[ 6.289] Current Operating System: Linux DE10-Standard 4.5.0 #15 SMP Wed Aug 21 18:01:28 PDT 2019 armv7l
[ 6.289] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
[ 6.289] Build Date: 02 November 2016 10:05:15PM
[ 6.300] xorg-server 2:1.18.4-0ubuntu0.2 (For technical support please see http://www.ubuntu.com/support)
[ 6.300] Current version of pixman: 0.33.6
.
.
.[ 6.675] (II) FBDEV(0): Creating default Display subsection in Screen section
“Default Screen Section” for depth/fbbpp 24/24
[ 6.675] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 24
[ 6.675] (==) FBDEV(0): RGB weight 888
[ 6.675] (==) FBDEV(0): Default visual is TrueColor
[ 6.675] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[ 6.675] (II) FBDEV(0): hardware: altlcdfb (video memory: 900kB)
[ 6.675] (II) FBDEV(0): checking modes against framebuffer device…
[ 6.675] (II) FBDEV(0): checking modes against monitor…
[ 6.676] (–) FBDEV(0): Virtual size is 640x480 (pitch 640)
[ 6.676] () FBDEV(0): Built-in mode “current”
[ 6.676] (==) FBDEV(0): DPI set to (96, 96)
[ 6.676] (II) Loading sub module “fb”
[ 6.676] (II) LoadModule: “fb”
[ 6.676] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 6.697] (II) Module fb: vendor=“X.Org Foundation”
[ 6.697] compiled for 1.18.4, module version = 1.0.0
[ 6.697] ABI class: X.Org ANSI C Emulation, version 0.4
[ 6.697] (
) FBDEV(0): using shadow framebuffer
[ 6.697] (II) Loading sub module “shadow”
[ 6.697] (II) LoadModule: “shadow”
[ 6.698] (II) Loading /usr/lib/xorg/modules/libshadow.so
[ 6.701] (II) Module shadow: vendor=“X.Org Foundation”
[ 6.701] compiled for 1.18.4, module version = 1.1.0
[ 6.701] ABI class: X.Org ANSI C Emulation, version 0.4
[ 6.701] (II) UnloadModule: “modesetting”
[ 6.701] (II) Unloading modesetting
[ 6.701] (==) Depth 24 pixmap format is 32 bpp
[ 6.702] (II) FBDEV(0): FBIOBLANK: Invalid argument (Screen blanking not supported by kernel - disabling)
[ 6.714] (==) FBDEV(0): Backing store enabled
[ 6.718] (==) FBDEV(0): DPMS enabled
[ 6.718] (==) RandR enabled

After all of the above, the display does not light up. I modified my user test program to use /dev/fb0 to generate the test pattern. It does not work. I reverted to having the test program program write directly to the LCD controller and that does not work either. I copied the screen from the device:
sudo cp /dev/fb01 screen.dmp and verified the screen dump contains the test pattern.

My impression from the results is that something is missing in my implementation of the kernel driver or there is a disconnect between the LCD IP core and the kernel when I use the driver.

Please let me know if you have any ideas.

Thanks,

Ben[date=2019-08-23 timezone=“America/Los_Angeles”]