From patchwork Wed Feb 5 04:50:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Airlie X-Patchwork-Id: 3584371 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 796899F2E9 for ; Wed, 5 Feb 2014 04:56:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9931720173 for ; Wed, 5 Feb 2014 04:56:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 57FF420158 for ; Wed, 5 Feb 2014 04:56:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 76020FB4EA; Tue, 4 Feb 2014 20:56:44 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 988EEFB4EA for ; Tue, 4 Feb 2014 20:56:38 -0800 (PST) Received: by mail-lb0-f172.google.com with SMTP id c11so7268471lbj.31 for ; Tue, 04 Feb 2014 20:56:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+mbh0Tqj7SZMcLucrcAA+VcxX1Jn48klenoYP3w4wOQ=; b=ySWjQeM65bS9aZHFEwxVR2p0QQ44X1E+q1FOrUDesTRS4hi9f4jgpBF99FBc8tukEH wNwYkWCPaq9g37fOwLwHti3nBdXGEODpRBDrWJedMpYFghZDJDT1Snk+f1fYhC79VNmw MriTnQ2Z1FMsgZQnFluCpQlknfV9SvtJrWNjLBypsYrKXIaP/LxDZHDEm9GKZfsTYXcx 5G2M72PMPjMYdEl3BlCx0PUhBTHfIruWKG+xdBpG2NTcFpc8amQvP81Y21oQCfY5w42c uMEp3vhNuVpAcpYDNjXdgi9/iENeyAvVyZklIpZ30Ip1NvG5W0MzHpVKmHnjgIQ9628q zaSA== MIME-Version: 1.0 X-Received: by 10.112.211.233 with SMTP id nf9mr21948lbc.50.1391575819475; Tue, 04 Feb 2014 20:50:19 -0800 (PST) Received: by 10.112.140.132 with HTTP; Tue, 4 Feb 2014 20:50:18 -0800 (PST) In-Reply-To: <20140204225340.GB12991@kria> References: <20140203153413.GA12991@kria> <20140204225340.GB12991@kria> Date: Wed, 5 Feb 2014 14:50:18 +1000 Message-ID: Subject: Re: [3.14-rc1] cirrus driver problem (qemu) From: Dave Airlie To: Sabrina Dubroca Cc: Dave Airlie , LKML , dri-devel 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: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 On Wed, Feb 5, 2014 at 8:53 AM, Sabrina Dubroca wrote: > 2014-02-04, 13:20:54 +1000, Dave Airlie wrote: >> On Tue, Feb 4, 2014 at 1:34 AM, Sabrina Dubroca wrote: >> > When I boot 3.14-rc1 in qemu, I get the trace below. The console stops >> > updating and I don't get a login prompt. I can login, but I can't see >> > what I'm doing. I can login normally via SSH. >> > >> > If I revert the last commit in drivers/gpu/drm/cirrus: >> > >> > f4b4718b61d1d5a7442a4fd6863ea80c3a10e508 drm: ast,cirrus,mgag200: use drm_can_sleep >> > >> > the problem is solved. >> > >> >> Hi does the attach patch fix it? >> >> Dave. > > > Same problem. Didn't you reverse the logic on in_interrupt, compared > to the old "if (!in_interrupt())" ? It looks like drm_can_sleep() is > false when in_interrupt() is true. > > I modified your patch as below. Display doesn't freeze, but I still > get the warning. Oh wow I totally screwed up there, you are right, logic inversion. Can you try the attached? without the in_interrupt addition. Dave. From c39a8bdd2586c616e9b3746db128180d4e0ca8ec Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 5 Feb 2014 14:47:45 +1000 Subject: [PATCH] drm/mgag200,ast,cirrus: fix regression with drm_can_sleep conversion I totally sign inverted my way out of this one. Reported-by: "Sabrina Dubroca" Signed-off-by: Dave Airlie --- drivers/gpu/drm/ast/ast_fb.c | 2 +- drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 +- drivers/gpu/drm/mgag200/mgag200_fb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c index 3f65dd6..a28640f 100644 --- a/drivers/gpu/drm/ast/ast_fb.c +++ b/drivers/gpu/drm/ast/ast_fb.c @@ -65,7 +65,7 @@ static void ast_dirty_update(struct ast_fbdev *afbdev, * then the BO is being moved and we should * store up the damage until later. */ - if (!drm_can_sleep()) + if (drm_can_sleep()) ret = ast_bo_reserve(bo, true); if (ret) { if (ret != -EBUSY) diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c index 2fd4a92..32bbba0 100644 --- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c +++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c @@ -39,7 +39,7 @@ static void cirrus_dirty_update(struct cirrus_fbdev *afbdev, * then the BO is being moved and we should * store up the damage until later. */ - if (!drm_can_sleep()) + if (drm_can_sleep()) ret = cirrus_bo_reserve(bo, true); if (ret) { if (ret != -EBUSY) diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index f9adc27..13b7dd8 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -41,7 +41,7 @@ static void mga_dirty_update(struct mga_fbdev *mfbdev, * then the BO is being moved and we should * store up the damage until later. */ - if (!drm_can_sleep()) + if (drm_can_sleep()) ret = mgag200_bo_reserve(bo, true); if (ret) { if (ret != -EBUSY) -- 1.8.4.2