From patchwork Sun Dec 8 23:34:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 11278315 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52F5D13B6 for ; Sun, 8 Dec 2019 23:35:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 31F73206DB for ; Sun, 8 Dec 2019 23:35:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31F73206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chris-wilson.co.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D14D36E0E5; Sun, 8 Dec 2019 23:35:03 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id C06A06E0E5 for ; Sun, 8 Dec 2019 23:35:02 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 19506595-1500050 for multiple; Sun, 08 Dec 2019 23:34:57 +0000 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Sun, 8 Dec 2019 23:34:56 +0000 Message-Id: <20191208233456.3074345-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915/gt: Suppress unclaimed mmio warnings for irq enabling X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Despite taking the intel_gt wakeref, and asserting that we do indeed hold the runtime-pm wakeref for the device, our mmio debug insists that the irq enabling is not being recognised: [ 19.342117] Unclaimed write to register 0x220a8 [ 19.342185] WARNING: CPU: 2 PID: 619 at __unclaimed_reg_debug+0x4f/0x60 [i915] [ 19.342192] Modules linked in: nls_ascii nls_cp437 vfat i915 crct10dif_pclmul fat crc32_pclmul crc32c_intel aesni_intel glue_helper crypto_simd cryptd intel_cstate ahci intel_gtt libahci intel_uncore drm_kms_helper intel_rapl_perf i2c_i801 efivars video button efivarfs [ 19.342224] CPU: 2 PID: 619 Comm: gem_exec_parse_ Tainted: G U 5.4.0-rc8+ #389 [ 19.342230] Hardware name: Intel Corporation NUC7i5BNK/NUC7i5BNB, BIOS BNKBL357.86A.0052.2017.0918.1346 09/18/2017 [ 19.342283] RIP: 0010:__unclaimed_reg_debug+0x4f/0x60 [i915] [ 19.342291] Code: 06 5b 5d 41 5c c3 c3 45 84 e4 48 c7 c0 15 af 2c a0 48 c7 c6 0b af 2c a0 89 ea 48 0f 44 f0 48 c7 c7 1e af 2c a0 e8 c7 56 e9 e0 <0f> 0b 83 2d e8 03 18 00 01 5b 5d 41 5c c3 0f 1f 00 23 b7 a4 00 00 [ 19.342301] RSP: 0018:ffffc90000553a28 EFLAGS: 00010092 [ 19.342309] RAX: 0000000000000023 RBX: 0000000000000000 RCX: 0000000000000006 [ 19.342316] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff88885eb163a0 [ 19.342322] RBP: 00000000000220a8 R08: 000000000000028c R09: ffff88885a4c47c0 [ 19.342328] R10: 0000000000000000 R11: 000000085488de02 R12: 0000000000000000 [ 19.342334] R13: ffff8888548407c8 R14: 0000000000000006 R15: ffffc90000553b7c [ 19.342341] FS: 00007f0e8a2879c0(0000) GS:ffff88885eb00000(0000) knlGS:0000000000000000 [ 19.342349] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 19.342355] CR2: 00007f0e8c235e12 CR3: 0000000858ef7001 CR4: 00000000001606e0 [ 19.342361] Call Trace: [ 19.342413] fwtable_write32+0x1a0/0x1e0 [i915] [ 19.342476] gen8_logical_ring_enable_irq+0x2d/0x40 [i915] [ 19.342541] irq_enable.part.14+0x1d/0x30 [i915] [ 19.342598] i915_request_enable_breadcrumb+0x16a/0x1a0 [i915] [ 19.342611] ? sync_file_alloc+0x80/0x80 [ 19.342620] __dma_fence_enable_signaling+0x2c/0x50 [ 19.342629] dma_fence_add_callback+0x34/0x90 [ 19.342638] sync_file_poll+0x7b/0xa0 Just silence the critics :( References: 045d1fb79616 ("drm/i915/gt: Acquire a GT wakeref for the breadcrumb interrupt") Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_lrc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c index fcd9bb771223..0bfafc29a3dc 100644 --- a/drivers/gpu/drm/i915/gt/intel_lrc.c +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c @@ -3338,14 +3338,16 @@ static int gen9_emit_bb_start(struct i915_request *rq, static void gen8_logical_ring_enable_irq(struct intel_engine_cs *engine) { - ENGINE_WRITE(engine, RING_IMR, - ~(engine->irq_enable_mask | engine->irq_keep_mask)); + GEM_BUG_ON(!intel_gt_pm_is_awake(engine->gt)); + + ENGINE_WRITE_FW(engine, RING_IMR, + ~(engine->irq_enable_mask | engine->irq_keep_mask)); ENGINE_POSTING_READ(engine, RING_IMR); } static void gen8_logical_ring_disable_irq(struct intel_engine_cs *engine) { - ENGINE_WRITE(engine, RING_IMR, ~engine->irq_keep_mask); + ENGINE_WRITE_FW(engine, RING_IMR, ~engine->irq_keep_mask); } static int gen8_emit_flush(struct i915_request *request, u32 mode)