Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp365562ybl; Tue, 7 Jan 2020 21:25:06 -0800 (PST) X-Google-Smtp-Source: APXvYqxV/IVhGIH0Pe9cT4K5pUK/uklsaIh40t62w/rZG/iDTnC5sOvFslaI91WMINuKaBxFaZAr X-Received: by 2002:a05:6830:2141:: with SMTP id r1mr2914916otd.39.1578461106579; Tue, 07 Jan 2020 21:25:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578461106; cv=none; d=google.com; s=arc-20160816; b=r3ER8U2KBEmV6+cfZ1EOYUiCgUUNpwIftfgDlFY0EOhv6coIVZURq95VhG4jUhv+WW bmMS/jckrzqhZwP7u2R/YqakS3SCTllw5NQvIv3Y6DpXQ1e2O2/u38dBAlV8ezh8kJqG jzKgLd5VD3yKQpb+j9hIubeuxZlo9GnwVeJu9aVFunDZ/UVWrr08OD+fc2ZoQUsGaDkm iyuqoiAyaolmHfEQ6ZapXRFvfwTdYxBO203+GaXDKCDi8fZfPxqNKPKinbfoVUywF2W0 BPRUmZo6+/fNGmOS3Mgl6jMzRZo2S0xyzqRhXpKa1vW5DtxwSvGP+m2PtM/9iaij/UKQ 3OKw== 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:cc:to:from :dkim-signature; bh=VXWKPtv3cxE8lSp3PQIY49x0a4P+s/RHd/rRix+wGzg=; b=F0U6IrKXR50kImsA6SHNO4vqfV07duqZQwtwW+S97+UiViXi0NWq8qqekcdyi5i744 eigEIdSX7MtBU9VYrACuDosw8Ui0pYV4GmiLn0YFxn3RltnmcXMQFkkJIH8a/eRECI38 SlMNolleT337yHypeygOFqd9gLTEY4beChxCm0DUcry6E3XtqxFVMrdOdhJUgmdijPGj sbKa8tapPo9X1bs+l8D1CxJeUUPuR1MlmFHT0935nkQc2n0Ka8aeK2V/Qb3gk9ZhUtUG MT++/0mZn4lJ3qitNgLaibRAc2/x145edP2tjhHqf+Ow/dSCl+Lc8nIF+umdJp6F7bS4 Altg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Jfjo+Fag; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e22si1342192oiy.124.2020.01.07.21.24.54; Tue, 07 Jan 2020 21:25:06 -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; dkim=pass header.i=@chromium.org header.s=google header.b=Jfjo+Fag; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726594AbgAHFYG (ORCPT + 99 others); Wed, 8 Jan 2020 00:24:06 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42636 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbgAHFYF (ORCPT ); Wed, 8 Jan 2020 00:24:05 -0500 Received: by mail-pl1-f196.google.com with SMTP id p9so627251plk.9 for ; Tue, 07 Jan 2020 21:24:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VXWKPtv3cxE8lSp3PQIY49x0a4P+s/RHd/rRix+wGzg=; b=Jfjo+Faggwo7DaWWKVmhC7/00Vvhz+MTRYNmhAKQYX1HCOP3EYR8Lin5NwFPnmhjMY 4+Fb5Qu0e1wDWqALzow5cVbQpRrmDtK6+s0MWVLSCLeAn/oBigTNqV6pS0G3uvjzNP7g ZOYd16bXAfTR+SPI/3E9hzT5bBEzHfFjf0IP8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VXWKPtv3cxE8lSp3PQIY49x0a4P+s/RHd/rRix+wGzg=; b=YZSHtSOWS32msSqFWtb6R0iaf0Xv9jiD6K3LDMlG7pUex8BsfU3gtvBktm4yxJmSgu c/QXxTJaVunbdQDsfbETEwct4Z7qvYQkzVAbV+1aTZReEA6DEs2Ed4zAsbsSVyNlAsLO ghgrlL9w340uiuAfF6VUUIVm0eaXL8Ci2+qZxJUjSNbsdY5KnddpxiFUh99T3kCBRGGF Z3VGzy7UyWp1s76KYHerImFzahEJshUKIN5dNdcWOXUOmHgtEWca1yQQvOSRS9CVEHaJ skqmh7JQt+LCToclcXc9E3y1XBTlSCGcfg/kzn3/UEuuMORbHDOK4OZ7GeMIm/jx9YMZ mJeQ== X-Gm-Message-State: APjAAAV/ebDdUKIAyqs29hMm5ke1F0aaaowj42OYmG8dtzHZukCI2zDN 9scrBXGD3KFYcw0o5vgGsmBG6g== X-Received: by 2002:a17:90a:3aaf:: with SMTP id b44mr2510426pjc.9.1578461044170; Tue, 07 Jan 2020 21:24:04 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:d8b7:33af:adcb:b648]) by smtp.gmail.com with ESMTPSA id n24sm387505pff.12.2020.01.07.21.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 21:24:03 -0800 (PST) From: Nicolas Boichat To: Rob Herring Cc: David Airlie , Daniel Vetter , Mark Rutland , Matthias Brugger , Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , Liam Girdwood , Mark Brown , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, hsinyi@chromium.org Subject: [PATCH v2 3/7] drm/panfrost: Improve error reporting in panfrost_gpu_power_on Date: Wed, 8 Jan 2020 13:23:33 +0800 Message-Id: <20200108052337.65916-4-drinkcat@chromium.org> X-Mailer: git-send-email 2.24.1.735.g03f4e72817-goog In-Reply-To: <20200108052337.65916-1-drinkcat@chromium.org> References: <20200108052337.65916-1-drinkcat@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is useful to know which component cannot be powered on. Signed-off-by: Nicolas Boichat --- Was useful when trying to probe bifrost GPU, to understand what issue we are facing. --- drivers/gpu/drm/panfrost/panfrost_gpu.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c index 8822ec13a0d619f..ba02bbfcf28c011 100644 --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c @@ -308,21 +308,26 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev) gpu_write(pfdev, L2_PWRON_LO, pfdev->features.l2_present); ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO, val, val == pfdev->features.l2_present, 100, 1000); + if (ret) + dev_err(pfdev->dev, "error powering up gpu L2"); gpu_write(pfdev, STACK_PWRON_LO, pfdev->features.stack_present); - ret |= readl_relaxed_poll_timeout(pfdev->iomem + STACK_READY_LO, + ret = readl_relaxed_poll_timeout(pfdev->iomem + STACK_READY_LO, val, val == pfdev->features.stack_present, 100, 1000); + if (ret) + dev_err(pfdev->dev, "error powering up gpu stack"); gpu_write(pfdev, SHADER_PWRON_LO, pfdev->features.shader_present); - ret |= readl_relaxed_poll_timeout(pfdev->iomem + SHADER_READY_LO, + ret = readl_relaxed_poll_timeout(pfdev->iomem + SHADER_READY_LO, val, val == pfdev->features.shader_present, 100, 1000); + if (ret) + dev_err(pfdev->dev, "error powering up gpu shader"); gpu_write(pfdev, TILER_PWRON_LO, pfdev->features.tiler_present); - ret |= readl_relaxed_poll_timeout(pfdev->iomem + TILER_READY_LO, + ret = readl_relaxed_poll_timeout(pfdev->iomem + TILER_READY_LO, val, val == pfdev->features.tiler_present, 100, 1000); - if (ret) - dev_err(pfdev->dev, "error powering up gpu"); + dev_err(pfdev->dev, "error powering up gpu tiler"); } void panfrost_gpu_power_off(struct panfrost_device *pfdev) -- 2.24.1.735.g03f4e72817-goog