From patchwork Wed Feb 19 06:13:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: akash.goel@intel.com X-Patchwork-Id: 3678611 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 418F09F35F for ; Wed, 19 Feb 2014 06:14:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 474482011E for ; Wed, 19 Feb 2014 06:14:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 58EBD20117 for ; Wed, 19 Feb 2014 06:14:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6495B1056C1; Tue, 18 Feb 2014 22:14:29 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id BA46C1056C1 for ; Tue, 18 Feb 2014 22:14:22 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 18 Feb 2014 22:10:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,504,1389772800"; d="scan'208";a="457880330" Received: from fmsmsx107.amr.corp.intel.com ([10.19.9.54]) by orsmga001.jf.intel.com with ESMTP; 18 Feb 2014 22:13:57 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.19.17.7) by FMSMSX107.amr.corp.intel.com (10.19.9.54) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 18 Feb 2014 22:13:57 -0800 Received: from bgsmsx104.gar.corp.intel.com (10.223.4.190) by FMSMSX153.amr.corp.intel.com (10.19.17.7) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 18 Feb 2014 22:13:56 -0800 Received: from bgsmsx103.gar.corp.intel.com ([169.254.4.40]) by BGSMSX104.gar.corp.intel.com ([169.254.5.104]) with mapi id 14.03.0123.003; Wed, 19 Feb 2014 11:43:54 +0530 From: "Goel, Akash" To: "intel-gfx@lists.freedesktop.org" Thread-Topic: Request for feedback : New Panel-fitter property for connectors Thread-Index: Ac8tOcODLh9UMmRXTmGUcJqSpuu9Gw== Date: Wed, 19 Feb 2014 06:13:53 +0000 Message-ID: <8BF5CF93467D8C498F250C96583BC09CC6F1E3@BGSMSX103.gar.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.223.10.10] MIME-Version: 1.0 Subject: [Intel-gfx] Request for feedback : New Panel-fitter property for connectors X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.8 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 Hello, We are planning to expose a new panel fitter property for the connectors. We have some use cases like a full screen video playback, where we can flip the frame buffer of any size irrespective of the pipe timings and enable the panel fitter to do scaling instead of using the GPU. Other use case is the Clone mode, where we can use the composed output of the LFP on the external display, with panel fitter enabled, to avoid GPU composition. Please provide inputs/comments on the same. Best regards Akash -----Original Message----- From: Goel, Akash Sent: Tuesday, February 18, 2014 4:12 PM To: intel-gfx@lists.freedesktop.org Cc: Goel, Akash; G, Pallavi Subject: [PATCH] drm/i915: Added a new Panel-fitter property for connectors From: Akash Goel Added a Panel-fitter enable/disable property support for the connectors. NOTE: By default, the value for the property will be disabled. Signed-off-by: G Pallavi Signed-off-by: Akash Goel --- drivers/gpu/drm/i915/i915_drv.h | 8 ++++++++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_modes.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 8c64831..a07f6cd 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1560,6 +1560,7 @@ typedef struct drm_i915_private { struct drm_property *broadcast_rgb_property; struct drm_property *force_audio_property; + struct drm_property *force_pfit_property; uint32_t hw_context_size; struct list_head context_list; @@ -1613,6 +1614,13 @@ enum hdmi_force_audio { HDMI_AUDIO_ON, /* force turn on HDMI audio */ }; +enum panel_fitter { + PFIT_OFF, + AUTOSCALE, + PILLARBOX, + LETTERBOX, +}; + #define I915_GTT_OFFSET_NONE ((u32)-1) struct drm_i915_gem_object_ops { diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index a4ffc02..db6ea3e 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -819,6 +819,7 @@ int intel_connector_update_modes(struct drm_connector *connector, int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter); void intel_attach_force_audio_property(struct drm_connector *connector); void intel_attach_broadcast_rgb_property(struct drm_connector *connector); +void intel_attach_force_pfit_property(struct drm_connector *connector); /* intel_overlay.c */ diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c index 0e860f3..967e080 100644 --- a/drivers/gpu/drm/i915/intel_modes.c +++ b/drivers/gpu/drm/i915/intel_modes.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "intel_drv.h" #include "i915_drv.h" @@ -126,3 +127,33 @@ intel_attach_broadcast_rgb_property(struct drm_connector *connector) drm_object_attach_property(&connector->base, prop, 0); } + +static const struct drm_prop_enum_list pfit_names[] = { + { PFIT_OFF, "pfit off" }, + { AUTO_SCALE, "Auto scale" }, + { PILLAR_BOX, "PillarBox" }, + { LETTER_BOX, "LetterBox" }, +}; + +void +intel_attach_force_pfit_property(struct drm_connector *connector) { + struct drm_device *dev = connector->dev; + struct drm_i915_private *dev_priv = dev->dev_private; + struct drm_property *prop; + struct drm_mode_object *obj = &connector->base; + + prop = dev_priv->force_pfit_property; + if (prop == NULL) { + prop = drm_property_create_enum(dev, 0, + "pfit", + pfit_names, + ARRAY_SIZE(pfit_names)); + if (prop == NULL) + return; + + dev_priv->force_pfit_property = prop; + } + + drm_object_attach_property(obj, prop, 0); } -- 1.8.5.2 _______________________________________________