rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

new kernel regression with fbtft

Mon Jul 27, 2020 3:49 pm

Since 5 days I'm trying to get my sainsmart1.8 spi display to work. no chance.

Code: Select all

Linux pump 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l GNU/Linux
in my /boot/config.txt is this entry:

Code: Select all

dtoverlay=sainsmart18,reset=27,dc=9 
In dmesg I can see, that the overlay was loaded, but couldn't assign any GPIO.
And the overlay will disable my spi devices (no /dev/spidev0.0 and /dev/spidev0.1).
removing the dtoverlay entry, spidev0.0 an .1 is there.

this is the dmesg excerpt:

Code: Select all

[    4.386602] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[    4.388335] fb_st7735r: module is from the staging directory, the quality is unknown, you have been warned.
[    4.388713] fbtft_of_value: width = 160
[    4.388720] fbtft_of_value: height = 128
[    4.388727] fbtft_of_value: buswidth = 8
[    4.388735] fbtft_of_value: debug = 9
[    4.388741] fbtft_of_value: rotate = 90
[    4.388748] fbtft_of_value: fps = 30
[    4.388754] fbtft_of_value: txbuflen = 43008
[    4.388859] fb_st7735r spi0.0: fbtft_request_one_gpio: 'reset' GPIO
[    4.388892] fb_st7735r spi0.0: fbtft_request_one_gpio: 'dc' GPIO
[    4.388910] fb_st7735r spi0.0: fbtft_request_one_gpio: 'rd' GPIO
[    4.388927] fb_st7735r spi0.0: fbtft_request_one_gpio: 'wr' GPIO
[    4.388943] fb_st7735r spi0.0: fbtft_request_one_gpio: 'cs' GPIO
[    4.388961] fb_st7735r spi0.0: fbtft_request_one_gpio: 'latch' GPIO
[    4.388977] fb_st7735r spi0.0: fbtft_request_one_gpio: 'db' GPIO
[    4.389002] fb_st7735r spi0.0: fbtft_request_one_gpio: 'led' GPIO
[    4.389019] fb_st7735r spi0.0: fbtft_request_one_gpio: 'aux' GPIO
...
[    5.167852] graphics fb1: fb_st7735r frame buffer, 128x160, 40 KiB video memory, 32 KiB buffer memory, fps=33, spi0.0 at 40 MHz
this is my sainsmart18.dts file, compiled with:

Code: Select all

dtc -@ -I dts -O dtb -o /boot/overlays/sainsmart18.dtbo sainsmart18.dts

Code: Select all

/* 
 * Device Tree Overlay for sainsmart 1.8inch
 * https://github.com/trbljump/rpi-overlays/blob/master/sainsmart18.dts
 *
 */

/dts-v1/;
/plugin/;

/ {
    compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";

    fragment@0 {
        target = <&spi0>;
        __overlay__ {
            status = "okay";

            spidev@0{
            status = "disabled";
            };

            spidev@1{
            status = "disabled";
            };
        };
    };

    fragment@1 {
        target = <&gpio>;
            __overlay__ {
                lcd_pins: lcd_pins {
                    brcm,pins = <27 25 12>;
                    brcm,function = <1 1 1>; /* out out out */
                } ;
            } ;
       } ;


    fragment@2 {
        target = <&spi0>;
        __overlay__ {
            /* needed to avoid dtc warning */
            #address-cells = <1>;
            #size-cells = <0>;

            sain18: sain18@0{
                compatible = "sitronix,st7735r";
                reg = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&lcd_pins> ;

                spi-max-frequency = <40000000>;
                txbuflen = <32768>;
                rotate = <90> ;
                fps = <30> ;
                buswidth = <8>;
                reset-gpios = <&gpio 27 0>;
                dc-gpios = <&gpio 25 0>;
                led-gpios = <&gpio 12 1>;       
                width = <160> ;
                height = <128> ;
                custom = <1> ;
                debug = <0>;
				bgr = <1> ;
            } ;
        } ;
    } ;

    __overrides__ {
    	speed =		<&sain18>,"spi-max-frequency:0";
        txbuflen =	<&sain18>,"txbuflen:0";
        fps =		<&sain18>,"fps:0";
		bgr = 		<&sain18>,"bgr:0";
        debug = 	<&sain18>,"debug:0";
        custom = 	<&sain18>,"custom:0";
    } ;
} ;


PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Mon Jul 27, 2020 4:47 pm

Try changing the reset-gpios line to:

Code: Select all

                reset-gpios = <&gpio 27 1>;
This configures the GPIO descriptor logic for active-low working.

My understanding is that the original version of the overlay was wrong, but error was being ignored. Since kernel 5.1 the effect of the error is being noticed.

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Mon Jul 27, 2020 5:36 pm

changed it, no luck (see dmesg excerpt):

Code: Select all

[    4.537014] fb_st7735r spi0.0: fbtft_request_one_gpio: 'reset' GPIO
GPIO are still not recognized by fbtft. both spi devices (/dev/spidev0.x) are gone.

I see 2 problems:
1. the overlay disables spidevices
2. dtoverlay can not pass gpio definitions (Reset & DC) to the fbtft driver.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Mon Jul 27, 2020 6:19 pm

Is that an error message? It doesn't look like one to me.

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Tue Jul 28, 2020 6:00 am

it is, normally it prints out the choosen gpio.
like reset = GPIO27

you can see in the 1. dmseg log further above that it tries to map multiple times.

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Wed Aug 19, 2020 4:27 pm

I'm a little bit further. .dts file for st7735r displays should work (pls. see .dts below). pin assignments can be modifed by config.txt entry.
But there is one open problem. These displays don't use MISO signal (GPIO#9). so I want to use this as DC_pin. But there is an ERROR in dmesg. How can I use GPIO#9 ? It's occupied by SPI0.0. But for this display, there is no use for MISO.
In older kernel (4.19) I could use GPIO9.

Code: Select all

entry in /boot/config.txt
dtoverlay=st7735r,dc_pin=9,reset_pin=27,debug=3,bgr=1

Code: Select all

dmesg error:
[    8.774061] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[    8.779486] fb_st7735r: module is from the staging directory, the quality is unknown, you have been warned.
[    8.780008] pinctrl-bcm2835 3f200000.gpio: pin gpio9 already requested by 3f204000.spi; cannot claim for spi0.0
[    8.780019] pinctrl-bcm2835 3f200000.gpio: pin-9 (spi0.0) status -22
[    8.780028] pinctrl-bcm2835 3f200000.gpio: could not request pin 9 (gpio9) from group gpio9  on device pinctrl-bcm2835
[    8.780036] fb_st7735r spi0.0: Error applying setting, reverse things back
[    8.780062] fb_st7735r: probe of spi0.0 failed with error -22

Code: Select all

/*
 * Device Tree overlay for st7735r based SPI OLED display
 *
 * /boot/config.txt
 * dtoverlay=st7735r,dc_pin=13,reset_pin=27,debug=3,bgr=1
 *
 * compile:
 * dtc -@ -I dts -O dtb -o /boot/overlays/st7735r.dtbo st7735r.dts
 */

/dts-v1/;
/plugin/;

