Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    V853 G2D垂直镜像有bug

    V Series
    1
    1
    683
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jonli_aw LV 5 last edited by xiaowenge

      g2d_blt_flags_h 定义二元光栅操作码,

      typedef enum {
      ...
      G2D_ROT_90 = 0x00000100,
      G2D_ROT_180 = 0x00000200,
      G2D_ROT_270 = 0x00000300,
      G2D_ROT_0 = 0x00000400,
      G2D_ROT_H = 0x00001000,
      G2D_ROT_V = 0x00002000,
      ...
      } g2d_blt_flags_h;
      
      我在使用LVGL的旋转相关的代码(lvgl只处理了0、90、180、270),对接了一下G2D_ROT_H、G2D_ROT_V 。如下lvgl sunxifb_init函数中增加了case LV_DISP_HORIZONTAL和case LV_DISP_VERTICAL。
      void sunxifb_init(uint32_t rotated) {
      ...
              case LV_DISP_ROT_270:
                  sinfo.rotated = G2D_ROT_90;
                  sinfo.rotatefbp_w = vinfo.yres;
                  sinfo.rotatefbp_h = vinfo.xres;
                  fbp_w = vinfo.yres;
                  fbp_h = vinfo.xres;
                  fbp_line_length = fbp_w * vinfo.bits_per_pixel / 8;
                  break;
      	case LV_DISP_HORIZONTAL:
                  sinfo.rotated = G2D_ROT_H;//水平镜像
                  sinfo.rotatefbp_w = vinfo.xres;
                  sinfo.rotatefbp_h = vinfo.yres;
      	    break;
      	case LV_DISP_VERTICAL:
                  sinfo.rotated = G2D_ROT_V;//垂直镜像
                  sinfo.rotatefbp_w = vinfo.xres;
                  sinfo.rotatefbp_h = vinfo.yres;
      ...
      }
      

      其中G2D_ROT_H水平镜像是验证ok,只有G2D_ROT_V 垂直镜像的时候,发现显示内容虽然垂直镜像了,但是显示不全,我试过几个分辨率,1920x1080、1024x768都有问题,只有320x320才能正常。

      所以我怀疑硬件G2D有垂直镜像是有bug的,但是我不知道如何修改好,驱动看了下也没有对应的寄存器手册有介绍,所以不知道如何处理,还请大佬们给个方向。

      正常方向图片(1024x768):
      ab4a3a26-4de3-435c-b103-8a5633de23d7-image.png

      垂直镜像不正常的图片,显示有黑边不全(1024x768):
      7419d83a-b96a-480e-997a-d4fbef43762d-image.png

      垂直镜像正常的图片(320x320):
      fbe032b5-1b9f-41bf-b310-1bd6097280a0-image.png

      1 Reply Last reply Reply Quote Share 0
      • 1 / 1
      • First post
        Last post

      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策