There is another option you have to set right after
"ro.sf.hwrotation=180" in "build.prop" file:
persist.hwc.mirroring.transform=1
OR
persist.hwc.mirroring.transform=2
where the argument is 0..3! 0 - 0 degrees , 1 - 90 degrees, 2 - 180
degrees and 3 - 270 degrees.
This option sets the rotation angle between LCD and HDMI output!
I hope this will help!
Cheers!!!