[Intel-gfx] [PATCH] drm/edid: Populate picture aspect ratio for CEA modes

Alex Deucher alexdeucher at gmail.com
Thu Dec 19 14:45:59 CET 2013


On Thu, Dec 19, 2013 at 5:04 AM, Vandana Kannan
<vandana.kannan at intel.com> wrote:
> Adding picture aspect ratio for CEA modes based on CEA-861D Table 3 or
> CEA-861E Table 4. This is useful for filling up the detail in AVI
> infoframe.
>
> v2: Ville's review comments incorporated
> Added picture aspect ratio as part of edid_cea_modes instead of DRM_MODE
>
> Signed-off-by: Vandana Kannan <vandana.kannan at intel.com>
> Reviewed-by: Ville Syrjala <ville.syrjala at linux.intel.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/drm_edid.c |  128 ++++++++++++++++++++++----------------------
>  include/drm/drm_crtc.h     |    2 +
>  2 files changed, 66 insertions(+), 64 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index fb7cf0e..20e3784 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -600,347 +600,347 @@ static const struct drm_display_mode edid_cea_modes[] = {
>         { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25175, 640, 656,
>                    752, 800, 0, 480, 490, 492, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 2 - 720x480 at 60Hz */
>         { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 27000, 720, 736,
>                    798, 858, 0, 480, 489, 495, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 3 - 720x480 at 60Hz */
>         { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 27000, 720, 736,
>                    798, 858, 0, 480, 489, 495, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 4 - 1280x720 at 60Hz */
>         { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
>                    1430, 1650, 0, 720, 725, 730, 750, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 5 - 1920x1080i at 60Hz */
>         { DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
>                    2052, 2200, 0, 1080, 1084, 1094, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
>                         DRM_MODE_FLAG_INTERLACE),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 6 - 1440x480i at 60Hz */
>         { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
>                    1602, 1716, 0, 480, 488, 494, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 7 - 1440x480i at 60Hz */
>         { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
>                    1602, 1716, 0, 480, 488, 494, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 8 - 1440x240 at 60Hz */
>         { DRM_MODE("1440x240", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
>                    1602, 1716, 0, 240, 244, 247, 262, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 9 - 1440x240 at 60Hz */
>         { DRM_MODE("1440x240", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
>                    1602, 1716, 0, 240, 244, 247, 262, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 10 - 2880x480i at 60Hz */
>         { DRM_MODE("2880x480i", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
>                    3204, 3432, 0, 480, 488, 494, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 11 - 2880x480i at 60Hz */
>         { DRM_MODE("2880x480i", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
>                    3204, 3432, 0, 480, 488, 494, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 12 - 2880x240 at 60Hz */
>         { DRM_MODE("2880x240", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
>                    3204, 3432, 0, 240, 244, 247, 262, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 13 - 2880x240 at 60Hz */
>         { DRM_MODE("2880x240", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
>                    3204, 3432, 0, 240, 244, 247, 262, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 14 - 1440x480 at 60Hz */
>         { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1472,
>                    1596, 1716, 0, 480, 489, 495, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 15 - 1440x480 at 60Hz */
>         { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1472,
>                    1596, 1716, 0, 480, 489, 495, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 16 - 1920x1080 at 60Hz */
>         { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
>                    2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 17 - 720x576 at 50Hz */
>         { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 27000, 720, 732,
>                    796, 864, 0, 576, 581, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 18 - 720x576 at 50Hz */
>         { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 27000, 720, 732,
>                    796, 864, 0, 576, 581, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 19 - 1280x720 at 50Hz */
>         { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
>                    1760, 1980, 0, 720, 725, 730, 750, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 20 - 1920x1080i at 50Hz */
>         { DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
>                    2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
>                         DRM_MODE_FLAG_INTERLACE),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 21 - 1440x576i at 50Hz */
>         { DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
>                    1590, 1728, 0, 576, 580, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 22 - 1440x576i at 50Hz */
>         { DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
>                    1590, 1728, 0, 576, 580, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 23 - 1440x288 at 50Hz */
>         { DRM_MODE("1440x288", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
>                    1590, 1728, 0, 288, 290, 293, 312, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 24 - 1440x288 at 50Hz */
>         { DRM_MODE("1440x288", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
>                    1590, 1728, 0, 288, 290, 293, 312, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 25 - 2880x576i at 50Hz */
>         { DRM_MODE("2880x576i", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
>                    3180, 3456, 0, 576, 580, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 26 - 2880x576i at 50Hz */
>         { DRM_MODE("2880x576i", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
>                    3180, 3456, 0, 576, 580, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 27 - 2880x288 at 50Hz */
>         { DRM_MODE("2880x288", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
>                    3180, 3456, 0, 288, 290, 293, 312, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 28 - 2880x288 at 50Hz */
>         { DRM_MODE("2880x288", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
>                    3180, 3456, 0, 288, 290, 293, 312, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 29 - 1440x576 at 50Hz */
>         { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
>                    1592, 1728, 0, 576, 581, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 30 - 1440x576 at 50Hz */
>         { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
>                    1592, 1728, 0, 576, 581, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 31 - 1920x1080 at 50Hz */
>         { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
>                    2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 32 - 1920x1080 at 24Hz */
>         { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
>                    2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 24, },
> +         .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 33 - 1920x1080 at 25Hz */
>         { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
>                    2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 25, },
> +         .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 34 - 1920x1080 at 30Hz */
>         { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
>                    2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 30, },
> +         .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 35 - 2880x480 at 60Hz */
>         { DRM_MODE("2880x480", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2944,
>                    3192, 3432, 0, 480, 489, 495, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 36 - 2880x480 at 60Hz */
>         { DRM_MODE("2880x480", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2944,
>                    3192, 3432, 0, 480, 489, 495, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 60, },
> +         .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 37 - 2880x576 at 50Hz */
>         { DRM_MODE("2880x576", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2928,
>                    3184, 3456, 0, 576, 581, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 38 - 2880x576 at 50Hz */
>         { DRM_MODE("2880x576", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2928,
>                    3184, 3456, 0, 576, 581, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 39 - 1920x1080i at 50Hz */
>         { DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 72000, 1920, 1952,
>                    2120, 2304, 0, 1080, 1126, 1136, 1250, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE),
> -         .vrefresh = 50, },
> +         .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 40 - 1920x1080i at 100Hz */
>         { DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
>                    2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
>                         DRM_MODE_FLAG_INTERLACE),
> -         .vrefresh = 100, },
> +         .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 41 - 1280x720 at 100Hz */
>         { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
>                    1760, 1980, 0, 720, 725, 730, 750, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 100, },
> +         .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 42 - 720x576 at 100Hz */
>         { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 54000, 720, 732,
>                    796, 864, 0, 576, 581, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 100, },
> +         .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 43 - 720x576 at 100Hz */
>         { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 54000, 720, 732,
>                    796, 864, 0, 576, 581, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 100, },
> +         .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 44 - 1440x576i at 100Hz */
>         { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
>                    1590, 1728, 0, 576, 580, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 100, },
> +         .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 45 - 1440x576i at 100Hz */
>         { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
>                    1590, 1728, 0, 576, 580, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 100, },
> +         .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 46 - 1920x1080i at 120Hz */
>         { DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
>                    2052, 2200, 0, 1080, 1084, 1094, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
>                         DRM_MODE_FLAG_INTERLACE),
> -         .vrefresh = 120, },
> +         .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 47 - 1280x720 at 120Hz */
>         { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
>                    1430, 1650, 0, 720, 725, 730, 750, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 120, },
> +         .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 48 - 720x480 at 120Hz */
>         { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 54000, 720, 736,
>                    798, 858, 0, 480, 489, 495, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 120, },
> +         .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 49 - 720x480 at 120Hz */
>         { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 54000, 720, 736,
>                    798, 858, 0, 480, 489, 495, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 120, },
> +         .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 50 - 1440x480i at 120Hz */
>         { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1478,
>                    1602, 1716, 0, 480, 488, 494, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 120, },
> +         .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 51 - 1440x480i at 120Hz */
>         { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1478,
>                    1602, 1716, 0, 480, 488, 494, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 120, },
> +         .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 52 - 720x576 at 200Hz */
>         { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 108000, 720, 732,
>                    796, 864, 0, 576, 581, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 200, },
> +         .vrefresh = 200, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 53 - 720x576 at 200Hz */
>         { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 108000, 720, 732,
>                    796, 864, 0, 576, 581, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 200, },
> +         .vrefresh = 200, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 54 - 1440x576i at 200Hz */
>         { DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1464,
>                    1590, 1728, 0, 576, 580, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 200, },
> +         .vrefresh = 200, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 55 - 1440x576i at 200Hz */
>         { DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1464,
>                    1590, 1728, 0, 576, 580, 586, 625, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 200, },
> +         .vrefresh = 200, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 56 - 720x480 at 240Hz */
>         { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 108000, 720, 736,
>                    798, 858, 0, 480, 489, 495, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 240, },
> +         .vrefresh = 240, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 57 - 720x480 at 240Hz */
>         { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 108000, 720, 736,
>                    798, 858, 0, 480, 489, 495, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
> -         .vrefresh = 240, },
> +         .vrefresh = 240, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 58 - 1440x480i at 240 */
>         { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1478,
>                    1602, 1716, 0, 480, 488, 494, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 240, },
> +         .vrefresh = 240, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
>         /* 59 - 1440x480i at 240 */
>         { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1478,
>                    1602, 1716, 0, 480, 488, 494, 525, 0,
>                    DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>                         DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> -         .vrefresh = 240, },
> +         .vrefresh = 240, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 60 - 1280x720 at 24Hz */
>         { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
>                    3080, 3300, 0, 720, 725, 730, 750, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 24, },
> +         .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 61 - 1280x720 at 25Hz */
>         { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
>                    3740, 3960, 0, 720, 725, 730, 750, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 25, },
> +         .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 62 - 1280x720 at 30Hz */
>         { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
>                    3080, 3300, 0, 720, 725, 730, 750, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -         .vrefresh = 30, },
> +         .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 63 - 1920x1080 at 120Hz */
>         { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
>                    2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -        .vrefresh = 120, },
> +        .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>         /* 64 - 1920x1080 at 100Hz */
>         { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
>                    2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
>                    DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
> -        .vrefresh = 100, },
> +        .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>  };
>
>  /*
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index f32c5cd..e51e897 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -30,6 +30,7 @@
>  #include <linux/types.h>
>  #include <linux/idr.h>
>  #include <linux/fb.h>
> +#include <linux/hdmi.h>
>  #include <drm/drm_mode.h>
>
>  #include <drm/drm_fourcc.h>
> @@ -181,6 +182,7 @@ struct drm_display_mode {
>
>         int vrefresh;           /* in Hz */
>         int hsync;              /* in kHz */
> +       enum hdmi_picture_aspect picture_aspect_ratio;
>  };
>
>  static inline bool drm_mode_is_stereo(const struct drm_display_mode *mode)
> --
> 1.7.9.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel



More information about the Intel-gfx mailing list