Rotate Android Screen 180 & 280 degrees

Hey,
We’re trying to figure out how to permanently rotate the screen 180 & 270 degrees. We have our screen installed upside down and can’t seem to figure out which config file to modify to flip it around.

This is for an Android build but we’re not going through the HDMI port. We’re going through the DSI port.

In the Android kernel you can set the devicetree property qcom,mdss-dsi-panel-orientation in the devicetree node of the panel to configure how the panel is mounted.

In your case I believe it should be:

panel {
  ... your other properties ...
  qcom,mdss-dsi-panel-orientation = "180";
}

For further reference see Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt

Regards,
Bjorn