From patchwork Fri Dec 26 10:23:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kumar, Shobhit" X-Patchwork-Id: 5542701 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 20BB8BEEA8 for ; Fri, 26 Dec 2014 10:21:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3681920166 for ; Fri, 26 Dec 2014 10:21:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5B14320155 for ; Fri, 26 Dec 2014 10:21:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B854A6E179; Fri, 26 Dec 2014 02:21:02 -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 206456E1A1 for ; Fri, 26 Dec 2014 02:21:01 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 26 Dec 2014 02:19:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,691,1406617200"; d="scan'208";a="504280395" Received: from shobhit-desk.iind.intel.com ([10.223.25.24]) by orsmga003.jf.intel.com with ESMTP; 26 Dec 2014 02:16:06 -0800 From: Shobhit Kumar To: intel-gfx Date: Fri, 26 Dec 2014 15:53:27 +0530 Message-Id: <1419589410-24365-2-git-send-email-shobhit.kumar@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1419589410-24365-1-git-send-email-shobhit.kumar@intel.com> References: <1419589410-24365-1-git-send-email-shobhit.kumar@intel.com> Cc: Jani Nikula , Daniel Vetter , Shobhit Kumar Subject: [Intel-gfx] [RFC 1/4] drm/i915: Define a common data structure for Panel Info X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 As of now this includes only PPS and BLC delays. New things can be added as and when needed Signed-off-by: Shobhit Kumar --- drivers/gpu/drm/i915/intel_drv.h | 11 +++++++++++ drivers/gpu/drm/i915/intel_dsi.h | 7 +------ drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 10 +++++----- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 588b618..0088f16 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -731,6 +731,17 @@ struct intel_load_detect_pipe { int dpms_mode; }; +struct panel_info { + /* all delays in ms */ + u16 backlight_off_delay; + u16 backlight_on_delay; + u16 panel_on_delay; + u16 panel_off_delay; + u16 panel_pwr_cycle_delay; + + /* Other panel specififc stuff */ +}; + static inline struct intel_encoder * intel_attached_encoder(struct drm_connector *connector) { diff --git a/drivers/gpu/drm/i915/intel_dsi.h b/drivers/gpu/drm/i915/intel_dsi.h index 8fe2064..8b20f76 100644 --- a/drivers/gpu/drm/i915/intel_dsi.h +++ b/drivers/gpu/drm/i915/intel_dsi.h @@ -129,12 +129,7 @@ struct intel_dsi { u32 pclk; u16 burst_mode_ratio; - /* all delays in ms */ - u16 backlight_off_delay; - u16 backlight_on_delay; - u16 panel_on_delay; - u16 panel_off_delay; - u16 panel_pwr_cycle_delay; + struct panel_info pinfo; }; /* XXX: Transitional before dual port configuration */ diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c index 5493aef..56b5b80 100644 --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c @@ -550,11 +550,11 @@ static bool generic_init(struct intel_dsi_device *dsi) /* delays in VBT are in unit of 100us, so need to convert * here in ms * Delay (100us) * 100 /1000 = Delay / 10 (ms) */ - intel_dsi->backlight_off_delay = pps->bl_disable_delay / 10; - intel_dsi->backlight_on_delay = pps->bl_enable_delay / 10; - intel_dsi->panel_on_delay = pps->panel_on_delay / 10; - intel_dsi->panel_off_delay = pps->panel_off_delay / 10; - intel_dsi->panel_pwr_cycle_delay = pps->panel_power_cycle_delay / 10; + intel_dsi->pinfo.backlight_off_delay = pps->bl_disable_delay / 10; + intel_dsi->pinfo.backlight_on_delay = pps->bl_enable_delay / 10; + intel_dsi->pinfo.panel_on_delay = pps->panel_on_delay / 10; + intel_dsi->pinfo.panel_off_delay = pps->panel_off_delay / 10; + intel_dsi->pinfo.panel_pwr_cycle_delay = pps->panel_power_cycle_delay / 10; return true; }