Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp214402ybv; Thu, 6 Feb 2020 21:29:05 -0800 (PST) X-Google-Smtp-Source: APXvYqyT864Tu55NsfcDFTuBqVoG9JOwrligGtL1GVX2/pMSITpmjH4jIpxDi5MAe1qfKh8OYnvf X-Received: by 2002:a54:448b:: with SMTP id v11mr960659oiv.74.1581053345472; Thu, 06 Feb 2020 21:29:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581053345; cv=none; d=google.com; s=arc-20160816; b=OmogfZuPEG0s36RE1AvPLuZvc0kWahwZiv4a7CyEVA5jZZQJt7WRZ9K/OjjkTQUZmF 2CNghYNkXLbhtGKb9G9V5v53pqyAANSAB71Y8eT4409r/lmdqhnZPzQI+0iHxXzHsbSy T4BKkK2vn4hLxH/Avj1zh1HZCpEdQoaBNGN03QJHRmge2X3tuAZUD/BccAd5qs2wzPy6 Ch2fxuE+5oBEh1+qSeiOzh59+9va3UmFV55DcwrO2D9LLecQ8TaDWvrhNgIxMiZuToNX gsJzCeTfmoz+LO9aCoaDA4niHUpaKJGymD1/hRGjIFUREHxtrpYmD771vaYlXe0c4qOx Gcwg== 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=6xpmN6rVRpQ9+/BKl26/gWkRoJrUlmctwTSJRjJCc9M=; b=fAPChUL40VPbM8Yj0/y57L31LZFJfrBFdXCg+Q0SXIlK/5h8HLmWt01YKlZn9D2YEk gLKLrIggzBARZZfh/whobBkddH8GR0Y0XM40R6VBiCqa1aeCN3VhJTGGy6FUZ/qNMVtX 9hw6a+FrKIVZ5VQBalah11JGlIwAe63EToEZ4dfNnXglY+YP21berN25lZ/n4v9MrNU4 YwiN3lK65yfOC0WL+l7P/Pwo/G147LKgqVrMSl4+ruXybc/Lp6m4TP0qWEz1YfwTQmtr HBQtNKla3kyBBw8WD3j/21KIiJi0OQupdodgZjl0gqWYyHooOIHflDYO+DPseIUWWNzQ gYfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EfIrgn8K; 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 h18si1103000otk.227.2020.02.06.21.28.37; Thu, 06 Feb 2020 21:29:05 -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=EfIrgn8K; 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 S1726901AbgBGF1B (ORCPT + 99 others); Fri, 7 Feb 2020 00:27:01 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:40922 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726465AbgBGF1A (ORCPT ); Fri, 7 Feb 2020 00:27:00 -0500 Received: by mail-pl1-f195.google.com with SMTP id y1so517863plp.7 for ; Thu, 06 Feb 2020 21:27:00 -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=6xpmN6rVRpQ9+/BKl26/gWkRoJrUlmctwTSJRjJCc9M=; b=EfIrgn8KJTdEPRV6t2D01u2C1tbZ2N5L+zz7+zq66y1iSVivuP8DBp9QrRPb2KxMeQ /ektvloYsjEAqIXPfLcxnAAUqVeqhAJibeu5lQbfMyCx5VI1xcyHGPq//k6mqcmQ0gfS CPinmVfCOSlqIHxC/KFn8Uqs9YBoRyqsFwy9g= 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=6xpmN6rVRpQ9+/BKl26/gWkRoJrUlmctwTSJRjJCc9M=; b=Z0qXgCiyAnNetJhee7Ay3p9rrqHalRytutDOUeA5//JcpYvS2paOITMhSV7OgNRtUZ oQLGL5ERatmi/Wf8g8sixNmxJ9EmDgDs//k0605WR7r2zuG0Fy4VFv3UHUE2CPCclgiC swvPnhd/0JNARshP9kDorXLFXZUI0WGwzlRiGhicdMMXyzd5XDlfEhaPWhZUVyTbwX8/ yKiNcoCClF3Ui83cX3Lsl62RhtwWCTnggezozmZZUdR2wQe7TTSasb65oxmBchdeqCVK rrptxXx7NDWJqdEa4juCwDJAhF8eJ/lP2iVnfDSaLPyvOXwX+vf9qqVM7hKqrlQIwbxo q/SQ== X-Gm-Message-State: APjAAAXzHTAn+y+e7dbfjvK8esqvB4sZW2aMQ2OgO8woDnUHYwjC7c6y D2O1XGadEkI+40WjnLAAistN4w== X-Received: by 2002:a17:902:b682:: with SMTP id c2mr8017343pls.127.1581053219763; Thu, 06 Feb 2020 21:26:59 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:d8b7:33af:adcb:b648]) by smtp.gmail.com with ESMTPSA id i66sm1174485pfg.85.2020.02.06.21.26.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 21:26:59 -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, ulf.hansson@linaro.org Subject: [PATCH v4 3/7] drm/panfrost: Improve error reporting in panfrost_gpu_power_on Date: Fri, 7 Feb 2020 13:26:23 +0800 Message-Id: <20200207052627.130118-4-drinkcat@chromium.org> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog In-Reply-To: <20200207052627.130118-1-drinkcat@chromium.org> References: <20200207052627.130118-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 Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig --- Was useful when trying to probe Bifrost GPU, to understand what issue we are facing. v4: - No change v3: - Rebased on https://patchwork.kernel.org/patch/11325689/ drivers/gpu/drm/panfrost/panfrost_gpu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c index 460fc190de6e815..856f2fd1fa8ed27 100644 --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c @@ -308,17 +308,20 @@ 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, 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.25.0.341.g760bfbb309-goog