/ {
	compatible = "brcm,bcm2835";

	fragment@0 {
		target = <&spi0>;
		__overlay__ {
			status = "okay";
		};
	};

	fragment@1 {
		target = <&spidev0>;
		__overlay__ {
			status = "disabled";
		};
	};

	fragment@2 {
		target = <&spidev1>;
		__overlay__ {
			status = "disabled";
		};
	};

	fragment@3 {
		target = <&gpio>;
		__overlay__ {
			st7735_pins: st7735_pins {
                                brcm,pins = <24 25>;
                                brcm,function = <1 1>; /* out out */
			};
		};
	};

	fragment@4 {
		target = <&spi0>;
		__overlay__ {
			/* needed to avoid dtc warning */
			#address-cells = <1>;
			#size-cells = <0>;

			st7735: st7735@0{
				compatible = "sitronix,st7735r", "sitronix,sainsmart18";
				reg = <0>;
				pinctrl-names = "default";
				pinctrl-0 = <&st7735_pins>;

				spi-max-frequency = <32000000>;
				bgr = <0>;
				bpp = <1>;
				rotate = <0>;
				fps = <25>;
				buswidth = <8>;
				reset-gpios = <&gpio 25 0>;
				dc-gpios = <&gpio 24 0>;
				debug = <0>;

				sitronix,height = <128>;
				sitronix,width = <160>;
				sitronix,page-offset = <0>;
			};
		};
	};

	__overrides__ {
		speed     = <&st7735>,"spi-max-frequency:0";
		rotate    = <&st7735>,"rotate:0";
		fps       = <&st7735>,"fps:0";
		bgr       = <&st7735>,"bgr:0";
		debug     = <&st7735>,"debug:0";
		dc_pin    = <&st7735>,"dc-gpios:4",
		            <&st7735_pins>,"brcm,pins:4";
		reset_pin = <&st7735>,"reset-gpios:4",
		            <&st7735_pins>,"brcm,pins:0";
		height    = <&st7735>,"sitronix,height:0";
		width     = <&st7735>,"sitronix,width:0";
	};
};

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Wed Aug 19, 2020 9:10 pm

You need to modify the pinctrl node for spi0. The DT node for spi0 includes this property:

Code: Select all

	pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
We don't want to change the CS pins, but we would like to alter the other pins. spi0_pins is a label on a node under the GPIO controller:

Code: Select all

			spi0_pins: spi0_pins {
				brcm,function = <BCM2835_FSEL_ALT0>;
				brcm,pins = <9 10 11>;
			};
You can probably guess that brcm,pins needs to change.

Create yourself a new fragment targeting this spi0_pins node that replaces the brcm,pins property:

Code: Select all

	fragment@5 {
		target = <&spi0_pins>;
		__overlay__ {
			brcm,pins = <10 11>;
		};
	};
That ought to do it.

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Thu Aug 20, 2020 2:48 pm

Thanks Phil for your answer.
But I tried to include this in my .dts without luck.
Can you be so kind, to edit my .dts (see complete code above).
many thanks.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Thu Aug 20, 2020 3:08 pm

Just like this:

Code: Select all

/*
 * Device Tree overlay for st7735r based SPI OLED display
 *
 * /boot/config.txt
 * dtoverlay=st7735r,dc_pin=13,reset_pin=27,debug=3,bgr=1
 *
 * compile:
 * dtc -@ -I dts -O dtb -o /boot/overlays/st7735r.dtbo st7735r.dts
 */

/dts-v1/;
/plugin/;

