Re: mi0283qt driver issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Den 16.04.2018 18.44, skrev Tom Callaway:
Noralf,

Thanks for the guidance on how to use the mi0283qt driver to run the
panel included in the Adafruit 2.8" capacitive PiTFT Plus (running on
top of a Raspberry Pi 3).

I am working with 4.16.0 (Fedora 28). I can get the driver to load, and
have console output appearing on it, but I have run into some issues
that I am unclear how to resolve.

Specifically:

1) If I change the rotation value to anything other than 90 (0x5a), the
screen output from the console is corrupt.

It turns out that the reason for this is that the pitft has a hw reset
circuit that resets only on power-on and not on each reboot through a
gpio like rpi-display does.

When the driver is enabling the display pipeline it checks if the
controller is already initialized, and skips setup if it is. This means
that the rotation value is only applied after power-on on the pitft and
not on each reboot.

Turning off the "display" before rebooting should also work:

$ # change rotation value
$ echo "28" | sudo tee /sys/kernel/debug/dri/0/command
$ sudo reboot

Rotation/mirror/flip/bgr is controlled by commmand 0x36. The current
value is returned by command 0x0b:

$ sudo cat /sys/kernel/debug/dri/0/command | grep "0b:"
0b: f8

So to fix this in the driver the rotation value has to always be applied
regardless of display "on" state. This can be done by moving the rotation
code in mi0283qt_enable() down after the out: label.

2) The resolution is set to 240x320, not the 320x240 that I expected.

mi0283qt doesn't match fb_ili9340 when it comes to rotation.
rotation=90 on mi0283qt is 240x320
rotate=90 on fb_ili9340 is 320x240

3) pygame cannot run a display.set_mode call, always returning:

No video mode large enough for 240x320

When I run this python code:

    import os
    import pygame
    os.putenv('SDL_VIDEODRIVER', 'fbcon')
    os.putenv('SDL_FBDEV'      , '/dev/fb1')
    pygame.init()
    list = pygame.display.list_modes()
    print "List of modes: %s" % (list)

It shows an empty set ("List of modes: []").

I couldn't find any source code for the sdl fbcon driver, so I don't know
how it queries for modes.

Noralf.


Do you have any advice on how to resolve these issues?

Thanks in advance,

~tom

For debugging purposes:

I have the following device tree entry for the device (taken from dtc
-Ifs /proc/device-tree):

pitft@0 {
         compatible = "multi-inno,mi0283qt";
         buswidth = <0x8>;
         rotation = <0x5a>;
         bgr;
         fps = <0x1e>;
         reg = <0x0>;
         pinctrl-0 = <0x10>;
         debug = <0x0>;
         dc-gpios = <0xf 0x19 0x0>;
         spi-max-frequency = <0x3d09000>;
         pinctrl-names = "default";
};

*** modetest output ***

[root@localhost ~]# modetest -M "mi0283qt" -c
Connectors:
id	encoder	status		name		size (mm)	modes	encoders
28	31	connected	Virtual-1      	43x58		1	31
   modes:
	name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
   240x320 0 240 240 240 240 320 320 320 320 1 flags: ; type: preferred,
driver
   props:
	2 DPMS:
		flags: enum
		enums: On=0 Standby=1 Suspend=2 Off=3
		value: 0
	5 link-status:
		flags: enum
		enums: Good=0 Bad=1
		value: 0
	6 non-desktop:
		flags: immutable range
		values: 0 1
		value: 0

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux