QT5 LinuxFB rotation for LCDs patch

I wrote up this patch as I needed to get a landscape display on a LCD which was actually intended for portrait (and so its resolution and framebuffer had to be setup for portrait, it was just physically oriented as landscape). This is a common problem for people using ILI9341/ILI9340 controllers found on cheapo TFT LCDs. These LCDs come setup for a portrait mode on the RGB interface with no option to change it, they do have an SPI interface where you can alter the settings but the display data must always be sent over SPI.

This other problem is going from QT4 to QT5, the transformation options previously available were removed with the old QWS system and now QT5 doesn’t have any way to rotate the image going to the framebuffer.

This patch improves the LinuxFB platform plugin to create an rotation option which can rotate the display by 90,180 and 270 degrees.

Usage is simple, simply append the rotation= parameter with a value of 0,90,180, or 270:

export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0:rotation=90

Or use it in the program launch args

-platform linuxfb:fb=/dev/fb0:rotation=90

You need to recompile qtbase to apply this. This was done against QT5.4 but I doubt the files being modified have changed since QT5 was released.

Download here: qt5.4_linuxfb_rotation.patch

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
topeet_rk3568_lcds.dtsi是一个设备树源文件,用于描述Rockchip RK3568平台上的LCD显示屏配置。 在这个文件中,我们可以找到不同类型的LCD屏幕的配置信息,包括屏幕的分辨率、时序控制、电源、背光等参数。 首先,这个文件定义了一个名为"lcd_panel"的节点,其中包含了LCD屏幕的基本属性。例如,屏幕的厂商名称、型号、物理尺寸等信息。 接下来,我们可以看到一个名为 "lcd_panel_init_sequence"的子节点,它描述了LCD屏幕初始化时需要执行的一系列指令。这些指令用于配置LCD控制器,并确保屏幕能正确显示。 此外,还可以找到一些控制电源和背光的节点。这些节点定义了LCD屏幕的电源和背光控制引脚,以及相应的电平状态。通过配置这些节点,我们可以在设备树中实现对LCD屏幕电源和背光的控制。 设备树源文件的作用是将硬件配置信息以一种结构化的方式呈现,并通过操作系统内核来解释硬件的特性和使用方法。这个文件可以与其他设备树源文件配合使用,以确保硬件与操作系统的正常通信和协作。 总之,topeet_rk3568_lcds.dtsi是一个用于描述Rockchip RK3568平台上LCD屏幕配置的设备树源文件,它定义了LCD屏幕的基本属性、初始化序列以及电源和背光的控制配置。通过这个文件,操作系统可以正确识别和使用LCD屏幕,实现图形显示功能。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值