]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/rockchip: Declare framebuffer width/height bounds
authorDaniel Stone <daniels@collabora.com>
Wed, 15 Oct 2025 11:00:31 +0000 (12:00 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 20 Oct 2025 13:56:10 +0000 (15:56 +0200)
commit4bfaa85bb5f7880ff51be1d2a2e031fe4270411a
treedefa52f0e209c391383d7c8d34896b1d72b59701
parentf233921d988ae6a990e76d0532b241ce3dc57c12
drm/rockchip: Declare framebuffer width/height bounds

The VOP2 has limitations on its input and output sizes. The clipped
display region must be at least 4px in each dimension for both
framebuffer source and plane destination, and the clipped source region
must be no greater than a per-version limit.

It is never valid for VOP2 to have a framebuffer which is less than four
pixels in either dimension, so declare that as our min width/height,
enforced by AddFB failing if the user tries. It can theoretically be
valid to have a single large framebuffer of which only certain clipped
regions are shown, but this is a very uncommon case. Declaring to
userspace that the framebuffer's maximum width and height is the maximum
source clip helps it make better decisions as to which mode to use,
instead of trying unsupported sizes and having to fall back.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20251015110042.41273-3-daniels@collabora.com
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c