[PATCH v5 16/29] media: rockchip: rga: split flip and rotate into separate function
Nicolas Dufresne
nicolas at ndufresne.ca
Wed May 13 09:54:20 PDT 2026
Le mercredi 13 mai 2026 à 16:29 +0200, Sven Püschel a écrit :
> Philipp Zabel just mentioned that a 90 degree rotation would just cause
> the RGA to scale it to the output format (deforming if it isn't
> quadratic). The existing code already considers the rotation to set the
> scaling factor accordingly (which I've also missed in this commit. But
> the commit is dropped anyways in v6 due to the various footguns).
>
> While I see that the V4L2_CID_ROTATE docs mention the need to set the
> format according to the chosen rotation, it feels like it's intended for
> non-scaling converters. So I don't see a problem to just allow the
> current state, as the user has to adjust the format anyways if he isn't
> interested in a deformed image (instead of blocking this potential rare
> use-case).
>
> But I'd add a check in my scaling commit to also check in the streaming
> state that we don't set a 90 degree rotation causing the scaling factor
> to be exceeded (e.g. 1x2 -> 1x32 scales by 16, whereas 90 degree
> rotation causes a scaling factor of 32).
Ok, didn't think it would just break aspect ratio to make it fit, but it means
its valid for this HW.
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20260513/129bb930/attachment-0001.sig>
More information about the Linux-rockchip
mailing list