media: rockchip: rga: use clamp() to clamp size to limits
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 13 Oct 2023 11:00:28 +0000 (13:00 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 7 Dec 2023 07:56:14 +0000 (08:56 +0100)
commit60faf2b82b52ffc3f75ad7ddc28691ce3c367d82
treee960361d31a4d5ab8d16e7537f57cf838a93ee3e
parentec9ef8dda2a24ce1c13904f0d46867c0aa6b4ee7
media: rockchip: rga: use clamp() to clamp size to limits

The try_fmt should limit the width and height to the know limits of the
RGA. Use the clamp() helper instead of open coding the clamping.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/rockchip/rga/rga.c