Rotate Display/Touch by 180°

Hello,

I try to rotate the display/touch by 180°.

While the default qt4-x11-demo app is running i can rotate via xrandr -o inverted, but:

  1. display output has a small offset to the right,
  2. the touch is also invertec.

Questions:

  1. How can I achieve that only the display output inverted?
  2. How can i achieve this for boot-up console output and without running qt4-x11-demo?