Write not working in framebuffer on which mipi oled connects

cancel
Showing results for 
Search instead for 
Did you mean: 

Write not working in framebuffer on which mipi oled connects

514 Views
kunalkulshresth
Contributor III

Dear Team,

While trying to interface Oled over Mipi DSI in iMX6DL board, I could see the driver code being executed because it is showing stable backlight now when it executes SLEEP_OUT command. So after it comes out of sleep, I try to write something to framebuffer.

But, to my surprise, I am not able to write anything to framebuffer. ie. I used this command:

dd if=/dev/urandom of=/dev/fb0 bs=3200 count=400

and was expecting some pixels to change color etc. but nothing changes. I also used a cross compiled app to write to fb0 on which mipi_dsi is supposed to have been interfaced. I am not sure whether I need to do some more changes in driver to make sure fb connects to the oled.

Anybody faced such kind of issues or with any clues will help me.

Thanks and regards,

Kunal

0 Kudos
4 Replies

154 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Kunal

one can try procedure described in sect.6.5.1 Framebuffer Tests attached Linux Manual

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

154 Views
kunalkulshresth
Contributor III

Hi Igor,

Sure, I tried these tests. The problem is that nothing actually affects a change on the mipi dsi display. I assume the fb0 has been associated with the mipi_dsi driver so it could have produced an effect when I write something on fb0, but it does not.

I use fbset command to see the display properties (timing params) are well picked up and mipi display does show backlight when it comes out of sleep mode. Any idea how to debug fb0 association with mipi_dsi driver?

Thanks and regards,

Kunal

0 Kudos

154 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Kunal

one can check "mxcfb*" aliases in dts file.

Best regards
igor

0 Kudos

154 Views
kunalkulshresth
Contributor III

Hi Igor,

So, for me only enabled FBs are fb0 and fb1. And fbset gives me appropriate information for fb0 i.e.

 

# fbset –fb /dev/fb0

 

mode “400x400-60”

            # D: 12.556 MHz, H: 26.158 kHz, V: 59.996 Hz

            geometry 400 400 400 400 32

            timings 79643 40 20 12 20 20 4

            rgba 8/16,8/8,8/0,8/24

endmode

 

So I was of understanding that fb0 should be good to write data on. Fb2 is anyways not enabled. But I tried changing mxcfb3: fb@2 to mxcfb3:fb@0 which also did not help. Is it like it is doubtful that fb0 is enabled instead of fb2 when we see dtsi? Attached are the logs (with mxcfb3:fb@2).

Please see the logs:

Starting Xserver
Starting system message bus: dbus.
Starting Connection Manager
Starting Dropbear SSH server: dropbear.
Starting rpcbind daemon...done.
mxc_sdc_fb fb.23: Bfore initing panel pixclock = 12556000l Hz
mipi_dsi_enable_controller
MIPI_DSI_DPI_CFG val = 0xf4
mipi_dsi_enable_controller MIPI_DSI_ERROR_ST0 val = 0x0
mipi_dsi_enable_controller MIPI_DSI_ERROR_ST1 val = 0x0
initing pll config
In oled_reset rst_gpio 143
mipi_dsi 21e0000.mipi: MIPI DSI LCD setup.
mipi_dsi 21e0000.mipi: In mipid_hx8369_lcd_setup ...mipi_dsi->mmio_base:0xf0188000.
MIPI_DSI_CMD_PKT_STATUS val = 0x1515
MIPI_DSI_CMD_PKT_STATUS val = 0x1515
MIPI_DSI_CMD_PKT_STATUS val = 0x1515
mipi_dsi 21e0000.mipi: 40 writing to 36h...OK.
fec 2188000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
MIPI_DSI_CMD_PKT_STATUS val = 0x1515
mipi_dsi_set_mode cmd_mode = 0
mipi_dsi_set_mode cmd_mode 0 val = 0x1ffe
mipi_dsi_pwr_up val = 0x1
Just before mipi_dsi_power_onJust before mipi_dsi_power_onmipi_dsi->bl = 0
mipi_dsi_power_on sleepout_once = 0
starting statd: done
mxc_sdc_fb fb.23: Bfore initing panel pixclock = 12556000l Hz
Just before mipi_dsi_power_onmipi_dsi->bl = 0
mipi_dsi_power_on sleepout_once = 0
Starting advanced power management daemon: No APM support in kernel
(failed.)
mipi_dsi_disable sleepout_once = 0
mipi_dsi_power_offmipi_dsi_set_mode cmd_mode = 1
mipi_dsi_set_mode cmd_mode 1 val = 0x1fff
MIPI_DSI_CMD_PKT_STATUS val = 0x1515
mipi_dsi_set_mode cmd_mode = 0
mipi_dsi_set_mode cmd_mode 0 val = 0x1ffe
mipi_dsi_pwr_up val = 0x1
mipi_dsi_set_mode cmd_mode = 1
mipi_dsi_set_mode cmd_mode 1 val = 0x1fff
mipi_dsi_disable_controllerNFS daemon support not enabled in kernel

