From patchwork Sun Dec 7 14:27:33 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: 5451951 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 6F644BEEA8 for ; Sun, 7 Dec 2014 14:10:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64F8420165 for ; Sun, 7 Dec 2014 14:10:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5DD4420158 for ; Sun, 7 Dec 2014 14:10:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1082D6E942; Sun, 7 Dec 2014 06:10:16 -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 6F3A76E8D6 for ; Sun, 7 Dec 2014 06:10:15 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 07 Dec 2014 06:08:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,691,1406617200"; d="scan'208";a="495009863" Received: from vkannan-desktop.iind.intel.com ([10.223.25.137]) by orsmga003.jf.intel.com with ESMTP; 07 Dec 2014 06:06:40 -0800 From: Vandana Kannan To: intel-gfx@lists.freedesktop.org Date: Sun, 7 Dec 2014 19:57:33 +0530 Message-Id: <1417962453-18516-2-git-send-email-vandana.kannan@intel.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1417962453-18516-1-git-send-email-vandana.kannan@intel.com> References: <1417962453-18516-1-git-send-email-vandana.kannan@intel.com> Subject: [Intel-gfx] [PATCH 2/2] drm/i915: Add generic i2c mipi parsing 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 From: vkorjani The VBT now contains i2c sequences to allow the graphics driver to bring up the device by directly writing to any devices that need to be programmed. Signed-off-by: vkorjani Signed-off-by: Nabendu Maiti Signed-off-by: Deepak M Signed-off-by: Rafael Barbalho Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com) --- drivers/gpu/drm/i915/intel_bios.c | 2 +- drivers/gpu/drm/i915/intel_dsi.c | 3 ++ drivers/gpu/drm/i915/intel_dsi.h | 2 + drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 75 +++++++++++++++++++++++++++++- 4 files changed, 80 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index c27cc6d..bb50c1a 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c @@ -712,7 +712,7 @@ static u8 *goto_next_sequence(u8 *data, int *size) break; case MIPI_SEQ_ELEM_I2C: /* skip by this element payload size */ - data += 6; + data += 7; len = *data; data += len + 1; break; diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index 0b18407..193ac18 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c @@ -155,6 +155,9 @@ static void intel_dsi_enable(struct intel_encoder *encoder) if (intel_dsi->dev.dev_ops->enable) intel_dsi->dev.dev_ops->enable(&intel_dsi->dev); + if (intel_dsi->dev.dev_ops->enable_backlight) + intel_dsi->dev.dev_ops->enable_backlight(&intel_dsi->dev); + wait_for_dsi_fifo_empty(intel_dsi); /* assert ip_tg_enable signal */ diff --git a/drivers/gpu/drm/i915/intel_dsi.h b/drivers/gpu/drm/i915/intel_dsi.h index 657eb5c..493bd22 100644 --- a/drivers/gpu/drm/i915/intel_dsi.h +++ b/drivers/gpu/drm/i915/intel_dsi.h @@ -51,6 +51,8 @@ struct intel_dsi_dev_ops { /* This callback must be able to assume DSI commands can be sent */ void (*disable)(struct intel_dsi_device *dsi); + void (*enable_backlight)(struct intel_dsi_device *dsi); + int (*mode_valid)(struct intel_dsi_device *dsi, struct drm_display_mode *mode); diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c index f6bdd44..25c05b7 100644 --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c @@ -30,6 +30,7 @@ #include #include #include