From patchwork Tue Feb 4 03:20:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Airlie X-Patchwork-Id: 3573741 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 2998F9F2E9 for ; Tue, 4 Feb 2014 03:21:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4F8E120170 for ; Tue, 4 Feb 2014 03:21:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E79F92010B for ; Tue, 4 Feb 2014 03:21:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 602DC1061F8; Mon, 3 Feb 2014 19:21:15 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) by gabe.freedesktop.org (Postfix) with ESMTP id 57C82106D2A for ; Mon, 3 Feb 2014 19:20:57 -0800 (PST) Received: by mail-lb0-f181.google.com with SMTP id z5so5873473lbh.26 for ; Mon, 03 Feb 2014 19:20:54 -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=SbML4u/9rl9euCTHRR9ozCEPC6HJOrI68CzB3HfTkSU=; b=RkT+MIRmebFlMCwaOSqydz5pDZoqQsw52p4cI3rIf1RU2GMp/XvmzcsAClyXa9nSC1 kBptYXk9AXP1/X7lsGJslxpj2uMtEiapB3eQeJftsZ95lBOlwjhy4UJqwSG+qXMryTje g2xAXrju3BMnVLGhMPJyMNluBSBqz0GHBUQiNypSsZkbJbSKeFMsAOHUaskleXrf+149 54EvHr5n3q/7sImk3fNFoBo4HFZ1VTelggNhupZa7e5KCNwDOnSIDykxVOY1Gu7G35Pq POvgXEVX82Qs+p4hMWchsVazJf1Dy66Y+v3Yx/cYi5InZ/NiGUvS/fZ6BkutfZWBqtr6 TUWA== MIME-Version: 1.0 X-Received: by 10.112.43.70 with SMTP id u6mr14988304lbl.30.1391484054578; Mon, 03 Feb 2014 19:20:54 -0800 (PST) Received: by 10.112.140.132 with HTTP; Mon, 3 Feb 2014 19:20:54 -0800 (PST) In-Reply-To: <20140203153413.GA12991@kria> References: <20140203153413.GA12991@kria> Date: Tue, 4 Feb 2014 13:20:54 +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.6 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 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. From c6feb881e00c8db9f9f73d099a08e86c5af79d50 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 4 Feb 2014 13:19:08 +1000 Subject: [PATCH] drm: add in_interrupt to drm_can_sleep list of things This should stop us taking locks when we shouldn't in the console drivers, [ 1.749341] ------------[ cut here ]------------ [ 1.749347] WARNING: CPU: 0 PID: 0 at kernel/locking/mutex.c:856 mutex_trylock+0x1e5/0x250() [ 1.749348] DEBUG_LOCKS_WARN_ON(in_interrupt()) [ 1.749360] Modules linked in: ppdev cirrus syscopyarea sysfillrect sysimgblt drm_kms_helper evdev psmouse microcode serio_raw pcspkr ttm e1000 parport_pc parport processor button intel_agp drm intel_gtt i2c_piix4 ipv6 ext4 crc16 mbcache jbd2 sd_mod sr_mod cdrom ata_generic pata_acpi ata_piix 9pnet_virtio 9pnet libata scsi_mod [ 1.749362] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.0-rc1-t1 #34 [ 1.749364] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ 1.749366] 0000000000000009 ffff88001fc038c8 ffffffff814e8456 ffff88001fc03910 [ 1.749367] ffff88001fc03900 ffffffff8106a0dd ffff88001d3ff990 0000000000000010 [ 1.749368] 0000000000000000 00000000000001e0 ffff88001cc3b000 ffff88001fc03960 [ 1.749369] Call Trace: [ 1.749372] [] dump_stack+0x4d/0x6f [ 1.749374] [] warn_slowpath_common+0x7d/0xa0 [ 1.749375] [] warn_slowpath_fmt+0x4c/0x50 [ 1.749377] [] mutex_trylock+0x1e5/0x250 [ 1.749380] [] cirrus_dirty_update+0x7c/0x2f0 [cirrus] [ 1.749381] [] cirrus_imageblit+0x2f/0x40 [cirrus] [ 1.749388] [] soft_cursor+0x1b4/0x250 [ 1.749390] [] bit_cursor+0x613/0x650 [ 1.749391] [] ? get_color.isra.15+0x31/0x140 Reported-by: Sabrina Dubroca Signed-off-by: Dave Airlie --- include/drm/drmP.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 1d4a920..3a98664 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1665,7 +1665,7 @@ extern void drm_platform_exit(struct drm_driver *driver, struct platform_device /* returns true if currently okay to sleep */ static __inline__ bool drm_can_sleep(void) { - if (in_atomic() || in_dbg_master() || irqs_disabled()) + if (in_atomic() || in_dbg_master() || in_interrupt() || irqs_disabled()) return false; return true; } -- 1.8.4.2