内核或用户空间负责旋转帧缓冲区以匹配屏幕
我正在开发屏幕顺时针旋转 90 度的嵌入式设备:屏幕控制器报告 800x600 屏幕,而设备屏幕为 600x800 纵向。
您认为谁的责任是补偿这一点:内核是否应该按照上层软件或应用程序(X 服务器、bootsplash)的预期旋转帧缓冲区以提供 800x600 屏幕,应该适应并绘制到旋转屏幕?
堆栈的每个部分都是自由软件,因此不存在需要修改的非技术问题,问题更多的是逻辑健全性。
I'm working on embedded device with screen rotated 90 degrees clockwise: screen controller reports 800x600 screen, while device's screen is 600x800 portrait.
What do you think, whose responsibility it is to compensate for this: should kernel rotate framebuffer to provide 800x600 screen as expected by upper-level software or applications (X server, bootsplash) should adapt and draw to rotated screen?
Every part of stack is free software, so there are no non-technical problems for modification, the question is more about logical soundness.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于屏幕驱动程序来说,这样做是最有意义的 - 毕竟内核应该为用户空间应用程序提供设备的抽象。如果屏幕是 600x800 纵向设备,那么这就是应用程序应该从内核看到的内容。
It makes most sense for the screen driver to do it - the kernel after all is supposed to provide an abstraction of the device for the userspace applications to work with. If the screen is a 600x800 portrait oriented device, then that's what applications should see from the kernel.
是的,我同意,显示驱动程序应该相应地更新显示并保持控制
yes,I agree, The display driver should update the display accordingly and keep the control
不确定您的嵌入式设备到底有多标准,如果它运行的是常规 Linux 内核,您可以检查内核配置器(在编译新内核时进行 xconfig),这是设备中内核 2.6.37.6 的选项之一,视频卡部分,用于启用内核消息显示的旋转,以便在启动时向左或向右滚动 90 度。
我认为它也可以使您的控制台在登录后正确旋转。
这在 6-8 个月前的内核中还不可用,至少在当时 slackware64 13.37 附带的内核中不可用。
请注意,BIOS 消息仍然在 PC 主板上轮换,
但这是在BIOS中硬编码的,这可能不适用于您正在使用的嵌入式系统。
如果这个内核功能出于某种原因对您没有用处,那么他们如何在 Linux 内核中实现它可能是在何处以及如何实现它的好例子。一旦您从“make xconfig”中获得了该选项的确切名称,就可以很容易地搜索该名称记录内核流量的位置并挖掘有关它的一些信息。
嗯。我今天刚刚重新编译了我的内核,我可能错误地认为这个选项有多新。看起来它在我引用的 Slackware64 附带版本之前的某些内核版本中可用。对不起!
Not sure exactly how standard your embedded device is, if it is running a regular linux kernel, you might check in the kernel configurator (make xconfig, when compiling a new kernel) , one of the options for kernel 2.6.37.6 in the device, video card section, is to enable rotation of the kernel messages display so it scrolls 90 degrees left or right while booting up.
I think it also makes your consoles be rotated correctly after login too.
This was not available in kernels even 6-8 months ago, at least not available in kernel that slackware64 13.37 came with about that time.
Note that the bios messages are still rotated on a PC motherboard,
but that is hard-coded in the bios, which may not apply to the embedded system you are working with.
If this kernel feature is not useful to you for whatever reason, how they did it in the linux kernel might be good example of where and how to go about it. Once you get the exact name of the option from "make xconfig", it should be pretty easy to search where ever they log the kernel traffic for that name and dig up some info about it.
Hmmm. I just recompiled my kernel today, and I may have been wrong about how new this option is. Looks like it was available with some kernel versions before the included-with-Slackware64 versions that I referenced. Sorry!