Framebuffer Rotate

Hi all, I’m using a yocto distribution (dunfell) to run a QT5 application without x11 with framebuffer and tslib.
Basically I need to rotate the screen 180° and set depth to 8 as I cannot mechanically rotate the physical display. fbset -depth 8 works.
I noticed an oddity, if in kernel cmdline I enter: video=HDMI-A-1:1280x800@60e,rotate=180 the framebuffer seems correctly rotated in fact the login prompt is oriented correctly.
However, when psplash starts and then my application in qt5, the orientation is wrong.
I have tried the following without success:

  • insert fbcon=rotate:2 into kernel cmdline
  • echo "2" > /sys/class/graphics/fbcon/rotate_all
  • echo "2" > /sys/class/graphics/fbcon/rotate
  • edit the dts like this:
.....
/ {
	model = "TI AM335x BeagleBone Black";
	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
};

/ {
  ocp {
    compatible = "simple-bus";
    #address-cells = <1>;
    #size-cells = <1>;
    ranges;

    hdmi@0 {
      compatible = "ti,tilcdc";
      status = "okay";
      rotation = <180>;
      depth = <8>;
    };

    i2c1 {
      status = "okay";
      clock-frequency = <100000>;
      rtc@68 {
        compatible = "dallas,ds1338";
        reg = <0x68>;
      };
    };
  };
};
.....

no attempt worked. suggestions?

Pure guess, you might have to look at uboot and see what is going on with it. Simplest might be to find the .png its loading and just overwrite it with a version that is rotated.

Log your debug output and see what the exact entry point is for your spash screen.
grep is your good friend with yocto.

Starting from uboot everything seems ok.
Loading the kernel seems ok and also loading the rootfs.
However the screen does not turn.
Despite having acted on both the device tree and the cmdline kernel.
My suspicion is that drm doesn’t transfer rotation correctly to the framebuffer.
See below entire loading process:

U-Boot SPL 2020.01 (Jan 06 2020 - 20:56:31 +0000)
Trying to boot from MMC2


