drm/mode_config: Make drm_mode_config.(max|min)_(width|height) unsigned

It doesn't make much sense to allow devices to specify their min/max
resolution as signed integers, and in Rust with CONFIG_RUST_OVERFLOW_CHECKS
enabled this provides us actual over/underflow checks. Similarly, it
doesn't really make much sense for us to allow devices to specify their
minimum/maximum resolution as signed.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250331222556.454334-3-lyude@redhat.com
This commit is contained in:
Lyude Paul 2025-03-31 18:23:55 -04:00
parent 4190aa3a76
commit 8abaa80b40

View File

@ -532,8 +532,8 @@ struct drm_mode_config {
*/
struct list_head privobj_list;
int min_width, min_height;
int max_width, max_height;
unsigned int min_width, min_height;
unsigned int max_width, max_height;
const struct drm_mode_config_funcs *funcs;
/* output poll support */