mbox series

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

Message ID 20250331222556.454334-1-lyude@redhat.com (mailing list archive)
Headers show
Series drm: Make some resolution info unsigned | expand

Message

Lyude Paul March 31, 2025, 10:23 p.m. UTC
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

Comments

Thomas Zimmermann April 1, 2025, 7:15 a.m. UTC | #1
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