From patchwork Fri May 29 10:36:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaurav K Singh X-Patchwork-Id: 6506831 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 22B56C0020 for ; Fri, 29 May 2015 10:40:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58BA72069B for ; Fri, 29 May 2015 10:40:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7DE8F2065E for ; Fri, 29 May 2015 10:40:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AB32489AB9; Fri, 29 May 2015 03:40:05 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F8A289C1A for ; Fri, 29 May 2015 03:40:03 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 29 May 2015 03:40:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,516,1427785200"; d="scan'208";a="578726669" Received: from gksingh1.iind.intel.com ([10.223.26.84]) by orsmga003.jf.intel.com with ESMTP; 29 May 2015 03:40:02 -0700 From: Gaurav K Singh To: intel-gfx Date: Fri, 29 May 2015 16:06:59 +0530 Message-Id: <1432895827-5185-8-git-send-email-gaurav.k.singh@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1432895827-5185-1-git-send-email-gaurav.k.singh@intel.com> References: <1432895827-5185-1-git-send-email-gaurav.k.singh@intel.com> Cc: Shobhit Kumar Subject: [Intel-gfx] [RFC 07/14] drm/i915: Disable MIPI display self refresh mode 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 During disable sequence for MIPI encoder in command mode, disable MIPI display self-refresh mode bit in Pipe Ctrl reg. Signed-off-by: Gaurav K Singh Signed-off-by: Yogesh Mohan Marimuthu Signed-off-by: Shobhit Kumar --- drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 895d7c7..cab2ac8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2171,6 +2171,9 @@ static void intel_enable_pipe(struct intel_crtc *crtc) static void intel_disable_pipe(struct intel_crtc *crtc) { struct drm_i915_private *dev_priv = crtc->base.dev->dev_private; + struct intel_encoder *encoder; + struct intel_dsi *intel_dsi; + struct drm_device *dev = crtc->base.dev; enum transcoder cpu_transcoder = crtc->config->cpu_transcoder; enum pipe pipe = crtc->pipe; int reg; @@ -2189,6 +2192,16 @@ static void intel_disable_pipe(struct intel_crtc *crtc) if ((val & PIPECONF_ENABLE) == 0) return; + for_each_encoder_on_crtc(dev, &crtc->base, encoder) { + if (encoder->type == INTEL_OUTPUT_DSI) { + intel_dsi = enc_to_intel_dsi(&encoder->base); + if (intel_dsi && (intel_dsi->operation_mode == + INTEL_DSI_COMMAND_MODE)) + val = val & ~PIPECONF_MIPI_DSR_ENABLE; + break; + } + } + /* * Double wide has implications for planes * so best keep it disabled when not needed.