From patchwork Fri Mar 25 08:17:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sharma, Shashank" X-Patchwork-Id: 8669001 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4D748C0553 for ; Fri, 25 Mar 2016 08:08:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7BBBA20279 for ; Fri, 25 Mar 2016 08:08:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9396720220 for ; Fri, 25 Mar 2016 08:08:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BFD5E6EA85; Fri, 25 Mar 2016 08:08:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id AF3F36EA7F; Fri, 25 Mar 2016 08:08:22 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 25 Mar 2016 01:08:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,389,1455004800"; d="scan'208";a="675419048" Received: from shashanks-desktop.iind.intel.com ([10.223.26.24]) by FMSMGA003.fm.intel.com with ESMTP; 25 Mar 2016 01:08:20 -0700 From: Shashank Sharma To: dri-devel@lists.freedesktop.org, airlied@linux.ie, linux-fbdev@vger.kernel.org Subject: [PATCH 5/5] drm/i915: Add support for new aspect ratios Date: Fri, 25 Mar 2016 13:47:35 +0530 Message-Id: <1458893855-3930-6-git-send-email-shashank.sharma@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458893855-3930-1-git-send-email-shashank.sharma@intel.com> References: <1458893855-3930-1-git-send-email-shashank.sharma@intel.com> Cc: daniel.vetter@intel.com, intel-gfx@lists.freedesktop.org, plagnioj@jcrosoft.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 6e66136..11f219a 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -1482,6 +1482,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: @@ -1544,6 +1550,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 e2dab48..bc8e2c8 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -1545,6 +1545,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 fae64bc..370e4f9 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -2071,6 +2071,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; }