android UI format not match issue on imx7d android-pie

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

android UI format not match issue on imx7d android-pie

跳至解决方案
920 次查看
patrickzhang1024
Contributor II

Hi,

       I'm porting a new LCD to my imx7d DIY development board.

kernel: 4.14

android: 9

      Screen size is 320x240, physical format is RGB565. And I get a very weird issue. The main screen and some android applications can showing correctly. But some android applications are not refresh.

      If I do further debugging, I can find in FbDisplay.cpp, the updateScreen() function report buffer format is RGBA8888 but config format is RGB565, so the refresh operation is stopped.

 

     If I force the 

getBE().mRenderEngine =

         RE::impl::RenderEngine::create(HAL_PIXEL_FORMAT_RGBA_8888 

to be 

getBE().mRenderEngine =

            RE::impl::RenderEngine::create(HAL_PIXEL_FORMAT_RGB_565

those android application can show on the screen, but red and blue pixel are oppsite. If I use this method, I can't monitor the screen on my PC.

I want to know what thing cause this format not match issue and how do I perfectly fix it?

标记 (2)
0 项奖励
回复
1 解答
835 次查看
patrickzhang1024
Contributor II

Hi Zhiming,

 

    Thank you with your suggestion. I already find out a solution to fix that issue. By rotate the screen orientation in kotlin project. Probably, layout height is too long for android framework to resize. I should change the width:height in my layout.

 

Regards!

PatrickZ

在原帖中查看解决方案

0 项奖励
回复
4 回复数
883 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

This may have something to do with the code of the application that is having problems, the application is using 32bit data, so in the HAL layer code the return is RGB888. You need to look at the code of the application again to try to fix the problem.

https://github.com/nxp-imx-android/android-imx_platform_hardware_imx/blob/p9.0.0_2.3.4/display/displ...

Best Regards,
Zhiming

0 项奖励
回复
878 次查看
patrickzhang1024
Contributor II

Hi Zhiming,

    Do you mean it might be something wrong in the android kotlin application? The config.format in Fbdisplay is all right, and I think the issue is comes from surfaceflinger. The buffer.format remains RGBA8888.

 

Regards!

Patrick Zhang

0 项奖励
回复
843 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

As my understanding about surfaceflinger, the surfaceflinger is a Render Engine, it receives the operations from application layer  and then call the fbdisplay to display. So the issue could from application layer, the app tells Render Engine how to render a frame. I don't think the Render Engine is designed for one pixel format, the pixel format should be set from the app layer.

Best Regards,
Zhiming

0 项奖励
回复
836 次查看
patrickzhang1024
Contributor II

Hi Zhiming,

 

    Thank you with your suggestion. I already find out a solution to fix that issue. By rotate the screen orientation in kotlin project. Probably, layout height is too long for android framework to resize. I should change the width:height in my layout.

 

Regards!

PatrickZ

0 项奖励
回复