From patchwork Tue Oct 7 15:09:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vandana.kannan@intel.com X-Patchwork-Id: 5046571 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 A458C9F2F1 for ; Tue, 7 Oct 2014 14:55:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE6B820222 for ; Tue, 7 Oct 2014 14:55:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E3A68201FE for ; Tue, 7 Oct 2014 14:55:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 81A1489A1E; Tue, 7 Oct 2014 07:55:20 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id A1EC66E13F for ; Tue, 7 Oct 2014 07:55:18 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 07 Oct 2014 07:55:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,670,1406617200"; d="scan'208";a="610839843" Received: from vkannan-desktop.iind.intel.com ([10.223.25.137]) by fmsmga002.fm.intel.com with ESMTP; 07 Oct 2014 07:54:48 -0700 From: Vandana Kannan To: intel-gfx@lists.freedesktop.org Date: Tue, 7 Oct 2014 20:39:39 +0530 Message-Id: <1412694584-743-2-git-send-email-vandana.kannan@intel.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1412694584-743-1-git-send-email-vandana.kannan@intel.com> References: <1412694584-743-1-git-send-email-vandana.kannan@intel.com> Subject: [Intel-gfx] [RFC 1/6] drm/i915: Create PPS related struct and func pointers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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 Creating generic functions and data related to panel power sequencing in intel_panel. The functions have been added equivalent to intel_dp_panel_power_sequencer() and intel_dp_panel_power_sequencer_registers() These changes have been made to move PPS related data from intel_dp or other panel types to generic intel_panel. Note:- Although edp_power_seq is used as a return type in the functions, the structure can be made generic for all panels. Signed-off-by: Vandana Kannan --- drivers/gpu/drm/i915/i915_drv.h | 15 +++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 9 +++++++++ 2 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index ed6cf10..295c724 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -508,6 +508,21 @@ struct drm_i915_display_funcs { uint32_t level); void (*disable_backlight)(struct intel_connector *connector); void (*enable_backlight)(struct intel_connector *connector); + + struct edp_power_seq (*setup_panel_power_seq) + (struct intel_connector *connector); + void (*set_pps_panel_on)(struct intel_connector *connector); + void (*set_pps_panel_off)(struct intel_connector *connector); + void (*set_pps_backlight_on)(struct intel_connector *connector); + void (*set_pps_backlight_off)(struct intel_connector *connector); + struct edp_power_seq (*get_pps_registers)( + struct intel_connector *connector, + u32 pp_ctrl_reg, u32 pp_on_reg, + u32 pp_off_reg, u32 pp_div_reg); + void (*set_pps_registers)(struct intel_connector *connector, + enum port port, int *pp_ctrl_reg, + int *pp_on_reg, int *pp_off_reg, + int *pp_div_reg, int *port_sel, int *div); }; struct intel_uncore_funcs { diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 072e69f..ddf839d 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -183,6 +183,15 @@ struct intel_panel { } backlight; void (*backlight_power)(struct intel_connector *, bool enable); + + /* PPS */ + struct { + int panel_power_up_delay; + int panel_power_down_delay; + int panel_power_cycle_delay; + int backlight_on_delay; + int backlight_off_delay; + } pps; }; struct intel_connector {