[Intel-gfx] [PATCH 5/5] drm/i915: Add support for new aspect ratios

Shashank Sharma shashank.sharma at intel.com
Thu Dec 17 05:31:05 PST 2015


HDMI 2.0/CEA-861-F introduces two new aspect ratios:
- 64:27
- 256:135

This patch adds support for these aspect ratios in
I915 driver, at various places.

Signed-off-by: Shashank Sharma <shashank.sharma at intel.com>
---
 drivers/gpu/drm/drm_modes.c       | 12 ++++++++++++
 drivers/gpu/drm/i915/intel_hdmi.c |  6 ++++++
 drivers/gpu/drm/i915/intel_sdvo.c |  6 ++++++
 3 files changed, 24 insertions(+)

diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 7824a63..7e27854 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -1483,6 +1483,12 @@ void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out,
 	case HDMI_PICTURE_ASPECT_16_9:
 		out->flags |= DRM_MODE_FLAG_PAR16_9;
 		break;
+	case HDMI_PICTURE_ASPECT_64_27:
+		out->flags |= DRM_MODE_FLAG_PAR64_27;
+		break;
+	case DRM_MODE_PICTURE_ASPECT_256_135:
+		out->flags |= DRM_MODE_FLAG_PAR256_135;
+		break;
 	case HDMI_PICTURE_ASPECT_NONE:
 	case HDMI_PICTURE_ASPECT_RESERVED:
 	default:
@@ -1545,6 +1551,12 @@ int drm_mode_convert_umode(struct drm_display_mode *out,
 	case DRM_MODE_FLAG_PAR16_9:
 		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_16_9;
 		break;
+	case DRM_MODE_FLAG_PAR64_27:
+		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_64_27;
+		break;
+	case DRM_MODE_FLAG_PAR256_135:
+		out->picture_aspect_ratio |= HDMI_PICTURE_ASPECT_256_135;
+		break;
 	default:
 		out->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
 	}
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 6825543..6d5c3ad 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1533,6 +1533,12 @@ intel_hdmi_set_property(struct drm_connector *connector,
 		case DRM_MODE_PICTURE_ASPECT_16_9:
 			intel_hdmi->aspect_ratio = HDMI_PICTURE_ASPECT_16_9;
 			break;
+		case DRM_MODE_PICTURE_ASPECT_64_27:
+			intel_hdmi->aspect_ratio = HDMI_PICTURE_ASPECT_64_27;
+			break;
+		case DRM_MODE_PICTURE_ASPECT_256_135:
+			intel_hdmi->aspect_ratio = HDMI_PICTURE_ASPECT_256_135;
+			break;
 		default:
 			return -EINVAL;
 		}
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 2e1da06..83f30d6 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -2069,6 +2069,12 @@ intel_sdvo_set_property(struct drm_connector *connector,
 		case DRM_MODE_PICTURE_ASPECT_16_9:
 			intel_sdvo->aspect_ratio = HDMI_PICTURE_ASPECT_16_9;
 			break;
+		case DRM_MODE_PICTURE_ASPECT_64_27:
+			intel_sdvo->aspect_ratio = HDMI_PICTURE_ASPECT_64_27;
+			break;
+		case DRM_MODE_PICTURE_ASPECT_256_135:
+			intel_sdvo->aspect_ratio = HDMI_PICTURE_ASPECT_256_135;
+			break;
 		default:
 			return -EINVAL;
 		}
-- 
1.9.1



More information about the Intel-gfx mailing list