From patchwork Thu Apr 18 19:35:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 2462331 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id EA4623FCA5 for ; Thu, 18 Apr 2013 19:39:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C62CAE6546 for ; Thu, 18 Apr 2013 12:39:00 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qe0-f52.google.com (mail-qe0-f52.google.com [209.85.128.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 6776BE5C6D for ; Thu, 18 Apr 2013 12:36:53 -0700 (PDT) Received: by mail-qe0-f52.google.com with SMTP id jy17so2073804qeb.11 for ; Thu, 18 Apr 2013 12:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=uvKrTwArhzHRMxEMfr9rzq2YM6M/TtbLjLVdFPo1l4I=; b=Q1bFW3OuS9JZzpPDtPkl+8MrOskneOFnsRXzmfTrLy6UVe+66ejquADjg405Md16k0 hvH7dIM4JXgUKIsUV9J8xk4MJPKZDj1iib1rRBcNh8QZd2cmIIEjBq/MqeUNW8gR5Mgm dd07CdUYqXpNf+vG/tFY1tIUuGZYMgGTeshw4f1tlBdlKWUx0KJbgUsYnrZQUtxqujT2 aP85Qi6z5x2TIvXLNlSOkW8F2tpAXEG+vP4axoulg8vxnyLMbx9J1yHZqcHStgq5IwPH gbobQb9Z9TWFwKc1glNx2U7lFrRu2lwgj6sySJH38t5W9nt/7rfyeUaoReR+WMHcHMfC D1lQ== X-Received: by 10.224.160.203 with SMTP id o11mr3265929qax.38.1366313812600; Thu, 18 Apr 2013 12:36:52 -0700 (PDT) Received: from localhost.localdomain ([187.59.144.221]) by mx.google.com with ESMTPS id ed8sm13849125qeb.7.2013.04.18.12.36.51 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 12:36:52 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 18 Apr 2013 16:35:44 -0300 Message-Id: <1366313746-3659-6-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366313746-3659-1-git-send-email-przanoni@gmail.com> References: <1366313746-3659-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 5/7] drm/i915: clear FPGA_DBG_RM_NOCLAIM when capturing error state X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Paulo Zanoni In the error state function we read the registers without checking if the power well is on, so after doing this we have to clear the FPGA_DBG_RM_NOCLAIM bit to prevent the next I915_WRITE from detecting it and printing an error message. The first version of this patch was checking for the power well state and then avoiding reading registers that were off, but the reviewers requested to just read the registers any way and then later clear the FPGA_DBG_RM_NOCLAIM bit. Signed-off-by: Paulo Zanoni Reviewed-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 215f76c..43de5ef 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -9585,6 +9585,13 @@ intel_display_capture_error_state(struct drm_device *dev) error->pipe[i].vsync = I915_READ(VSYNC(cpu_transcoder)); } + /* In the code above we read the registers without checking if the power + * well was on, so here we have to clear the FPGA_DBG_RM_NOCLAIM bit to + * prevent the next I915_WRITE from detecting it and printing an error + * message. */ + if (HAS_POWER_WELL(dev)) + I915_WRITE_NOTRACE(FPGA_DBG, FPGA_DBG_RM_NOCLAIM); + return error; }