how to rotate display

Since raspi-config does not have an explicit display rotation option, how did you achieve it?

The display_hdmi_rotate setting works with legacy display driver only, default on RPi models prior to RPi 4 on Buster and no default on any RPi models since Bullseye.

With KMS (modern display driver), rotation for X applications (Kodi on Buster) to be done manually with xrandr:

xrandr --output HDMI-1 --rotate normal
xrandr --output HDMI-1 --rotate left
xrandr --output HDMI-1 --rotate right
xrandr --output HDMI-1 --rotate inverted

Although I remember there was a way to achieve it with xorg.conf settings.

For console it can be done via /boot/cmdline.txt, adding e.g.:

video=HDMI-A-1:1920x1080M@60,rotate=90,reflect_x`

But I’m not 100% sure whether this works for KMS applications like Kodi on Bullseye.