Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2569517ybf; Mon, 2 Mar 2020 11:16:01 -0800 (PST) X-Google-Smtp-Source: ADFU+vvogn3LXD56mPaOpV5XseOLPw+i8okTZ+1+LeMdWOY7sgyNk1JjuwHS/lTe5JOZBBYBd3be X-Received: by 2002:a05:6830:60b:: with SMTP id w11mr540342oti.350.1583176561481; Mon, 02 Mar 2020 11:16:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583176561; cv=none; d=google.com; s=arc-20160816; b=GX26PcclxCDgMeapxdNOfBjj+PgweTjR3dFOOibZOjjFCtaOo1AQl5ZWVqbLnrLp2D ku4sMZmCT9ZmYVAFFQ/fz6lpTbAuH13Lp51o4u0/sAfO/uMY3WSPI5eQZtmzXXlZeXmr pSznatHpcG0dd0YwhLpKuI8+K0Ti/KHQFTQxFt0UD3yVpoC25QSPBRY77ba7/sMKdPc6 jKIqJIdif+gA2ExIdDBWi8UAm3JAapVyD74fDVL7AsBBQljuBE0O6uKAsvExmOz51uha 4sIBR3O6Fh85rwXIOLXe4BSXumpOkt9/T/4mY86w1UhBtaqkXn2+3J+f5ejN/uoRgM+F LSlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=gCy3YUA925eQ7FJstFJH+1c5L7zKqOeVXsYJUzDW65w=; b=MwztmoAC6GrvUWm8sFtuLad0V3urtPfXdWaY63CnRh2FkaMAPJXAkZrnJL4SNFd5o2 qmvT9JeIvm82++k1UVRqf488v86wcRWkNDJChzS5P2Fbt5qLQiY/0NCX99oMamAlfq34 KRgXXHjziqkc+a43Qu5CRLe0gtMBjWEZhawxX891yEz2LBRWVHH2iHPVLCHGwqeGFSTz V3F8ZsvxihFcb+wMKWnqhyWZ6hb+kFt1dEKFjUX375Kd7P+dOPfHhr4XvbLi4j6U8Ea3 NG4eyjk0iHJcave+21/Ef40TpBLzGMso28pHax/L0e4o8zLjvC5Bzf9oMG8oj+QyLy9k B2xQ== 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 i15si6888114oik.46.2020.03.02.11.15.49; Mon, 02 Mar 2020 11:16:01 -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 S1727731AbgCBTNz (ORCPT + 99 others); Mon, 2 Mar 2020 14:13:55 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:50568 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727408AbgCBTNo (ORCPT ); Mon, 2 Mar 2020 14:13:44 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id ED0D5FB04; Mon, 2 Mar 2020 20:13:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OoMrX3WfUypl; Mon, 2 Mar 2020 20:13:41 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id B2AE54048F; Mon, 2 Mar 2020 20:13:36 +0100 (CET) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Lucas Stach , Russell King , Christian Gmeiner , David Airlie , Daniel Vetter , etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] drm/etnaviv: Warn when GPU doesn't idle fast enough Date: Mon, 2 Mar 2020 20:13:36 +0100 Message-Id: X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the GPU isn't idle after signalling pm_runtime_mark_last_busy() plus waiting for the autosuspend delay there's likely something wrong with the way we check idleness so warn about that. Signed-off-by: Guido Günther --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index da24e433f82a..4fd16b8f8a7a 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1824,8 +1824,11 @@ static int etnaviv_gpu_rpm_suspend(struct device *dev) mask = gpu->idle_mask & ~(VIVS_HI_IDLE_STATE_FE | VIVS_HI_IDLE_STATE_MC); idle = gpu_read(gpu, VIVS_HI_IDLE_STATE) & mask; - if (idle != mask) + if (idle != mask) { + dev_warn_ratelimited(dev, "GPU not yet idle, mask: 0x%08x\n", + idle); return -EBUSY; + } return etnaviv_gpu_hw_suspend(gpu); } -- 2.23.0