Android 10 - i.MX8MMini - g2d rotation issue

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

Android 10 - i.MX8MMini - g2d rotation issue

跳至解决方案
24,471 次查看
gary_bisson
Senior Contributor III

Hi,

I've found an issue with the G2D HWC layer on i.MX8M Mini, here is my setup:

- Android 10.0.0-1.0.0 release

- i.MX8M Mini EVK platform

- MIPI display (1280x800 in my case)

- SF_PRIMARY_DISPLAY_ORIENTATION set to 90 (standard AOSP orientation variable)

That last variable changes the default display orientation from landscape to portrait in my case.

When using the default hwcomposer setting ("g2d 2D composition enabled!") rotation fails as you can see in the pictures attached:

- android10-imx8mm-portrait-g2dcompose.png = screencap output, looks correct/expected

- android10-imx8mm-portrait-g2dcompose-real-life.jpg = what I actually get on the screen

Now if I disable g2d hwc ("Opengl ES 3D composition enabled!"), it works as expected, it looks exactly like the screencap picture.

Let me know if you need any other info.

Regards,

Gary

1 解答
23,545 次查看
nxf56472
NXP Employee
NXP Employee

Attaching a more recent version of the patches proposed on this post that can help with this issue.

在原帖中查看解决方案

25 回复数
7,654 次查看
ChinhLD4
Contributor I

Hi,

The property: SF_PRIMARY_DISPLAY_ORIENTATION is a property set rotation for Primary display, so what is the property set rotation for Sub Display? 

I can't set Sub Display is a portrait

0 项奖励
回复
23,546 次查看
nxf56472
NXP Employee
NXP Employee

Attaching a more recent version of the patches proposed on this post that can help with this issue.

12,232 次查看
aber
Contributor III

Hi nxf56472

Refer to your patch system to rotate, but the video played under the system does not rotate. Have you encountered this problem?

0 项奖励
回复
12,537 次查看
gary_bisson
Senior Contributor III

Hi,

Thanks, I confirm that it works.

Regards

0 项奖励
回复
11,361 次查看
aber
Contributor III

Hi gary_bisson

    Have you ever tried whether there is a problem with the rotation of the mipi screen when the screen is vertical? Our screen resolution is (800x1280) and the video will not rotate when playing.Tks!

0 项奖励
回复
12,842 次查看
matt_frandsen
Contributor II

Is there any update on an actual fix for this?  I have the same issue and resolved it similarly by hacking the composer, but this is not a robust solution.  NXP is there any updates or a timeline for a resolution for this issue?  Thanks

13,050 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi,

"It is framework not pass the rotation information to HWC, no formal way to fix it."    Please use work round method now. Internal team will update if there will be HWC public code introduced the rotation information.

Regards

0 项奖励
回复
13,050 次查看
gary_bisson
Senior Contributor III

Hi,

Thank you for your feedback although I highly doubt this sentence is true as I know for a fact such rotation works fine with HWC from other silicon vendors. Let me know if you want the name of a platform that has HWC working as expected.

Regards,

Gary

13,050 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi,

This is not NXP HWC issue. framework doesn't consider it support in HWC.  there is only a workround to meet this  rotation anywhere request. 

Regards

0 项奖励
回复
13,050 次查看
gary_bisson
Senior Contributor III

Hi,

How come the "framework doesn't consider it support in HWC"? It must be something missing in the HWC declaration.

Can you point to the source code?

Why does it work on HWC of other vendors like Qualcomm?

Regards,

Gary

0 项奖励
回复
13,051 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Gary,

I forgot copy the above patch “rotation_anyway_0610.patch.zip”  Can you try it?

Regards

0 项奖励
回复
13,051 次查看
gary_bisson
Senior Contributor III

Hi,

It says "Unauthorized".

Regards,

Gary

0 项奖励
回复
13,051 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Here is

0 项奖励
回复
13,051 次查看
gary_bisson
Senior Contributor III

Hi,

That is indeed a workaround that works for 1 value. Will NXP integrate such approach for all possibilities (switch case basically)?

Regards,

Gary

0 项奖励
回复
13,050 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Gary,

This issue can be reproduced on 8mm-evk + 10.0.0_1.0.0 ga with build in rotation setting.

But with cmd line , it work well.  We will check this issue.

Regards

13,050 次查看
gary_bisson
Senior Contributor III

Hi,

Do you have any update on this issue?

Thanks,

Gary

0 项奖励
回复
13,050 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

I found the cause that composer layer should also rotate 90 when build in  SF_PRIMARY_DISPLAY_ORIENTATION=90,

can you try :

 

vendor\nxp-opensource\imx\display\display\Composer.cpp
int Composer::composeLayer(Layer* layer, bool bypass)
{
    if (layer == NULL || mTarget == NULL) {
        ALOGE("composeLayer: invalid layer or target");
        return -EINVAL;
    }
 // test composer rot90  // adding below code 
 layer->transform = 4; 

Regards

0 项奖励
回复
13,050 次查看
gary_bisson
Senior Contributor III

Hi,

I confirm that it fixes part of the problem, but then it breaks the user rotation:

content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1

Do you have any timeframe on the proper solution?

Regards,

Gary

0 项奖励
回复
13,051 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

it can't  rotate both these two methods. 

if they want to build in rotation , to use this way,  others please use cmd line to ration.

Regards

0 项奖励
回复
13,051 次查看
gary_bisson
Senior Contributor III

Hi,

I'm not sure i understand your reply.

But yes both rotation can happen, the one I'm talking about is the display orientation, that sets the display "default" rotation for a user rotation of 0. But then user can still rotate the display (via accelerometer or content command) that "adds" the rotation to original display orientation. That is how it works for 3G GPU rendering or with hwcomposer of other vendors.

Regards,

Gary

0 项奖励
回复