/ {
	compatible = "brcm,bcm2835";

	fragment@0 {
		target = <&spi0>;
		__overlay__ {
			status = "okay";
		};
	};

	fragment@1 {
		target = <&spidev0>;
		__overlay__ {
			status = "disabled";
		};
	};

	fragment@2 {
		target = <&spidev1>;
		__overlay__ {
			status = "disabled";
		};
	};

	fragment@3 {
		target = <&gpio>;
		__overlay__ {
			st7735_pins: st7735_pins {
                                brcm,pins = <24 25>;
                                brcm,function = <1 1>; /* out out */
			};
		};
	};

	fragment@4 {
		target = <&spi0>;
		__overlay__ {
			/* needed to avoid dtc warning */
			#address-cells = <1>;
			#size-cells = <0>;

			st7735: st7735@0{
				compatible = "sitronix,st7735r", "sitronix,sainsmart18";
				reg = <0>;
				pinctrl-names = "default";
				pinctrl-0 = <&st7735_pins>;

				spi-max-frequency = <32000000>;
				bgr = <0>;
				bpp = <1>;
				rotate = <0>;
				fps = <25>;
				buswidth = <8>;
				reset-gpios = <&gpio 25 0>;
				dc-gpios = <&gpio 24 0>;
				debug = <0>;

				sitronix,height = <128>;
				sitronix,width = <160>;
				sitronix,page-offset = <0>;
			};
		};
	};

	fragment@5 {
		target = <&spi0_pins>;
		__overlay__ {
			brcm,pins = <10 11>;
		};
	};

	__overrides__ {
		speed     = <&st7735>,"spi-max-frequency:0";
		rotate    = <&st7735>,"rotate:0";
		fps       = <&st7735>,"fps:0";
		bgr       = <&st7735>,"bgr:0";
		debug     = <&st7735>,"debug:0";
		dc_pin    = <&st7735>,"dc-gpios:4",
		            <&st7735_pins>,"brcm,pins:4";
		reset_pin = <&st7735>,"reset-gpios:4",
		            <&st7735_pins>,"brcm,pins:0";
		height    = <&st7735>,"sitronix,height:0";
		width     = <&st7735>,"sitronix,width:0";
	};
};

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Fri Aug 21, 2020 5:14 pm

Thanks Phil,

this works, yippi!

But how can I select the device "adafruit18_green" ? Same display controller (st7735r), but adafruit18_green has an other gamma string and do not have pixel artefacts at the top and right border of the display.

on older kernel 4.19 I could put different entries in /etc/modprobe.d/fbtft.conf

Code: Select all

options fbtft_device name=sainsmart18 gpios=dc:9,reset:27 debug=3 bgr=1
or

Code: Select all

options fbtft_device name=adafruit18_green gpios=dc:9,reset:27 debug=3 bgr=1
in dmesg I can see that the gamma string is different (according to sainsmart18 or adafruit18_green)

How can I do this in a .dts file ?

compatible = "sitronix,st7735r", "sitronix,sainsmart18";

compatible = "sitronix,st7735r", "sitronix,adafruit18_green"; does not work. Loads sainsmart18 st7735r setup

Where can I get these compatible string informations?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Mon Aug 24, 2020 7:46 am

The fbtft driver in 5.4 has lost the adafruit18_green support (along with several other devices) - an upstream kernel change broke the support, and the maintainer either couldn't or wouldn't fix it so chose to remove it instead. It ought to be possible to take the values that were in the 4.19 version of the driver and translate them into an overlay - perhaps Adafruit have done that already.

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Tue Aug 25, 2020 7:27 am

there is no fix from adafruit, couldn't find a newer .dts or .dtbo

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Tue Aug 25, 2020 2:28 pm

