Received: by 10.223.185.116 with SMTP id b49csp2392993wrg; Mon, 12 Feb 2018 08:51:40 -0800 (PST) X-Google-Smtp-Source: AH8x227hLTjr73z9sycklexmk/PpBBBnws2lMhbUjtNh+iE06aZh09DY2M0ny94yKqYs2uEEeDD6 X-Received: by 10.99.191.78 with SMTP id i14mr9987580pgo.9.1518454300358; Mon, 12 Feb 2018 08:51:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518454300; cv=none; d=google.com; s=arc-20160816; b=JHVufjS4IOySJuodIGvyhveCVDjTCTSIcNMpnAAWciyZ+c5p/Wd005rLP4MSE5hzIx 77NfofJhzhWdZL63QnKSSisFp098Q8Au514axqG8t5ErPMUT/u7ctedshKKQ/pTtmxkg W08tZarr0DBc9+lqkl9+cnJkXjm3J96mKZy8iV+dOUkpoPI6YukTK3RZwhzTr6QrLA9t +JTyBe/8cJmpTaX1U2R8QKRO3Vu1GtmwU6k1pftZZ2QqHzjpckZMG9LauGTpiajN43TT NCAvlB8yvHsKIIAb8U8PWtPKxBjo8ehf1k5SMuPl8aorDCuUYNXUXWCEvIOrQOqCUwrL 4VVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:arc-authentication-results; bh=d8xT4BaCGQCjf48uhZz8t6NHo+CnrbyhIDFvB3VhB44=; b=wItzfVZH3L7usYDCkP4GA0qKyKB5CJIyccSMsSbvDJ5Zn7SEXmvrAWUjqy4BO2o2H7 ZYfVZ2xgQ9ueBbF29GzlYQbPZbOx/BFTKI+TFcTkad2w9rcGGPXV85/O4NGtO1LX9b1q 8huC4JA3KGqwEaBxpDT+D14fTVd+3r59u66OY0qxBaGKJ1m0/W0HpGq9awas/d7HqvRK VwRXaLvhFWNB5v5W+OhtX2xsUb7qyFvFMe0JJVQPkR8a0OKYqu0F5Q/gcB8idnrPQxJ1 tdF09g7tv1AMC3hcr/3rJj1A+/nj0ZyCKBxGqW+KRLFvfHLHrtA3QZhzOHYCL0xq2SoS M9QQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si2392107pgp.310.2018.02.12.08.51.26; Mon, 12 Feb 2018 08:51:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935094AbeBLNEM (ORCPT + 99 others); Mon, 12 Feb 2018 08:04:12 -0500 Received: from mga06.intel.com ([134.134.136.31]:16449 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933646AbeBLNEL (ORCPT ); Mon, 12 Feb 2018 08:04:11 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2018 05:04:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,501,1511856000"; d="scan'208";a="19298663" Received: from ideak-desk.fi.intel.com ([10.237.72.61]) by fmsmga002.fm.intel.com with ESMTP; 12 Feb 2018 05:04:06 -0800 Date: Mon, 12 Feb 2018 15:04:06 +0200 From: Imre Deak To: Lukas Wunner Cc: Tejun Heo , Lai Jiangshan , Alex Deucher , Dave Airlie , Ben Skeggs , Ismo Toijala , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Liviu Dudau , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hans de Goede , Peter Wu Subject: Re: [PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers Message-ID: <20180212130406.5dsh7rm47azeyev7@ideak-desk.fi.intel.com> Reply-To: imre.deak@intel.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 11, 2018 at 10:38:28AM +0100, Lukas Wunner wrote: > [...] > i915, malidp and msm "solved" this issue by not stopping the poll worker > on runtime suspend. But this results in the GPU bouncing back and forth > between D0 and D3 continuously. That's a total no-go for GPUs which > runtime suspend to D3cold since every suspend/resume cycle costs a > significant amount of time and energy. (i915 and malidp do not seem > to acquire a runtime PM ref in the ->detect callbacks, which seems > questionable. msm however does and would also deadlock if it disabled > the poll worker on runtime suspend. cc += Archit, Liviu, intel-gfx) In i915 polling is on during runtime suspend only if there are outputs without hotplug interrupt support. A special case is when an output has working HPD interrupts when in D0, but no interrupts when runtime suspended. For these we start polling (from a scheduled work) in the runtime suspend hook and stop it in the runtime resume hook (again from a scheduled work). Imo whether to leave polling on or not for the above purpose is a policy question (configurable with the drm_kms_helper.poll param). --Imre > > Please review. Thanks, > > Lukas > > Lukas Wunner (5): > workqueue: Allow retrieval of current task's work struct > drm: Allow determining if current task is output poll worker > drm/nouveau: Fix deadlock on runtime suspend > drm/radeon: Fix deadlock on runtime suspend > drm/amdgpu: Fix deadlock on runtime suspend > > drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 58 +++++++++++++------- > drivers/gpu/drm/drm_probe_helper.c | 14 +++++ > drivers/gpu/drm/nouveau/nouveau_connector.c | 18 +++++-- > drivers/gpu/drm/radeon/radeon_connectors.c | 74 +++++++++++++++++--------- > include/drm/drm_crtc_helper.h | 1 + > include/linux/workqueue.h | 1 + > kernel/workqueue.c | 16 ++++++ > 7 files changed, 132 insertions(+), 50 deletions(-) > > -- > 2.15.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel