We have a custom IMX6Q device in which Android 4.4.3 is running, we change the property ro.sf.hwrotation=270 in init.rc file to rotate the screen to and get the portrait layout due to hardware/mechanical design placement (LCD is 800x480 landscape, parallel RGB).
The issue 1 is when launch/close an app, or during suspend, the screen momentarily flips/rotates to landscape layout and then restores back.
The issue 2 is the touch can't work, seems the x,y didn't mapping the screen orientation.
The issues can also be found on mx6q sdb with original bsp build (4.4.3/5.0/5.1) when setprop ro.sf.hwrotation=270
We have tried the patch for inputreader,windowmanagerservice,mxc_ipuv3_fb.c, but without success.
Display Rotation in Android
Hope we can get some help to fix the issues.