I had similar issues, but unfortunately I couldn't resolve this. The reason for this seems to be that the setprop ro.sf.hwrotation doesn't tell android which way the display is orientated, but what to accept as the default device rotation (like for a device without accelerometer).
(you can test this on an Android device in a rotatable app: if you rotate your phone left or right, it will rotate accordingly, but if you hold it upright and immediately hold it upside down, it will remain as is)
I fixed it on my system by changing the LVDS display invert X/Y pins so that it displays the other way around, and changed my touch driver to invert values... I'm sure there must be an easy way.
If I invert X/Y pin,just rotation 90 degree.I want to rotation 180 degree. I just debug the IPU driver. I configured the rots parameter is "IPU_ROTATE_180 = 3" in the ipu_ch_param_set_rotation functionof the ipu_common.c file.But the X axis is rotation, Y axis no change.I think is a problem of IPU drive.
typedef enum {
/* Note the enum values correspond to BAM value */IPU_ROTATE_NONE = 0,
IPU_ROTATE_VERT_FLIP = 1,
IPU_ROTATE_HORIZ_FLIP = 2,
IPU_ROTATE_180 = 3,
IPU_ROTATE_90_RIGHT = 4,
IPU_ROTATE_90_RIGHT_VFLIP = 5,
IPU_ROTATE_90_RIGHT_HFLIP = 6,
IPU_ROTATE_90_LEFT = 7,
} ipu_rotate_mode_t;