From patchwork Thu Jan 30 00:53:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilia Mirkin X-Patchwork-Id: 3555471 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 75B9AC02DC for ; Thu, 30 Jan 2014 00:53:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ABE1A201B9 for ; Thu, 30 Jan 2014 00:53:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C0E3320181 for ; Thu, 30 Jan 2014 00:53:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CE7145FB5; Wed, 29 Jan 2014 16:53:16 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f175.google.com (mail-qc0-f175.google.com [209.85.216.175]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F6C545FB2; Wed, 29 Jan 2014 16:53:12 -0800 (PST) Received: by mail-qc0-f175.google.com with SMTP id x13so3937255qcv.6 for ; Wed, 29 Jan 2014 16:53:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=Hsf4bI7ZmonFAQs8kji06qVkthgL+C+lhVg48fFR8kU=; b=grVq2EYJvuBg26h23PKqiFkSTUrZJ706GCgksg6UOXw52oCDms0TIQ1kYQL0913u1E 14VKmgBl1BDurdhy1GHtZO6CYcdiTzKWth8PAW1KLARLJzLK9DCqBJIgu/1passO/M3N LwMhzvQixe2AKtb7Cr6fYWuyMHoKX+zQTTNNwU6RvGeP7U2R4mMjF7qaw7HHGaKD+Ghr 8PtExbbl+1uJMPL9TLNie5OacBhXPCrP/A6CwJlDAWLYAeRNKzdXMFgTy9vphriGS6hD SQ10Y+6YZJj2BxtG5JjDXtphod4Bx5mut1hLy65neeB8+DJrfTGOfgOlFCbZoldJ4TN9 TQaw== X-Received: by 10.224.97.7 with SMTP id j7mr17409127qan.81.1391043191695; Wed, 29 Jan 2014 16:53:11 -0800 (PST) Received: from localhost.localdomain (cpe-74-71-29-187.nyc.res.rr.com. [74.71.29.187]) by mx.google.com with ESMTPSA id g52sm6058921qgg.9.2014.01.29.16.53.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jan 2014 16:53:11 -0800 (PST) From: Ilia Mirkin To: Ben Skeggs , Jan Janecek Subject: [PATCH] drm/nouveau: set irq_enabled manually Date: Wed, 29 Jan 2014 19:53:00 -0500 Message-Id: <1391043180-27875-1-git-send-email-imirkin@alum.mit.edu> X-Mailer: git-send-email 1.8.3.2 Cc: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Since commit 0fa9061ae8c ("drm/nouveau/mc: handle irq-related setup ourselves"), drm_device->irq_enabled remained unset. This is needed in order to properly wait for a vblank event in the generic drm code. See https://bugs.freedesktop.org/show_bug.cgi?id=74195 Reported-by: Jan Janecek Signed-off-by: Ilia Mirkin Cc: stable@vger.kernel.org # 3.10+ Reviewed-by: Daniel Vetter --- TBH, not sure why this fixes things, as irq_enabled == false should have caused the vblank wait to not wait, since the condition would be immediately true. Jan, mind double-checking that this version of the patch fixes things for you? Not 100% sure where you stuck the irq_enabled=true line when you tried it out. drivers/gpu/drm/nouveau/nouveau_drm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index bfd02410..3ba7b62 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -376,6 +376,8 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) if (ret) goto fail_device; + dev->irq_enabled = true; + /* workaround an odd issue on nvc1 by disabling the device's * nosnoop capability. hopefully won't cause issues until a * better fix is found - assuming there is one... @@ -475,6 +477,7 @@ nouveau_drm_remove(struct pci_dev *pdev) struct nouveau_drm *drm = nouveau_drm(dev); struct nouveau_object *device; + dev->irq_enabled = false; device = drm->client.base.device; drm_put_dev(dev);