imx7d color gradient problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx7d color gradient problem

Jump to solution
1,080 Views
Ahmet_Cihan_AKINCA
Contributor III

Hi. I'm using an imx7d based custom bord. Everything is fine but bad screen appearance while showing color gradients. My LCD have RGB 24-bit parallel connection. I'm not sure the problem is related imx7Dual's graphics processing skills or my kernel configuration. what do you think about this problem and can you help me to solve the problem?

PS: There is not any problem with solid colors and I can play videos without stuttering. Touchscreen is ok too..

Here are my kernel and distro versions;

Screenshot from 2021-01-25 13-46-07.png

dmesg | grep lcd

[ 0.453176] mxsfb 30730000.lcdif: initialized
[ 2.697740] regulator-lcd-3v3 GPIO handle specifies active low - ignored
[ 33.127570] lcd-3v3: disabling

This is an example gradient jpg file on PC; green_gradient.jpg

and what I see on my LCD;

(command is fbi -T 1 /home/colors/green_gradient.jpg )

WhatsApp Image 2021-01-25 at 13.41.32.jpeg

fbset -i output;

Screenshot from 2021-01-25 13-43-50.png

output of cat /var/log/Xorg.0.log (I'll send this as spoiler because it's a bit long)

 

Spoiler

root@localhost:~# cat /var/log/Xorg.0.log
[ 170.678]
X.Org X Server 1.15.1
Release Date: 2014-04-13
[ 170.678] X Protocol Version 11, Revision 0
[ 170.678] Build Operating System: Linux 4.4.0-97-generic armv7l Ubuntu
[ 170.678] Current Operating System: Linux localhost.localdomain 5.4.47-g6d581ab-dirty #32 SMP PREEMPT Mon Jan 25 13:25:49 +03 2021 armv7l
[ 170.678] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk0p2 rootwait rw
[ 170.678] Build Date: 13 October 2017 01:59:56PM
[ 170.678] xorg-server 2:1.15.1-0ubuntu2.11 (For technical support please see http://www.ubuntu.com/support)
[ 170.678] Current version of pixman: 0.30.2
[ 170.678] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 170.678] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 170.679] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jan 25 10:29:59 2021
[ 170.690] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 170.703] (==) No Layout section. Using the first Screen section.
[ 170.703] (==) No screen section available. Using defaults.
[ 170.703] (**) |-->Screen "Default Screen Section" (0)
[ 170.703] (**) | |-->Monitor "<default monitor>"
[ 170.704] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 170.704] (==) Automatically adding devices
[ 170.704] (==) Automatically enabling devices
[ 170.704] (==) Automatically adding GPU devices
[ 170.719] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 170.719] Entry deleted from font path.
[ 170.719] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 170.719] Entry deleted from font path.
[ 170.719] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 170.719] Entry deleted from font path.
[ 170.720] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 170.720] Entry deleted from font path.
[ 170.720] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 170.720] Entry deleted from font path.
[ 170.720] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 170.720] (==) ModulePath set to "/usr/lib/arm-linux-gnueabihf/xorg/extra-modules,/usr/lib/xorg/extra-modules,/usr/lib/xorg/modules"
[ 170.720] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 170.720] (II) Loader magic: 0x587f10
[ 170.720] (II) Module ABI versions:
[ 170.720] X.Org ANSI C Emulation: 0.4
[ 170.720] X.Org Video Driver: 15.0
[ 170.720] X.Org XInput driver : 20.0
[ 170.720] X.Org Server Extension : 8.0
[ 170.721] Initializing built-in extension Generic Event Extension
[ 170.721] Initializing built-in extension SHAPE
[ 170.721] Initializing built-in extension MIT-SHM
[ 170.721] Initializing built-in extension XInputExtension
[ 170.721] Initializing built-in extension XTEST
[ 170.721] Initializing built-in extension BIG-REQUESTS
[ 170.721] Initializing built-in extension SYNC
[ 170.721] Initializing built-in extension XKEYBOARD
[ 170.721] Initializing built-in extension XC-MISC
[ 170.722] Initializing built-in extension SECURITY
[ 170.722] Initializing built-in extension XINERAMA
[ 170.722] Initializing built-in extension XFIXES
[ 170.722] Initializing built-in extension RENDER
[ 170.722] Initializing built-in extension RANDR
[ 170.722] Initializing built-in extension COMPOSITE
[ 170.722] Initializing built-in extension DAMAGE
[ 170.722] Initializing built-in extension MIT-SCREEN-SAVER
[ 170.722] Initializing built-in extension DOUBLE-BUFFER
[ 170.722] Initializing built-in extension RECORD
[ 170.722] Initializing built-in extension DPMS
[ 170.722] Initializing built-in extension Present
[ 170.722] Initializing built-in extension DRI3
[ 170.722] Initializing built-in extension X-Resource
[ 170.722] Initializing built-in extension XVideo
[ 170.723] Initializing built-in extension XVideo-MotionCompensation
[ 170.723] Initializing built-in extension SELinux
[ 170.723] Initializing built-in extension XFree86-VidModeExtension
[ 170.723] Initializing built-in extension XFree86-DGA
[ 170.723] Initializing built-in extension XFree86-DRI
[ 170.723] Initializing built-in extension DRI2
[ 170.723] (II) LoadModule: "glx"
[ 170.729] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 170.794] (II) Module glx: vendor="X.Org Foundation"
[ 170.794] compiled for 1.15.1, module version = 1.0.0
[ 170.794] ABI class: X.Org Server Extension, version 8.0
[ 170.794] (==) AIGLX enabled
[ 170.794] Loading extension GLX
[ 170.795] (==) Matched modesetting as autoconfigured driver 0
[ 170.795] (==) Matched fbdev as autoconfigured driver 1
[ 170.795] (==) Assigned the driver to the xf86ConfigLayout
[ 170.795] (II) LoadModule: "modesetting"
[ 170.796] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 170.799] (II) Module modesetting: vendor="X.Org Foundation"
[ 170.799] compiled for 1.15.0, module version = 0.8.1
[ 170.799] Module class: X.Org Video Driver
[ 170.800] ABI class: X.Org Video Driver, version 15.0
[ 170.800] (II) LoadModule: "fbdev"
[ 170.801] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 170.803] (II) Module fbdev: vendor="X.Org Foundation"
[ 170.803] compiled for 1.15.0, module version = 0.4.4
[ 170.803] Module class: X.Org Video Driver
[ 170.803] ABI class: X.Org Video Driver, version 15.0
[ 170.803] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 170.803] (II) FBDEV: driver for framebuffer: fbdev
[ 170.804] (--) using VT number 7

