[PATCH v2 0/2] drm: Make some resolution info unsigned

Lyude Paul posted 2 patches 8 months, 3 weeks ago
drivers/gpu/drm/drm_edid.c    | 10 ++--------
include/drm/drm_edid.h        |  2 +-
include/drm/drm_mode_config.h |  4 ++--
3 files changed, 5 insertions(+), 11 deletions(-)
[PATCH v2 0/2] drm: Make some resolution info unsigned
Posted by Lyude Paul 8 months, 3 weeks ago
During the review of some of my patches for KMS bindings in Rust, it was
pointed out we have some areas of DRM that are storing resolutions as
signed integers when it doesn't really make sense. Since Rust has
arithematic overflow checking by default in the kernel, let's change
these to unsigned so that we can take advantage of that.

Lyude Paul (2):
  drm/edid: Use unsigned int in drm_add_modes_noedid()
  drm/mode_config: Make drm_mode_config.(max|min)_(width|height)
    unsigned

 drivers/gpu/drm/drm_edid.c    | 10 ++--------
 include/drm/drm_edid.h        |  2 +-
 include/drm/drm_mode_config.h |  4 ++--
 3 files changed, 5 insertions(+), 11 deletions(-)


base-commit: cf05922d63e2ae6a9b1b52ff5236a44c3b29f78c
-- 
2.48.1
Re: [PATCH v2 0/2] drm: Make some resolution info unsigned
Posted by Thomas Zimmermann 8 months, 3 weeks ago
Hi

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

for the series.

Best regards
Thomas

Am 01.04.25 um 00:23 schrieb Lyude Paul:
> During the review of some of my patches for KMS bindings in Rust, it was
> pointed out we have some areas of DRM that are storing resolutions as
> signed integers when it doesn't really make sense. Since Rust has
> arithematic overflow checking by default in the kernel, let's change
> these to unsigned so that we can take advantage of that.
>
> Lyude Paul (2):
>    drm/edid: Use unsigned int in drm_add_modes_noedid()
>    drm/mode_config: Make drm_mode_config.(max|min)_(width|height)
>      unsigned
>
>   drivers/gpu/drm/drm_edid.c    | 10 ++--------
>   include/drm/drm_edid.h        |  2 +-
>   include/drm/drm_mode_config.h |  4 ++--
>   3 files changed, 5 insertions(+), 11 deletions(-)
>
>
> base-commit: cf05922d63e2ae6a9b1b52ff5236a44c3b29f78c

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)