This is a best-guess at a suitable overlay (it's totally untested).

Code: Select all

/*
 * Device Tree overlay for SPI TFT LCD with ST7735R chip 160x128 (1,8") 
 *
 */

/dts-v1/;
/plugin/;

/ {
	compatible = "brcm,bcm2835";

	fragment@0 {
		target = <&spidev0>;
		__overlay__ {
			status = "disabled";
		};
	};

	fragment@1 {
		target = <&spi0>;
		__overlay__ {
			/* needed to avoid dtc warning */
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			af18g: adafruit18_green@0 {
				compatible = "sitronix,st7735r";
				reg = <0>;
				pinctrl-names = "default";
				spi-max-frequency = <40000000>;
				rotate = <90>;
				buswidth = <8>;
				fps = <50>;
				height = <160>;
				width = <128>;
				reset-gpios = <&gpio 25 0>;
				dc-gpios = <&gpio 24 0>;
				led-gpios = <&gpio 18 0>;
				bgr;
				gamma = "02 1c 07 12 37 32 29 2d 29 25 2B 39 00 01 03 10\n03 1d 07 06 2E 2C 29 2D 2E 2E 37 3F 00 00 02 10";
				debug = <0>;
			};
		};
	};

	__overrides__ {
		rotate = <&af18g>, "rotate:0";
	};
};
Call the file "adafruit18_green-overlay.dts" and compile it with:

Code: Select all

$ dtc -@ -I dts -O dtb -o adafruit18_green.dtbo adafruit18_green-overlay.dts
You'll see a few warnings, but they're nothing to worry about. Install with:

Code: Select all

sudo cp adafruit18_green.dtbo /boot/overlays
If the image is the wrong way round, try adding ",rotate=0" (or 180 or 270) to the dtparam line.

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Wed Aug 26, 2020 12:57 pm

Thanks Phil,
for your wonderful support (you see, that I bought a new dict ;-)).
I've used your .dts file, but it didnt worked. In dmesg (pls. see below) you can see that the new overlay was loaded, indicated by the gamma string
02 1c ...). I don't think that is has to do with the gamma string only. I've just mentioned the different gamma string, because I could see that the working adafruit_green module was loaded on kernel 4.19 by my "/etc/modprobe.d/fbtft.conf". I've described the problem here in more detail: https://github.com/notro/fbtft/issues/560 , but I fear the fbtft forum on github is almost dead.

I think the problem is, that "fbtft_device.c" (which is not available on kernel 5.x anymore) https://github.com/notro/fbtft/blob/mas ... t_device.c redefines function "set_addr_win" (see line 210) and a special gamma string (line 196) for the adafruit_green module. "set_addr_win" moves the starting point for a pixel 2pixels to the right on x and 1 pixel down for y in the device buffer. This will solve those ugly pixel artefacts on the right and bottom edge (pls. see the picture): https://github.com/rudiratlos/RPI_Power ... G_1169.jpg

I believe that a skilled person has to enhance "fb_st7735r.c" https://github.com/torvalds/linux/tree/ ... ging/fbtft which offers/enable a redefinition of "set_addr_win" and gamma string by an additional .dts parameter

Code: Select all

[    3.516096] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[    3.518103] rtc-ds1307 1-0068: registered as rtc0
[    3.524280] fb_st7735r: module is from the staging directory, the quality is unknown, you have been warned.
[    3.524757] fbtft_of_value: buswidth = 8
[    3.524764] fbtft_of_value: bpp = 1
[    3.524769] fbtft_of_value: debug = 3
[    3.524773] fbtft_of_value: rotate = 270
[    3.524779] fbtft_of_value: fps = 25
[    3.524873] fb_st7735r spi0.0: fbtft_gamma_parse_str() str=
[    3.524878] fb_st7735r spi0.0: 02 1c 07 12 37 32 29 2d 29 25 2B 39 00 01 03 10
               03 1d 07 06 2E 2C 29 2D 2E 2E 37 3F 00 00 02 10