U-Boot 2020.01 (Jan 06 2020 - 20:56:31 +0000)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
WDT:   Started with servicing (60s timeout)
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... <ethaddr> not set. Validating first E-fuse MAC
Net:   eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in ROM is          11:22:33:44:55:66
Address in environment is  77:88:99:00:11:22
, eth1: usb_ether
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1(part 0) is current device
SD/MMC found on device 1
1485 bytes read in 2 ms (724.6 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc1 ...
Running uenvcmd ...
** Invalid partition 5 **
** Invalid partition 5 **
Using root partition 1:2
62430 bytes read in 7 ms (8.5 MiB/s)
Loaded bbb-custom.dtb
4946936 bytes read in 318 ms (14.8 MiB/s)
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 8ffed000, end 8ffff3dd ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.9.16-custom (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 9.5.0, GNU ld (GNU Binutils) 2.34.0.20200910) #1 Mon Dec 21 12:28:21 UTC 2020
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 16 MiB at 0x9e800000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x000000009fefffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000009fefffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fefffff]
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129794
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait consoleblank=0 vt.global_cursor_default=0 video=HDMI-A-1:1280x800@60,rotate=180
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] Memory: 483656K/523264K available (7168K kernel code, 528K rwdata, 2504K rodata, 1024K init, 6584K bss, 23224K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] random: get_random_u32 called from __kmem_cache_create+0x20/0x35c with crng_init=0
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Running RCU self tests
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[    0.000000] TI gptimer clocksource: always-on /ocp/interconnect@44c00000/segment@200000/target-module@31000
[    0.000010] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000034] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000690] TI gptimer clockevent: 24000000 Hz at /ocp/interconnect@48000000/segment@0/target-module@40000
[    0.002078] Console: colour dummy device 80x30
[    0.002140] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.002157] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.002172] ... MAX_LOCK_DEPTH:          48
[    0.002187] ... MAX_LOCKDEP_KEYS:        8192
[    0.002201] ... CLASSHASH_SIZE:          4096
[    0.002216] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.002230] ... MAX_LOCKDEP_CHAINS:      65536
[    0.002245] ... CHAINHASH_SIZE:          32768
[    0.002260]  memory used by lock dependency info: 4061 kB
[    0.002275]  memory used for stack traces: 2112 kB
[    0.002290]  per task-struct memory footprint: 1536 bytes
[    0.002456] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.080821] pid_max: default: 32768 minimum: 301
[    0.081379] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.081408] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.084444] CPU: Testing write buffer coherency: ok
[    0.084669] CPU0: Spectre v2: using BPIALL workaround
[    0.086817] Setting up static identity map for 0x80100000 - 0x80100060
[    0.089211] devtmpfs: initialized
[    0.140995] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.141918] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.142014] futex hash table entries: 256 (order: 1, 12288 bytes, linear)
[    0.143432] pinctrl core: initialized pinctrl subsystem
[    0.148521] NET: Registered protocol family 16
[    0.156469] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.202018] l3-aon-clkctrl:0000:0: failed to disable
[    0.207171] thermal_sys: Registered thermal governor 'fair_share'
[    0.207185] thermal_sys: Registered thermal governor 'step_wise'
[    0.207223] thermal_sys: Registered thermal governor 'user_space'
[    0.207696] cpuidle: using governor ladder
[    0.207790] cpuidle: using governor menu
[    2.571017] random: fast init done
[    3.084113] No ATAGs?
[    3.084154] hw-breakpoint: debug architecture 0x4 unsupported.
[    3.288890] usbcore: registered new interface driver usbfs
[    3.289176] usbcore: registered new interface driver hub
[    3.289358] usbcore: registered new device driver usb
[    3.318952] clocksource: Switched to clocksource dmtimer
[    3.496609] VFS: Disk quotas dquot_6.6.0
[    3.496748] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    3.586340] NET: Registered protocol family 2
[    3.588487] tcp_listen_portaddr_hash hash table entries: 256 (order: 1, 11264 bytes, linear)
[    3.588616] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    3.588883] TCP bind hash table entries: 4096 (order: 5, 163840 bytes, linear)
[    3.589587] TCP: Hash tables configured (established 4096 bind 4096)
[    3.590034] UDP hash table entries: 256 (order: 2, 24576 bytes, linear)
[    3.590177] UDP-Lite hash table entries: 256 (order: 2, 24576 bytes, linear)
[    3.590690] NET: Registered protocol family 1
[    3.592852] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    3.606808] Initialise system trusted keyrings
[    3.614209] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    3.752060] Key type asymmetric registered
[    3.752246] Asymmetric key parser 'x509' registered
[    3.752431] io scheduler mq-deadline registered
[    3.752459] io scheduler kyber registered
[    4.155174] gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517
[    4.155249] omap_gpio 44e07000.gpio: Could not register gpio chip -517
[    4.806057] gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517
[    4.806111] omap_gpio 4804c000.gpio: Could not register gpio chip -517
[    4.960924] gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517
[    4.960979] omap_gpio 481ac000.gpio: Could not register gpio chip -517
[    4.990887] gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517
[    4.990936] omap_gpio 481ae000.gpio: Could not register gpio chip -517
[    5.222704] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[    5.222893] edma 49000000.dma: TI EDMA DMA engine driver
[    5.430065] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[    5.452312] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    5.465676] omap_uart 44e09000.serial: no wakeirq for uart0
[    5.467386] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 20, base_baud = 3000000) is a OMAP UART0
[    6.128138] printk: console [ttyO0] enabled
[    6.142954] omap_rng 48310000.rng: Random Number Generator ver. 20
[    6.151980] random: crng init done
[    6.157702] loop: module loaded
[    6.164583] mtdoops: mtd device (mtddev=name/number) must be supplied
[    6.175781] libphy: Fixed MDIO Bus: probed
[    6.180794] CAN device driver interface
[    6.259034] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    6.267232] libphy: 4a101000.mdio: probed
[    6.280143] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    6.291123] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[    6.297800] cpsw 4a100000.ethernet: ALE Table size 1024
[    6.306944] cpsw 4a100000.ethernet: Detected MACID = 3c:e4:b0:2b:a5:55
[    6.318512] usbcore: registered new interface driver asix
[    6.324490] usbcore: registered new interface driver ax88179_178a
[    6.331051] usbcore: registered new interface driver cdc_ether
[    6.337349] usbcore: registered new interface driver smsc95xx
[    6.343570] usbcore: registered new interface driver net1080
[    6.349664] usbcore: registered new interface driver cdc_subset
[    6.355979] usbcore: registered new interface driver zaurus
[    6.362034] usbcore: registered new interface driver cdc_ncm
[    6.371849] am335x-phy-driver 47401300.usb-phy: supply vcc not found, using dummy regulator
[    6.400937] am335x-phy-driver 47401b00.usb-phy: supply vcc not found, using dummy regulator
[    6.415379] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.422347] ehci-omap: OMAP-EHCI Host Controller driver
[    6.428808] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.435673] usbcore: registered new interface driver cdc_wdm
[    6.441965] usbcore: registered new interface driver ftdi_sio
[    6.448592] usbserial: USB Serial support registered for FTDI USB Serial Device
[    6.456673] usbcore: registered new interface driver usbtest
[    6.473965] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    6.480554] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    6.492315] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.09
[    6.501204] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    6.508776] usb usb1: Product: MUSB HDRC host driver
[    6.514080] usb usb1: Manufacturer: Linux 5.9.16-custom musb-hcd
[    6.520511] usb usb1: SerialNumber: musb-hdrc.1
[    6.530628] hub 1-0:1.0: USB hub found
[    6.536421] hub 1-0:1.0: 1 port detected
[    6.554100] mousedev: PS/2 mouse device common for all mice
[    6.575772] omap_rtc 44e3e000.rtc: registered as rtc0
[    6.581286] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01T00:00:00 UTC (946684800)
[    6.591948] i2c /dev entries driver
[    6.606746] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    6.617005] cpu cpu0: OPP-v2 not supported, cpufreq-dt will attempt to use legacy tables.
[    6.628150] sdhci: Secure Digital Host Controller Interface driver
[    6.634730] sdhci: Copyright(c) Pierre Ossman
[    6.639333] sdhci-pltfm: SDHCI platform and OF driver helper
[    6.661698] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
[    6.707564] mmc0: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
[    6.719296] ledtrig-cpu: registered to indicate activity on CPUs
[    6.730293] usbcore: registered new interface driver usbhid
[    6.736154] usbhid: USB HID core driver
[    6.742446] Initializing XFRM netlink socket
[    6.747118] NET: Registered protocol family 17
[    6.751932] can: controller area network core (rev 20170425 abi 9)
[    6.759132] NET: Registered protocol family 29
[    6.763815] can: raw protocol (rev 20170425)
[    6.768446] can: broadcast manager protocol (rev 20170425 t)
[    6.774537] Key type dns_resolver registered
[    6.780351] oprofile: using arm/armv7
[    6.784331] ThumbEE CPU extension supported.
[    6.788818] omap_voltage_late_init: Voltage driver support not added
[    6.815523] Loading compiled-in X.509 certificates
[    6.900573] OMAP GPIO hardware version 0.1
[    6.951360] tps65217-pmic: Failed to locate of_node [id: -1]
[    6.967283] mmc0: new high speed MMC card at address 0001
[    6.982728] mmcblk0: mmc0:0001 M62704 3.56 GiB
[    6.988490] mmcblk0boot0: mmc0:0001 M62704 partition 1 2.00 MiB
[    6.995568] mmcblk0boot1: mmc0:0001 M62704 partition 2 2.00 MiB
[    7.004556] mmcblk0rpmb: mmc0:0001 M62704 partition 3 512 KiB, chardev (250:0)
[    7.028817] tps65217-bl: Failed to locate of_node [id: -1]
[    7.048461]  mmcblk0: p1 p2
[    7.064789] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    7.071957] at24 0-0050: supply vcc not found, using dummy regulator
[    7.081899] usb 1-1: new full-speed USB device number 2 using musb-hdrc
[    7.109603] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    7.119174] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    7.133814] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    7.151931] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    7.188788] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[    7.198046] sdhci-omap 48060000.mmc: Got CD GPIO
[    7.203669] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
[    7.253973] mmc1: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
[    7.280690] usb 1-1: New USB device found, idVendor=222a, idProduct=0001, bcdDevice= 0.00
[    7.289501] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    7.296984] usb 1-1: Product: ILITEK-TP
[    7.301052] usb 1-1: Manufacturer: ILITEK
[    7.335804] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[    7.343998] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[    7.366499] input: ILITEK ILITEK-TP Touchscreen as /devices/platform/ocp/47400000.target-module/47401c00.usb/musb-hdrc.1/usb1/1-1/1-1:1.0/0003:222A:0001.0001/input/input0
[    7.389703] hid-generic 0003:222A:0001.0001: input: USB HID v1.10 Device [ILITEK ILITEK-TP] on usb-musb-hdrc.1-1/input0
[    7.495313] EXT4-fs (mmcblk0p2): recovery complete
[    7.503768] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    7.512622] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    7.522280] devtmpfs: mounted
[    7.527469] Freeing unused kernel memory: 1024K
[    7.533130] Run /sbin/init as init process
INIT: version 2.96 booting
Starting udev
[    8.367702] udevd[1051]: starting version 3.2.9
[    8.465270] udevd[1052]: starting eudev-3.2.9
[    9.937932] tda998x 0-0070: found TDA19988
[   10.211216] tilcdc 4830e000.lcdc: bound 0-0070 (ops tda998x_ops [tda998x])
[   10.354741] [drm] Initialized tilcdc 1.0.0 20121205 for 4830e000.lcdc on minor 0
[   10.622771] Console: switching to colour frame buffer device 160x50
[   10.722751] tilcdc 4830e000.lcdc: [drm] fb0: tilcdcdrmfb frame buffer device
[   10.766174] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[   10.798189] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[   10.876613] omap-aes 53500000.aes: will run requests pump with realtime priority
[   11.328856] cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
[   11.491309] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
FBIOPUT_VSCREENINFO failed, double buffering disabled[   20.907499] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Fri Feb  7 23:26:31 UTC 2025
Starting firewall
[   22.519766] NET: Registered protocol family 10
[   22.531792] Segment Routing with IPv6
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, failing
ifup: failed to bring up eth0
Starting system message bus: dbus.
Starting OpenBSD Secure Shell server: sshd
done.
Starting ntpd: done
Starting syslogd/klogd: done
 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon                       [ ok ]
 * Starting Custom Application ~ LAG: Custom
    ENABLE PIN CONFIGURED
    STOP PIN CONFIGURED
    PWM PIN CONFIGURED
/bin/chmod: cannot access '/tmp/user/0': No such file or directory       [ ok ]
/mnt is already in use

custom login: QQuickView does not support using windows as a root item.

If you wish to create your root window from QML, consider using QQmlApplicationEngine instead.

FONT APP:  QFont(Noto Sans JP,12,-1,5,50,0,0,0,0,0)