mxc_sdc_fb fb.23: Bfore initing panel pixclock = 12556000l Hz
Just before mipi_dsi_power_onmipi_dsi->bl = 0
mipi_dsi_power_on sleepout_once = 0
mipi_dsi_enable_controller
random: nonblocking pool is initialized
mipi_dsi_set_mode cmd_mode = 0
mipi_dsi_set_mode cmd_mode 0 val = 0x1ffe
mipi_dsi_pwr_up val = 0x1
mipi_dsi_set_mode cmd_mode = 1
mipi_dsi_set_mode cmd_mode 1 val = 0x1fff
In oled_reset rst_gpio 143
MIPI_DSI_CMD_PKT_STATUS val = 0x1515
EXIT_SLEEP_MODEMIPI_DSI_CMD_PKT_STATUS val = 0x1515
Exit Idle Mode
mipi_dsi_set_mode cmd_mode = 0
mipi_dsi_set_mode cmd_mode 0 val = 0x1ffe
mipi_dsi_pwr_up val = 0x1
Starting syslogd/klogd: mxc_sdc_fb fb.23: Bfore initing panel pixclock = 12556000l Hz
Just before mipi_dsi_power_onmipi_dsi->bl = 0
mipi_dsi_power_on sleepout_once = 1
done
mipi_dsi_disable sleepout_once = 1
 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
mxc_sdc_fb fb.23: Bfore initing panel pixclock = 12556000l Hz
Just before mipi_dsi_power_onmipi_dsi->bl = 0
mipi_dsi_power_on sleepout_once = 1
[ ok ]si_disable sleepout_once = 1
Starting Telephony daemon
Starting Linux NFC daemon
Starting OProfileUI server
Starting autohdmi:
Running local boot scripts (/etc/rc.local).

Poky (Yocto Project Reference Distro) 1.7 imx6dlsabreauto /dev/ttymxc3

imx6dlsabreauto login: mxc_sdc_fb fb.23: Bfore initing panel pixclock = 12556000l Hz
Just before mipi_dsi_power_onmipi_dsi->bl = 0
mipi_dsi_power_on sleepout_once = 1

Poky (Yocto Project Reference Distro) 1.7 imx6dlsabreauto /dev/ttymxc3

imx6dlsabreauto login:
Poky (Yocto Project Reference Distro) 1.7 imx6dlsabreauto /dev/ttymxc3

imx6dlsabreauto login:
Poky (Yocto Project Reference Distro) 1.7 imx6dlsabreauto /dev/ttymxc3

imx6dlsabreauto login: root
root@imx6dlsabreauto:~#
root@imx6dlsabreauto:~#
root@imx6dlsabreauto:~#
root@imx6dlsabreauto:~# cat /sys/class/graphics/fb0/      
bits_per_pixel         fsl_disp_property      state
blank                  mode                   stride
console                modes                  subsystem/
cursor                 name                   uevent
dev                    pan                    virtual_size
device/                power/                 
fsl_disp_dev_property  rotate                 
root@imx6dlsabreauto:~# cat /sys/class/graphics/fb0/fsl_disp_dev_property
mipi_dsi
root@imx6dlsabreauto:~#
root@imx6dlsabreauto:~#
root@imx6dlsabreauto:~# fbset -fb /dev/fb0

mode "400x400-60"
    # D: 12.556 MHz, H: 26.158 kHz, V: 59.996 Hz
    geometry 400 400 400 400 32
    timings 79643 40 20 12 20 20 4
    rgba 8/16,8/8,8/0,8/24
endmode

root@imx6dlsabreauto:~#
root@imx6dlsabreauto:~# ls
FirstDisp   WriteToFB  images.jpeg  pic1.jpg  pic2.jpg
QtQuickApp  data       pic1.c       pic2.c    s
root@imx6dlsabreauto:~# cat /dev/urandom > /dev/fb0
fb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_write^V^C
root@imx6dlsabreauto:~# dd if=/dev/urandom of=/dev/fb0 bs=3200 count=400
fb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_writefb_wn
400+0 records out
1280000 bytes (1.3 MB) copied, 0.915004 s, 1.4 MB/s
root@imx6dlsabreauto:~# ^M
-sh: $'\r': command not found
root@imx6dlsabreauto:~#
root@imx6dlsabreauto:~#
root@imx6dlsabreauto:~#
root@imx6dlsabreauto:~#
root@imx6dlsabreauto:~#
      .text : 0x80008000 - 0x80d1261c   (13354 kB)

Thanks and regards,

Kunal

0 Kudos