From patchwork Sat Oct 28 13:34:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 13439488 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7B204C27C47 for ; Sat, 28 Oct 2023 13:35:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F219810E0DE; Sat, 28 Oct 2023 13:35:08 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id BCF0210E12F for ; Sat, 28 Oct 2023 13:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698500101; x=1730036101; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Dqe5u/vOjXOcmjTd6v317WYLrSHa6RcR/LHMZWlOD3Y=; b=ets0phhY5d6jy5NdfkTI+81yX/SSkQFTluYg5fOna+HPikABmfIissWE 5QJgNh21fg0KZ6qHJjGkATQ5jkoKb1dSE/PWMWH7RSWafjPWUf2WtNan4 tzpF+SIwJqPlJ1rAu6MSYrjVE11BAo8TvFSZ84WoJFgdP/msuVyx0zwx7 iQCAnNXGyHp8m8KuM5DrFqCzOtkcc0ycq4Ig+AeUeDMtYA/C5FChBGnWp Mclu/RdtJ8hO1iblyvVN31muUSpgYNpbeLl/SqcDP3rSy8Ma0N7nZA96b aT9yvdNtOPNqjliWfYCKM1xzhFaQfmveSojrZosrpR64uSxNbamS9TCla A==; X-IronPort-AV: E=McAfee;i="6600,9927,10876"; a="6530375" X-IronPort-AV: E=Sophos;i="6.03,259,1694761200"; d="scan'208";a="6530375" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2023 06:35:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,259,1694761200"; d="scan'208";a="7907957" Received: from joe-255.igk.intel.com (HELO localhost) ([10.91.220.57]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2023 06:34:44 -0700 From: Stanislaw Gruszka To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 10/11] accel/ivpu/37xx: Print warning when VPUIP is not idle during power down Date: Sat, 28 Oct 2023 15:34:14 +0200 Message-Id: <20231028133415.1169975-11-stanislaw.gruszka@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231028133415.1169975-1-stanislaw.gruszka@linux.intel.com> References: <20231028133415.1169975-1-stanislaw.gruszka@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stanislaw Gruszka , Oded Gabbay , Jeffrey Hugo , Jacek Lawrynowicz , Krystian Pradzynski Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Print warning if VPUIP is not idle during power down. Use warn log level also when we fail to enter reset state as this is not really an error but unexpected behavior. Reviewed-by: Krystian Pradzynski Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo --- drivers/accel/ivpu/ivpu_hw_37xx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_hw_37xx.c b/drivers/accel/ivpu/ivpu_hw_37xx.c index 451c9777b237..1b47d77b4c6e 100644 --- a/drivers/accel/ivpu/ivpu_hw_37xx.c +++ b/drivers/accel/ivpu/ivpu_hw_37xx.c @@ -726,8 +726,11 @@ static int ivpu_hw_37xx_power_down(struct ivpu_device *vdev) ivpu_hw_37xx_save_d0i3_entry_timestamp(vdev); - if (!ivpu_hw_37xx_is_idle(vdev) && ivpu_hw_37xx_reset(vdev)) - ivpu_err(vdev, "Failed to reset the VPU\n"); + if (!ivpu_hw_37xx_is_idle(vdev)) { + ivpu_warn(vdev, "VPU not idle during power down\n"); + if (ivpu_hw_37xx_reset(vdev)) + ivpu_warn(vdev, "Failed to reset the VPU\n"); + } if (ivpu_pll_disable(vdev)) { ivpu_err(vdev, "Failed to disable PLL\n");