From patchwork Tue Jan 22 14:33:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2020841 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 27918DF2EB for ; Tue, 22 Jan 2013 21:39:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A18AE6085 for ; Tue, 22 Jan 2013 13:39:04 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 885FBE5D3A for ; Tue, 22 Jan 2013 13:38:54 -0800 (PST) Received: by mail-wg0-f52.google.com with SMTP id 12so2418653wgh.19 for ; Tue, 22 Jan 2013 13:38:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=/xYdkv8fKFTjpMT2WSylb2si4c7t5MT97Luyzs/8kQ4=; b=MLKef9juQ/rEAoIbDqOOxOR9D5ek9TUp27zibXIMZa9/v4DxHu0mNe18rd7cZOfbz0 0+ZgLX80sW1GwgsQcaG3Eeup2fn24YK1iAThNBERuy07YVCybvUOYW65/wjmcd+wT6pP AfxP7UjLT+zJa0wSDNOy/+f8lChzImLDFDoSg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=/xYdkv8fKFTjpMT2WSylb2si4c7t5MT97Luyzs/8kQ4=; b=A/UncwxjTqVI08SvNsoSDgcPfQ0bjg8kuDR8niPzBmkUKYdwvkBUrskN4DWr6QMHfQ 1yT1zsoBe+bijOSRlXAeDwLuQGmVhsJz1crSrh0u9P8FdDoF/GsWmZNveV6loPZV6VQs 0Mts6xWhI2DANsOJaTtgJjR1Wb2CGw8RbaxsnlZfurz8qDY3i4kFvjmcawdJbDBJP6lP miwWgiKi1WrSwBwrooPRRXPNh5lzMXYFcy/mktSutC7hOKcTF8yDhVVuvkDN/6T4vsw8 /hLwZqRRS8lbZEgD4gc4N38RW3mDwOi/bQCCPUJqaAlziLdQGFFa1nucDnq3BpHgwgBO riTA== X-Received: by 10.194.21.70 with SMTP id t6mr34896211wje.42.1358890733435; Tue, 22 Jan 2013 13:38:53 -0800 (PST) Received: from natalie.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id fv2sm23520695wib.4.2013.01.22.13.38.52 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jan 2013 13:38:52 -0800 (PST) From: daniel.vetter@ffwll.ch To: Intel Graphics Development Date: Tue, 22 Jan 2013 15:33:27 +0100 Message-Id: <1358865207-12436-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQnv2363Ar8Rj9xcHk4Mr3I3o86y3hHEX5qDVaF7Gxb+S51zAwDFOEnYzksttDOu57KcHH1z Cc: Daniel Vetter , Ben Widawsky Subject: [Intel-gfx] [PATCH] drm/i915: fixup sbi_read/write locking 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: Daniel Vetter commit 09153000b8ca32a539a1207edebabd0d40b6c61b Author: Daniel Vetter Date: Wed Dec 12 14:06:44 2012 +0100 drm/i915: rework locking for intel_dpio|sbi_read|write reworked the locking around sbi_read/write functions for 3.8-fixes. But commit dde86e2db54545ef981b64805097a7b4c3156d6e Author: Paulo Zanoni Date: Sat Dec 1 12:04:25 2012 -0200 drm/i915: add lpt_init_pch_refcl Added new use-cases in the -next tree which has not been updated in the merge. Fix it up. Reported-by: Ben Widawsky Signed-off-by: Daniel Vetter Reviewed-by: Ben Widawsky Tested-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 26df9e3..27fe702 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4871,6 +4871,8 @@ static void lpt_init_pch_refclk(struct drm_device *dev) if (!has_vga) return; + mutex_lock(&dev_priv->dpio_lock); + /* XXX: Rip out SDV support once Haswell ships for real. */ if (IS_HASWELL(dev) && (dev->pci_device & 0xFF00) == 0x0C00) is_sdv = true; @@ -5013,6 +5015,8 @@ static void lpt_init_pch_refclk(struct drm_device *dev) tmp = intel_sbi_read(dev_priv, SBI_DBUFF0, SBI_ICLK); tmp |= SBI_DBUFF0_ENABLE; intel_sbi_write(dev_priv, SBI_DBUFF0, tmp, SBI_ICLK); + + mutex_unlock(&dev_priv->dpio_lock); } /*