[    3.524920] fb_st7735r spi0.0: fbtft_request_one_gpio: 'reset-gpios' = GPIO27
[    3.524940] fb_st7735r spi0.0: fbtft_request_one_gpio: 'dc-gpios' = GPIO9
[    3.524979] fb_st7735r spi0.0: fbtft_verify_gpios()
[    3.524984] fb_st7735r spi0.0: fbtft_reset()
[    3.665747] fb_st7735r spi0.0: init: write(0x01) 
[    3.665788] fb_st7735r spi0.0: init: mdelay(150)
[    3.815826] fb_st7735r spi0.0: init: write(0x11) 
[    3.815863] fb_st7735r spi0.0: init: mdelay(500)
[    4.315937] fb_st7735r spi0.0: init: write(0xB1) 0x01 0x2C 0x2D 
[    4.316039] fb_st7735r spi0.0: init: write(0xB2) 0x01 0x2C 0x2D 
[    4.316096] fb_st7735r spi0.0: init: write(0xB3) 0x01 0x2C 0x2D 0x01 0x2C 0x2D 
[    4.316141] fb_st7735r spi0.0: init: write(0xB4) 0x07 
[    4.316184] fb_st7735r spi0.0: init: write(0xC0) 0xA2 0x02 0x84 
[    4.316222] fb_st7735r spi0.0: init: write(0xC1) 0xC5 
[    4.316255] fb_st7735r spi0.0: init: write(0xC2) 0x0A 0x00 
[    4.316291] fb_st7735r spi0.0: init: write(0xC3) 0x8A 0x2A 
[    4.316326] fb_st7735r spi0.0: init: write(0xC4) 0x8A 0xEE 
[    4.316361] fb_st7735r spi0.0: init: write(0xC5) 0x0E 
[    4.316402] fb_st7735r spi0.0: init: write(0x20) 
[    4.316423] fb_st7735r spi0.0: init: write(0x3A) 0x05 
[    4.316458] fb_st7735r spi0.0: init: write(0x29) 
[    4.316477] fb_st7735r spi0.0: init: mdelay(100)
[    4.416497] fb_st7735r spi0.0: init: write(0x13) 
[    4.416646] fb_st7735r spi0.0: init: mdelay(10)
[    4.511409] fb_st7735r spi0.0: Display update: 471 kB/s, fps=0
[    4.511798] Console: switching to colour frame buffer device 20x16
[    4.511912] graphics fb0: fb_st7735r frame buffer, 160x128, 40 KiB video memory, 4 KiB buffer memory, fps=25, spi0.0 at 4 MHz

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Wed Aug 26, 2020 3:52 pm

I did wonder if that missing set_addr_win might be a problem. I'll try and get in touch with the author to find out if he has plans to support these other devices in 5.4 and later.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Thu Aug 27, 2020 3:04 pm

for your wonderful support (you see, that I bought a new dict ;-)).
You've earned a new subject line.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Fri Aug 28, 2020 12:17 pm

FYI there's a new overlay in the RPi kernel - spi0-1cs - that only claims 1 CS line. It also takes a "no_miso" parameter that releases GPIO 9 for devices that don't use the return channel. spi0-2cs is the new name for spi0-cs, and it too has a no_miso parameter.

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Fri Aug 28, 2020 2:07 pm

Hi Phil, this is good news.
focusing on "set_addr_win" in st7735r I'm pretty shure, that the adafruit_green needs a different function to get rid of these pixel artefacts on two display edges.

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Tue Sep 01, 2020 4:31 pm

notro has referred https://github.com/notro/fbtft/issues/560 to this driver in https://elixir.bootlin.com/linux/latest ... 35r.c#L148 pls. see line 150 and 151. These are parameter for x/y st7735r offsets. How can this driver activated via .dts file on rpi os?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Tue Sep 01, 2020 4:44 pm

I'm in the middle of making the required changes - the task just had a lower priority than some others (you are so far the only person asking for it).

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Thu Sep 03, 2020 4:40 pm

I've add the updated fbtft driver and two overlays to the rpi-5.4.y kernel tree. They will be in the next rpi-update firmware release, which should be in the next few days. I think you will just need to add:

Code: Select all

dtoverlay=adafruit18,green
to config.txt, but you might need to use the "rotate" parameter.

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Sat Sep 05, 2020 2:56 pm

great, can't wait to test it

rudiratlos
Posts: 216
Joined: Tue May 01, 2012 8:47 am
Location: Germany (old europe)

Re: new kernel regression with fbtft

Wed Sep 09, 2020 3:43 pm

Hi Phil,
just tested overlay adafruit_green. No success, still have these pixel artefacts.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Wed Sep 09, 2020 3:45 pm

Did you build your own kernel? My changes haven't made it to an rpi-update release yet.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3697
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: new kernel regression with fbtft

Wed Sep 09, 2020 3:47 pm

Are you able to capture kernel messages from your working system with the fbtft debug set to 3, and then do the same with the new kernel?

Return to “Device Tree”