V853SDK:奇怪的帧缓冲区操作
-
在我的系统上,在显示设置的 board.dtb 中,像素格式指定为 RGBA。 每个像素都用 32 位数字进行编码。 三个最低有效字节是 R/G/B 分量。 最高有效字节是 Alpha 通道。 Alpha 通道应该像这样工作:
值 0xff - 像素完全透明(不可见)。
值 0 - 像素完全不透明
其他值是中等透明度。我编写了一个测试程序,以像素为单位输出 alpha 值为 0 的图像。但是,我得到了黑屏。 在进一步的实验中我 我发现如果 Alpha 通道值不是零,则图像是可见的。
但 Alpha 通道值不会影响透明度级别。这很奇怪。
我查看了linux内核中视频控制器驱动程序的源代码。 发现 在可选的 colorbar 函数中,在形成时绘制颜色条 图像的 Alpha 通道值设置为 0xff 。 也就是说,这种行为 从驾驶员的角度来看,这是“正常”的。 但从标准的角度来看——不。
lvgl 库很可能也考虑到了这一点,因为 lv_examples 可以正确显示图像。 但其他程序要么输出扭曲的图像 花或黑屏。
经过进一步调查内核驱动程序,我发现在图像层设置中 对于显示引擎参数中的 RT-Mixer 块:
配置.info.alpha_mode = 0;
初始化帧缓冲区时。
该值对应于“标准”Alpha 通道操作。 然而它不起作用。
这是什么? RT-Mixer 硬件错误? 或者可以通过参数值来修正吗?
我可以尝试自己解决这个问题,但是我没有V853的Display_Engine的描述,也找不到它。 我在哪里可以得到它?
有来自较旧处理器的 Diplay_Engine 的描述:H3、H5、H8、A83.
也许其中一些与V853一致 (RT-Mixer0 偏移地址) ?在我的设备程序中,我可以轻松设置像素的 Alpha 通道,以便 我有一个图像,但我想让它按照标准工作。
-
try to use english to describe, the translate I can't understand.
-
Ok.
On my system in board.dtb set display parameter "fb format" = 0 : RGBA. This format is 32 bits per pixel. Three low bytes are component R/G/B . High byte is alpha-channel. Alpha-channel must work :
value = 0xff : pixel fully transparent (invisible) .
value = 0 : pixel fully non-transparent.
intermediate values : transparency level.I wrote simple test program, which draw image by pixels with alpha-channel value 0 (fully non-transparent), but i got a black screen. To experiment, i set pixels alpha channel to non-zero value. The image became visible, but alpha-channel value is not affect to transparency level.
This is very strange. Work of alpha-channel fully non-correct.
In kernel display driver source i found optional function "color bar", which draw color bands. In this function programmed pixels with alpha-channel value = 0xff. It mean, in this function wrong work of driver is "workarounded".
I think, this also taken into account in LVGL library in SDK : "lv_examples" application draw right images.
But other programs, built separately from SDK, draw distorted colors, or black screen.Also i found in kernel display driver source init of parameter
config.info.alpha_mode = 0;
for RT-Mixer (part of Display Engine) layer in framebuffer initialization. This parameter value means "alpha-channel for each pixel", and i may to expect "standard" work of alpha-channel. In fact, this is not the case.
What is this? Hardware bug of RT-Mixer? or it may be corrected through RT-Mixer register values?
I may to try to correct problem myself, but i do not have documentation for V853 Display Engine.
Where i may download it?
I have description of Display Engine for old AllWinner MPUs : H3, H8, A83. What of this is match to V853 Display Engine?I may to easy set alpha-channel of pixel to value, which work, for my programs to this device, but i need standard work of framebuffer.
-
@alb702 try to
cat /sys/class/disp/disp/attr/sys
empty:
root@TinaLinux:/# cat /sys/class/disp/disp/attr/sys screen 0: de_rate 300000000 hz, ref_fps:62 mgr0: 800x1280 fmt[rgb] cs[0x204] range[full] eotf[0x4] bits[8bits] err[0] force_sync[0] unblank direct_show[false] iommu[1] dmabuf: cache[0] cache max[0] umap skip[0] umap skip max[52] lcd output backlight(100) fps:62.1 800x1280 err:0 skip:228 irq:2786 vsync:0 vsync_skip:0 BUF enable ch[1] lyr[0] z[16] prem[N] a[pixel 255] fmt[ 0] fb[ 800,1280; 800,1280; 800,1280] crop[ 0, 0, 800,1280] frame[ 0, 0, 800,1280] addr[ff800000, 0, 0] flags[0x 0] trd[0,0] depth[ 0]
add layer
cat /sys/class/disp/disp/attr/sys screen 0: de_rate 300000000 hz, ref_fps:62 mgr0: 800x1280 fmt[rgb] cs[0x204] range[full] eotf[0x4] bits[8bits] err[0] force_sync[0] unblank direct_show[false] iommu[1] dmabuf: cache[0] cache max[0] umap skip[0] umap skip max[52] lcd output backlight(100) fps:62.1 800x1280 err:933 skip:228 irq:6815 vsync:0 vsync_skip:0 COLOR enable ch[0] lyr[0] z[16] prem[N] a[pixel 0] fmt[ 0] fb[ 0, 0; 0, 0; 0, 0] crop[ 0, 0, 200,1280] frame[ 0, 0, 200,1280] addr[ffff0000, 0, 0] flags[0x 0] trd[0,0] depth[ 0] COLOR enable ch[0] lyr[1] z[16] prem[N] a[pixel 0] fmt[ 0] fb[ 0, 0; 0, 0; 0, 0] crop[ 200, 0, 200,1280] frame[ 200, 0, 200,1280] addr[ff00ff00, 0, 0] flags[0x 0] trd[0,0] depth[ 0] COLOR enable ch[0] lyr[2] z[16] prem[N] a[pixel 0] fmt[ 0] fb[ 0, 0; 0, 0; 0, 0] crop[ 400, 0, 200,1280] frame[ 400, 0, 200,1280] addr[ff0000ff, 0, 0] flags[0x 0] trd[0,0] depth[ 0] COLOR enable ch[0] lyr[3] z[16] prem[N] a[pixel 0] fmt[ 0] fb[ 0, 0; 0, 0; 0, 0] crop[ 600, 0, 200,1280] frame[ 600, 0, 200,1280] addr[ffffff00, 0, 0] flags[0x 0] trd[0,0] depth[ 0] BUF enable ch[1] lyr[0] z[16] prem[N] a[pixel 255] fmt[ 0] fb[ 800,1280; 800,1280; 800,1280] crop[ 0, 0, 800,1280] frame[ 0, 0, 800,1280] addr[ff800000, 0, 0] flags[0x 0] trd[0,0] depth[ 0]
-
@awwwwa 在 V853SDK:奇怪的帧缓冲区操作 中说:
cat /sys/class/disp/disp/attr/sys
cat /sys/class/disp/disp/attr/sys screen 0: de_rate 300000000 hz, ref_fps:60 mgr0: 1920x1080 fmt[rgb] cs[0x204] range[full] eotf[0x4] bits[8bits] err[3] force_sync[0] unblank direct_show[false] iommu[1] dmabuf: cache[0] cache max[0] umap skip[0] umap skip max[52] lcd output backlight(150) fps:59.5 1920x1080 err:0 skip:154 irq:8267 vsync:0 vsync_skip:0 BUF enable ch[1] lyr[0] z[16] prem[N] a[pixel 255] fmt[ 0] fb[1920,1080;1920,1080;1920,1080] crop[ 0, 0,1920,1080] frame[ 0, 0,1920,1080] addr[48400000, 0, 0] flags[0x 0] trd[0,0] depth[ 0]
"add layer" - i do not understanded.
-
@alb702 add your layer and cat that file see what layer you configured
Copyright © 2023 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号