[ 170.804] (WW) Falling back to old probe method for modesetting
[ 170.805] (EE) open /dev/dri/card0: No such file or directory
[ 170.805] (WW) Falling back to old probe method for fbdev
[ 170.805] (II) Loading sub module "fbdevhw"
[ 170.805] (II) LoadModule: "fbdevhw"
[ 170.806] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 170.808] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 170.808] compiled for 1.15.1, module version = 0.0.2
[ 170.808] ABI class: X.Org Video Driver, version 15.0
[ 170.808] (II) FBDEV(0): using default device
[ 170.808] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 170.808] (II) FBDEV(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 170.808] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
[ 170.808] (==) FBDEV(0): RGB weight 888
[ 170.809] (==) FBDEV(0): Default visual is TrueColor
[ 170.809] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[ 170.809] (II) FBDEV(0): hardware: mxs-lcdif (video memory: 32768kB)
[ 170.809] (II) FBDEV(0): checking modes against framebuffer device...
[ 170.809] (II) FBDEV(0): checking modes against monitor...
[ 170.809] (--) FBDEV(0): Virtual size is 800x480 (pitch 800)
[ 170.809] (**) FBDEV(0): Built-in mode "current": 24.0 MHz, 27.7 kHz, 55.0 Hz
[ 170.809] (II) FBDEV(0): Modeline "current"x0.0 24.00 800 820 840 866 480 480 490 504 -hsync -vsync -csync (27.7 kHz b)
[ 170.809] (==) FBDEV(0): DPI set to (96, 96)
[ 170.809] (II) Loading sub module "fb"
[ 170.809] (II) LoadModule: "fb"
[ 170.810] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 170.818] (II) Module fb: vendor="X.Org Foundation"
[ 170.818] compiled for 1.15.1, module version = 1.0.0
[ 170.818] ABI class: X.Org ANSI C Emulation, version 0.4
[ 170.818] (**) FBDEV(0): using shadow framebuffer
[ 170.818] (II) Loading sub module "shadow"
[ 170.818] (II) LoadModule: "shadow"
[ 170.820] (II) Loading /usr/lib/xorg/modules/libshadow.so
[ 170.823] (II) Module shadow: vendor="X.Org Foundation"
[ 170.823] compiled for 1.15.1, module version = 1.1.0
[ 170.823] ABI class: X.Org ANSI C Emulation, version 0.4
[ 170.823] (II) UnloadModule: "modesetting"
[ 170.823] (II) Unloading modesetting
[ 170.823] (==) Depth 24 pixmap format is 32 bpp
[ 170.836] (==) FBDEV(0): Backing store enabled
[ 170.837] (==) FBDEV(0): DPMS enabled
[ 170.837] (==) RandR enabled
[ 170.883] (II) SELinux: Disabled on system
[ 170.889] (II) AIGLX: Screen 0 is not DRI2 capable
[ 170.889] (EE) AIGLX: reverting to software rendering
[ 171.027] (II) AIGLX: Loaded and initialized swrast
[ 171.027] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[ 171.120] (II) XKB: reuse xkmfile /var/lib/xkb/server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm
[ 171.141] (II) config/udev: Adding input device gpio-keys (/dev/input/event2)
[ 171.141] (**) gpio-keys: Applying InputClass "evdev keyboard catchall"
[ 171.141] (II) LoadModule: "evdev"
[ 171.142] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[ 171.148] (II) Module evdev: vendor="X.Org Foundation"
[ 171.148] compiled for 1.15.0, module version = 2.8.2
[ 171.148] Module class: X.Org XInput Driver
[ 171.148] ABI class: X.Org XInput driver, version 20.0
[ 171.148] (II) Using input driver 'evdev' for 'gpio-keys'
[ 171.148] (**) gpio-keys: always reports core events
[ 171.149] (**) evdev: gpio-keys: Device: "/dev/input/event2"
[ 171.149] (--) evdev: gpio-keys: Vendor 0x1 Product 0x1
[ 171.149] (--) evdev: gpio-keys: Found keys
[ 171.149] (II) evdev: gpio-keys: Configuring as keyboard
[ 171.149] (**) Option "config_info" "udev:/sys/devices/soc0/gpio-keys/input/input2/event2"
[ 171.149] (II) XINPUT: Adding extended input device "gpio-keys" (type: KEYBOARD, id 6)
[ 171.149] (**) Option "xkb_rules" "evdev"
[ 171.149] (**) Option "xkb_model" "pc105"
[ 171.149] (**) Option "xkb_layout" "us"
[ 171.153] (II) config/udev: Adding input device 30370000.snvs:snvs-powerkey (/dev/input/event0)
[ 171.153] (**) 30370000.snvs:snvs-powerkey: Applying InputClass "evdev keyboard catchall"
[ 171.153] (II) Using input driver 'evdev' for '30370000.snvs:snvs-powerkey'
[ 171.153] (**) 30370000.snvs:snvs-powerkey: always reports core events
[ 171.153] (**) evdev: 30370000.snvs:snvs-powerkey: Device: "/dev/input/event0"
[ 171.153] (--) evdev: 30370000.snvs:snvs-powerkey: Vendor 0 Product 0
[ 171.153] (--) evdev: 30370000.snvs:snvs-powerkey: Found keys
[ 171.153] (II) evdev: 30370000.snvs:snvs-powerkey: Configuring as keyboard
[ 171.153] (**) Option "config_info" "udev:/sys/devices/soc0/soc/30000000.aips-bus/30370000.snvs/30370000.snvs:snvs-powerkey/input/input0/event0"
[ 171.154] (II) XINPUT: Adding extended input device "30370000.snvs:snvs-powerkey" (type: KEYBOARD, id 7)
[ 171.154] (**) Option "xkb_rules" "evdev"
[ 171.154] (**) Option "xkb_model" "pc105"
[ 171.154] (**) Option "xkb_layout" "us"
[ 171.157] (II) config/udev: Adding input device ADS7846 Touchscreen (/dev/input/event1)
[ 171.157] (**) ADS7846 Touchscreen: Applying InputClass "evdev touchscreen catchall"
[ 171.157] (II) Using input driver 'evdev' for 'ADS7846 Touchscreen'
[ 171.157] (**) ADS7846 Touchscreen: always reports core events
[ 171.157] (**) evdev: ADS7846 Touchscreen: Device: "/dev/input/event1"
[ 171.157] (--) evdev: ADS7846 Touchscreen: Vendor 0 Product 0
[ 171.158] (--) evdev: ADS7846 Touchscreen: Found absolute axes
[ 171.158] (--) evdev: ADS7846 Touchscreen: Found x and y absolute axes
[ 171.158] (--) evdev: ADS7846 Touchscreen: Found absolute touchscreen
[ 171.158] (II) evdev: ADS7846 Touchscreen: Configuring as touchscreen
[ 171.158] (**) evdev: ADS7846 Touchscreen: YAxisMapping: buttons 4 and 5
[ 171.158] (**) evdev: ADS7846 Touchscreen: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 171.158] (**) Option "config_info" "udev:/sys/devices/soc0/soc/30800000.aips-bus/30800000.spba-bus/30840000.spi/spi_master/spi2/spi2.0/input/input1/event1"
[ 171.158] (II) XINPUT: Adding extended input device "ADS7846 Touchscreen" (type: TOUCHSCREEN, id
[ 171.158] (II) evdev: ADS7846 Touchscreen: initialized for absolute axes.
[ 171.159] (**) ADS7846 Touchscreen: (accel) keeping acceleration scheme 1
[ 171.159] (**) ADS7846 Touchscreen: (accel) acceleration profile 0
[ 171.159] (**) ADS7846 Touchscreen: (accel) acceleration factor: 2.000
[ 171.159] (**) ADS7846 Touchscreen: (accel) acceleration threshold: 4

 

0 Kudos
1 Solution
975 Views
Ahmet_Cihan_AKINCA
Contributor III

This problem is solved, thank you for your help joanxie. I ordered a new, different brand LCD and checked everything again. I found that 3-bit green and 1-bit blue line is corrupted on PCB board. So, I was seeing colors in a low bit band. What a luck! By the way, I learned the LCD kernel code very well on this occasion.

View solution in original post

0 Kudos
5 Replies
976 Views
Ahmet_Cihan_AKINCA
Contributor III

This problem is solved, thank you for your help joanxie. I ordered a new, different brand LCD and checked everything again. I found that 3-bit green and 1-bit blue line is corrupted on PCB board. So, I was seeing colors in a low bit band. What a luck! By the way, I learned the LCD kernel code very well on this occasion.

0 Kudos
1,036 Views
Ahmet_Cihan_AKINCA
Contributor III

Hi Joanxie. My display is Satoz, SAT070CP40. I checked timings over and over, I tried lots of different configurations. As far as I can detect, the problem is caused by the LCD clock polarity. I'm trying to find the related low-level function in kernel 5.4.47. Thank you.

0 Kudos
1,016 Views
joanxie
NXP TechSupport
NXP TechSupport

you can refer to the document as below: "https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX6QD-How-to-Add-24-bit-LVDS-Support-in..." focus on the

8. sync: Since the timing chart tells us that hsync/vsync are active low, so we don’t need to set FB_SYNC_HOR_HIGH_ACT or

       FB_SYNC_VERT_HIGH_ACT. Moreover, clock polarity and data polarity are invalid, so we set sync to be zero

 

0 Kudos
994 Views
Ahmet_Cihan_AKINCA
Contributor III

I accessed LCDIF registers and changed VSYNC, HSYNC and DOTCLK polarities, nothing changed. I used "writel" function in mxsfb.c file for these register operations. Perhaps, I'm in a wrong way and this wave-like gradient problem is not related LCD driver. Do you recommend anything else? I'm suspicious about GPU or Pixel Pipeline.

0 Kudos
1,063 Views
joanxie
NXP TechSupport
NXP TechSupport

what display do you use? pls check if your dts file settings correct according to your display data sheet

0 Kudos