From patchwork Wed Feb 3 13:42:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manna, Animesh" X-Patchwork-Id: 8203331 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 446679F3CD for ; Wed, 3 Feb 2016 13:43:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 682122027D for ; Wed, 3 Feb 2016 13:43:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6E8AA20253 for ; Wed, 3 Feb 2016 13:43:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D766C6E717; Wed, 3 Feb 2016 05:43:31 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 947226E717 for ; Wed, 3 Feb 2016 05:43:30 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 03 Feb 2016 05:43:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,390,1449561600"; d="scan'208";a="907644895" Received: from amanna-desktop.iind.intel.com ([10.223.25.127]) by fmsmga002.fm.intel.com with ESMTP; 03 Feb 2016 05:43:28 -0800 From: Animesh Manna To: intel-gfx@lists.freedesktop.org Date: Wed, 3 Feb 2016 19:12:04 +0530 Message-Id: <1454506924-6888-1-git-send-email-animesh.manna@intel.com> X-Mailer: git-send-email 2.0.2 Cc: Jani Nikula Subject: [Intel-gfx] [PATCH] drm/i915/bxt: Added identifier for MIPI transcoder. 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.6 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 Changes done: - Added identifier for Mipi transcoder A and C. - Added power domain identifier for newly added mipi trancoder. - Initialized transcoder for mipi during compute config. v1: Initial RFC version. v2: Rebased on tot. Cc: Jani Nikula Signed-off-by: Animesh Manna --- drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/intel_dsi.c | 8 ++++++++ drivers/gpu/drm/i915/intel_runtime_pm.c | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 65a2cd0..c484df8 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -122,6 +122,8 @@ enum transcoder { TRANSCODER_B, TRANSCODER_C, TRANSCODER_EDP, + TRANSCODER_MIPI_A, + TRANSCODER_MIPI_C, I915_MAX_TRANSCODERS }; #define transcoder_name(t) ((t) + 'A') @@ -176,6 +178,8 @@ enum intel_display_power_domain { POWER_DOMAIN_TRANSCODER_B, POWER_DOMAIN_TRANSCODER_C, POWER_DOMAIN_TRANSCODER_EDP, + POWER_DOMAIN_TRANSCODER_MIPI_A, + POWER_DOMAIN_TRANSCODER_MIPI_C, POWER_DOMAIN_PORT_DDI_A_LANES, POWER_DOMAIN_PORT_DDI_B_LANES, POWER_DOMAIN_PORT_DDI_C_LANES, diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index 91cef35..4f2b513 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c @@ -273,6 +273,7 @@ static bool intel_dsi_compute_config(struct intel_encoder *encoder, struct intel_connector *intel_connector = intel_dsi->attached_connector; struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode; struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; + struct drm_device *dev = intel_connector->base.dev; DRM_DEBUG_KMS("\n"); @@ -284,6 +285,13 @@ static bool intel_dsi_compute_config(struct intel_encoder *encoder, /* DSI uses short packets for sync events, so clear mode flags for DSI */ adjusted_mode->flags = 0; + if (IS_BROXTON(dev)) { + if (intel_dsi->ports & (1 << PORT_A)) + pipe_config->cpu_transcoder = TRANSCODER_MIPI_A; + else + pipe_config->cpu_transcoder = TRANSCODER_MIPI_C; + } + return true; } diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c index bbca527..611dc1e 100644 --- a/drivers/gpu/drm/i915/intel_runtime_pm.c +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c @@ -87,6 +87,10 @@ intel_display_power_domain_str(enum intel_display_power_domain domain) return "TRANSCODER_B"; case POWER_DOMAIN_TRANSCODER_C: return "TRANSCODER_C"; + case POWER_DOMAIN_TRANSCODER_MIPI_A: + return "TRANSCODER_MIPI_A"; + case POWER_DOMAIN_TRANSCODER_MIPI_C: + return "TRANSCODER_MIPI_C"; case POWER_DOMAIN_TRANSCODER_EDP: return "TRANSCODER_EDP"; case POWER_DOMAIN_PORT_DDI_A_LANES: @@ -403,6 +407,8 @@ static void hsw_set_power_well(struct drm_i915_private *dev_priv, BXT_DISPLAY_POWERWELL_2_POWER_DOMAINS | \ BIT(POWER_DOMAIN_PIPE_A) | \ BIT(POWER_DOMAIN_TRANSCODER_EDP) | \ + BIT(POWER_DOMAIN_TRANSCODER_MIPI_A) | \ + BIT(POWER_DOMAIN_TRANSCODER_MIPI_C) | \ BIT(POWER_DOMAIN_PIPE_A_PANEL_FITTER) | \ BIT(POWER_DOMAIN_PORT_DDI_A_LANES) | \ BIT(POWER_DOMAIN_AUX_A) | \