From patchwork Mon Jan 9 09:16:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Srinivas, Vidya" X-Patchwork-Id: 9504235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E879160710 for ; Mon, 9 Jan 2017 09:08:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCFD52840E for ; Mon, 9 Jan 2017 09:08:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D077F28461; Mon, 9 Jan 2017 09:08:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 946C72840E for ; Mon, 9 Jan 2017 09:08:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF6D86E1A9; Mon, 9 Jan 2017 09:08:51 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 368E96E1A8 for ; Mon, 9 Jan 2017 09:08:49 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 09 Jan 2017 01:08:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.33,339,1477983600"; d="scan'208"; a="1109906029" Received: from vsrini4-ubuntu-intel.iind.intel.com ([10.223.26.91]) by fmsmga002.fm.intel.com with ESMTP; 09 Jan 2017 01:08:46 -0800 From: Vidya Srinivas To: intel-gfx@lists.freedesktop.org Date: Mon, 9 Jan 2017 14:46:20 +0530 Message-Id: <1483953380-26586-1-git-send-email-vidya.srinivas@intel.com> X-Mailer: git-send-email 1.9.1 Cc: Vidya Srinivas Subject: [Intel-gfx] [PATCH 12/14] drm/i915: Enable DSI reset sequence 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-Virus-Scanned: ClamAV using ClamSMTP Enable the call back for MIPI reset sequence. This is needed to reset the panel, and is part of the VBT spec. Signed-off-by: Uma Shankar --- drivers/gpu/drm/i915/intel_dsi.c | 6 ++++++ drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index 9252490..cdcd3188 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c @@ -561,6 +561,10 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder, intel_dsi_prepare(encoder, pipe_config); + /* Panel Enable */ + drm_panel_power_on(intel_dsi->panel); + msleep(intel_dsi->panel_on_delay); + /* Panel Enable over CRC PMIC */ if (intel_dsi->gpio_panel) gpiod_set_value_cansleep(intel_dsi->gpio_panel, 1); @@ -576,6 +580,8 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder, I915_WRITE(DSPCLK_GATE_D, val); } + drm_panel_reset(intel_dsi->panel); + /* put device in ready state */ intel_dsi_device_ready(encoder); diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c index d476b94..0dc63f5 100644 --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c @@ -493,7 +493,6 @@ static void generic_exec_sequence(struct drm_panel *panel, enum mipi_seq seq_id) static int vbt_panel_prepare(struct drm_panel *panel) { - generic_exec_sequence(panel, MIPI_SEQ_ASSERT_RESET); generic_exec_sequence(panel, MIPI_SEQ_POWER_ON); generic_exec_sequence(panel, MIPI_SEQ_DEASSERT_RESET); generic_exec_sequence(panel, MIPI_SEQ_INIT_OTP); @@ -561,10 +560,18 @@ static int vbt_panel_power_off(struct drm_panel *panel) return 0; } +static int vbt_panel_reset(struct drm_panel *panel) +{ + generic_exec_sequence(panel, MIPI_SEQ_ASSERT_RESET); + + return 0; +} + static const struct drm_panel_funcs vbt_panel_funcs = { .disable = vbt_panel_disable, .unprepare = vbt_panel_unprepare, .prepare = vbt_panel_prepare, + .reset = vbt_panel_reset, .power_on = vbt_panel_power_on, .power_off = vbt_panel_power_off, .enable = vbt_panel_enable,