[Intel-gfx] [PATCH 06/12] drm: Shrink {width,height}_mm to u16

Emil Velikov emil.l.velikov at gmail.com
Thu Feb 20 12:48:17 UTC 2020


On Wed, 19 Feb 2020 at 20:36, Ville Syrjala
<ville.syrjala at linux.intel.com> wrote:
>
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Instead of supporting ~2000km wide displayes let's limit ourselves
> to ~65m. That seems plenty big enough to me.
>
> Even with EDID_QUIRK_DETAILED_IN_CM EDIDs seem to be limited to
> 10*0xfff which fits into the 16 bits.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  include/drm/drm_modes.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
> index 52e8ca613e4b..2bb2b1a8592a 100644
> --- a/include/drm/drm_modes.h
> +++ b/include/drm/drm_modes.h
> @@ -330,7 +330,7 @@ struct drm_display_mode {
>          * Addressable size of the output in mm, projectors should set this to
>          * 0.
>          */
> -       int width_mm;
> +       u16 width_mm;
>
>         /**
>          * @height_mm:
> @@ -338,7 +338,7 @@ struct drm_display_mode {
>          * Addressable size of the output in mm, projectors should set this to
>          * 0.
>          */
> -       int height_mm;
> +       u16 height_mm;
>
Fwiw we could do the same for struct drm_display_info, although we
should be carefull since that info sets passed to userspace.

Regardless, this patch is:
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

-Emil


More information about the dri-devel mailing list