From patchwork Thu Apr 11 14:29:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2429021 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 E65A9DF230 for ; Thu, 11 Apr 2013 14:33:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E3DC0E6630 for ; Thu, 11 Apr 2013 07:33:51 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by gabe.freedesktop.org (Postfix) with ESMTP id D41EAE6622 for ; Thu, 11 Apr 2013 07:30:56 -0700 (PDT) Received: by mail-ee0-f50.google.com with SMTP id e53so812665eek.23 for ; Thu, 11 Apr 2013 07:30:56 -0700 (PDT) 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:in-reply-to :references; bh=LGPdkGlP0ik82O9eAmoBMN26XHx74rCRgcPlfNc5DCU=; b=BHMWxcFsSLxk2msWAJiayLoOO0IuM2NeDkv4QZL7RGF+CTzSu87SOyYC4CRfgRBOk5 xNPMzyHjvxLZM2vQ+uZbBn28aE3p3SRDBWLeGYqWJYhqw7RMEwEpyJKzaiW/gWkGo2mz 1q0I7gocKmKMl1a4emjSXaGJl4d8okQebeXn8= 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:in-reply-to :references:x-gm-message-state; bh=LGPdkGlP0ik82O9eAmoBMN26XHx74rCRgcPlfNc5DCU=; b=IweivDJFt86p20Om0tBhaq7PxFixckHnp4sfL4Q88VH+XOhV58cuSAIkrdAreUk5yz nw8VAoBhIhCD+sKAaHZ83QqoLuRRVeufcB1orHILX6BwJUT+MxseOkBzC+FJdjoyzRfm ndXbveHHPVpmVNJ/vIK+WKNTHkxUft/7OCx1TGnOainRCAN+thKCH+VwAMgT539shjRH VpvoKfieSwnUlH4B8tHtSYCbLJs7udUOqfknwR+JtvqgOVD2Rb8JEbrCktVRRjMkAIUd oDfM4GcxoSaZLvWBehKGoykXAhigd6T4miNYwGTJ9o6uKAnK7lOU1JRJeISqf/L7uceZ T3nw== X-Received: by 10.15.101.200 with SMTP id bp48mr17424053eeb.38.1365690655878; Thu, 11 Apr 2013 07:30:55 -0700 (PDT) Received: from gina.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id a41sm5965845eei.4.2013.04.11.07.30.54 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Apr 2013 07:30:55 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Thu, 11 Apr 2013 16:29:10 +0200 Message-Id: <1365690550-5716-7-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1365690550-5716-1-git-send-email-daniel.vetter@ffwll.ch> References: <1365690550-5716-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQk3A10rr1IvTEV5uymQqtZFqU4DAYrF8Exl/4TyjpRmIQ1R9y7CUfFPtf3bi1vVkIl5x4Nd Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 7/7] drm/i915: add i9xx pfit pipe asserts 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 We can only enable the pfit if the pipe. Ensure that this is obied with a neat assert. Also check whether the pfit is off before enabling it - if not we've lost track of things somewhere since the pfit is only ever used by the lvds output. Signed-off-by: Daniel Vetter Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/intel_lvds.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index ca2d903..1ff981f 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -159,6 +159,9 @@ static void intel_pre_enable_lvds(struct intel_encoder *encoder) if (HAS_PCH_SPLIT(dev) || !enc->pfit_control) return; + WARN_ON(I915_READ(PFIT_CONTROL) & PFIT_ENABLE); + assert_pipe_disabled(dev_priv, to_intel_crtc(encoder->base.crtc)->pipe); + /* * Enable automatic panel scaling so that non-native modes * fill the screen. The panel fitter should only be