android UI format not match issue on imx7d android-pie

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

android UI format not match issue on imx7d android-pie

Jump to solution
924 Views
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?

Tags (2)
0 Kudos
Reply
1 Solution
839 Views
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

View solution in original post

0 Kudos
Reply
4 Replies
887 Views
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 Kudos
Reply
882 Views
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 Kudos
Reply
847 Views
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 Kudos
Reply
840 Views
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 Kudos
Reply