From nobody Sat Apr 4 07:58:55 2026 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D6313D3002 for ; Fri, 20 Mar 2026 16:42:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774024927; cv=none; b=OyLOU8xIHbuuzJlIMCc0W0xad/KVPKHs+wyk8+H7nQdGTN+Uf0/+lK1sd0lJ0KGaT4eIov+fP7RGUSt7lTyVwMEsykxx7gYFARtM4xU/xyZGk2E0W8aWvZsbtkjDhBV8IjxfEN6syvX9l8RsBJxOJCIPcUirc35+uZ7uvod2zUQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774024927; c=relaxed/simple; bh=9gtEy4yg3z6hcSL+ls60gam+3XwsfImvBB3BuItXat4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R8IFZKUdEInFS6ha0tCpUWT9rKRoXPIPjRrLjW43TDwwqpl02+4REJaAB7HkMMylnHuh5g617psma9S9OSBK391hANwKfjOWnC3++QzH/Ujzzf7ZFFl2Ts/uqMAjcdffqnM26UTUEoiZ/rvVa51SXut9ZxtRTEd6FpHHmTDFe1s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nbsNvtyR; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nbsNvtyR" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4852f8ac7e9so21136895e9.1 for ; Fri, 20 Mar 2026 09:42:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1774024923; x=1774629723; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7uiCTexBrx4dMD1Q5L1o5FxLTDC5BhBtXi4Vo6qoAUg=; b=nbsNvtyR8D7BAt65dZGDn0xVfoB4ce41z6vYFnH483goHgw2id3wkRdRMXjvffrfC+ z2P2lJ5khkVdRfU8m5LeBs1IfG2+kCnMthKQ6BukA5IOLpvpak9qvCFR5hx6CnQEPGjW MVlxT64ggpgHw5tyut2IFtthTyGi2kKFiyUP2PIZLHOG4Hmf8k5rET0dQWE21dkHR1uq P9Jdr4S278BuRINXMKslDIyejhUvl/WX2jrYv+CLe6wW8y1fttqqqeYH/x65WxCh/zud 53X2BzfyK8q9ohTZhzTtCf2JXeZumAooSdRQDuvRVwstDp8/l6D6J1Ssw3OdEJGl3sSw rZGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774024923; x=1774629723; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7uiCTexBrx4dMD1Q5L1o5FxLTDC5BhBtXi4Vo6qoAUg=; b=JAfL5aUWnepbFd2YDlkMTyL7GFJEXv+lQWVcpVc/7/P7TLH8MH1v5kdaG7F8/SnGoB LJbNRLL1yhX257UXHTCJtqtq/Z1DuG1B311A+L4zZKin/yUeKTWKN+0SZKHo/d8jbDvX DiuYRzO+GyFho7ZipHQTM4NPJe6F1YWoIm3eyILhhldMzEV2s4xrWB9vnd99f2Oh5RRT fveP50JyJVshW1gbY3rRMm22nFWkrAg/Ek5WKC1pHyR3MhAuRo/Uo9igQc4HVW/h7cfc mI8Wfh4kgwvvD1Dblx9wH9NQbd6jxtMgDGPOXGgFTfmzw6FKzUl0v9S/udBRHDlLtF6C KhRQ== X-Forwarded-Encrypted: i=1; AJvYcCW8oElGHQpYRBnAxYRMIu/DTivtbwMaYOImptmBIuUAtGUya6zbdUm0vA3Q7j/z3NvnwWJ8OdsnEb33IH8=@vger.kernel.org X-Gm-Message-State: AOJu0YwoTNgKMAWBwL388hbV3OEh5hJOJijbfxDOCma8gUkeadv3hl4q RZGFJuU0LHguxljxL7BxxxHVFED+HpZoZCgFSLtrkZBrbiiVLxLht9N5 X-Gm-Gg: ATEYQzwLhmF3UkM6pmrXnfxjjNmZLNHbiZqw8pHMIcd6ctuBZXw4+xXRzUbLCkkTtwy t/h252BOt7Omygt5Yt0Mr7RUQcyYj25P8aR8zrAibPr4xOu7M3pNql9HtdzBO3BLWuXvsvXwltN Vht853nVgAaBS0xHK+s/8PsJw/38rV6vOwY4BNnhxrPdPpbOfLoRU2XkZZ6SPNY0+XslclOCYju k1ea0yvjYptIZQhgqcJ8pHO9KObsHEYs10AwEDUmbK4IUGLGz6fSJitIW5hfkI1v5impGfVDgPI 8TfffCuFikHpyclkOF2mQ6GJyWFbs6KwzpPB6FryLFrvpy03z/2wN3hWQI8a8zfXctZVNlGsJWy GMPJLRWCA8YGfo+mGTemwKh7vGdxRj5b2Afr3TmszLmYR39V9fBGdNM5GMqpCEpVJEAWl/O2d8L ErvvWWWpqORa13oKWLI0vdtaWh/4PVg5E= X-Received: by 2002:a05:600c:35c1:b0:485:3b50:fe54 with SMTP id 5b1f17b1804b1-486fedb2545mr63880305e9.11.1774024923408; Fri, 20 Mar 2026 09:42:03 -0700 (PDT) Received: from biju.lan ([2a00:23c4:a758:8a01:5b93:d2b1:bc5c:9231]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b64703650sm7016575f8f.20.2026.03.20.09.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2026 09:42:03 -0700 (PDT) From: Biju X-Google-Original-From: Biju To: Boris Brezillon , Rob Herring , Steven Price , =?UTF-8?q?Adri=C3=A1n=20Larumbe?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Biju Das , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH v2 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L Date: Fri, 20 Mar 2026 16:41:49 +0000 Message-ID: <20260320164158.487406-4-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260320164158.487406-1-biju.das.jz@bp.renesas.com> References: <20260320164158.487406-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Biju Das On RZ/G2L SoCs, the GPU MMU requires a bus_ace clock to operate correctly. Without it, unbind/bind cycles leave the GPU non-operational, manifesting as an AS_ACTIVE bit stuck and a soft reset timeout falling back to hard reset. Add bus_ace_clock as an optional clock, wiring it into init/fini, and the runtime suspend/resume paths alongside the existing optional bus_clock. Reviewed-by: Steven Price Signed-off-by: Biju Das Reviewed-by: Adri=C3=A1n Larumbe --- v1->v2: * Dropped duplicate err assignment * Changed the format string of dev_err to "%d" and simplify the dev_err() line by using err rather than the same PTR_ERR(). * Collected tag --- drivers/gpu/drm/panfrost/panfrost_device.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/panfrost/panfrost_device.h | 1 + 2 files changed, 23 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/p= anfrost/panfrost_device.c index 01e702a0b2f0..7fed22d555a5 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.c +++ b/drivers/gpu/drm/panfrost/panfrost_device.c @@ -70,8 +70,21 @@ static int panfrost_clk_init(struct panfrost_device *pfd= ev) goto disable_clock; } =20 + pfdev->bus_ace_clock =3D devm_clk_get_optional(pfdev->base.dev, "bus_ace"= ); + if (IS_ERR(pfdev->bus_ace_clock)) { + err =3D PTR_ERR(pfdev->bus_ace_clock); + dev_err(pfdev->base.dev, "get bus_ace_clock failed %d\n", err); + goto disable_bus_clock; + } + + err =3D clk_prepare_enable(pfdev->bus_ace_clock); + if (err) + goto disable_bus_clock; + return 0; =20 +disable_bus_clock: + clk_disable_unprepare(pfdev->bus_clock); disable_clock: clk_disable_unprepare(pfdev->clock); =20 @@ -80,6 +93,7 @@ static int panfrost_clk_init(struct panfrost_device *pfde= v) =20 static void panfrost_clk_fini(struct panfrost_device *pfdev) { + clk_disable_unprepare(pfdev->bus_ace_clock); clk_disable_unprepare(pfdev->bus_clock); clk_disable_unprepare(pfdev->clock); } @@ -432,6 +446,10 @@ static int panfrost_device_runtime_resume(struct devic= e *dev) ret =3D clk_enable(pfdev->bus_clock); if (ret) goto err_bus_clk; + + ret =3D clk_enable(pfdev->bus_ace_clock); + if (ret) + goto err_bus_ace_clk; } =20 panfrost_device_reset(pfdev, true); @@ -439,6 +457,9 @@ static int panfrost_device_runtime_resume(struct device= *dev) =20 return 0; =20 +err_bus_ace_clk: + if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) + clk_disable(pfdev->bus_clock); err_bus_clk: if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) clk_disable(pfdev->clock); @@ -462,6 +483,7 @@ static int panfrost_device_runtime_suspend(struct devic= e *dev) panfrost_gpu_power_off(pfdev); =20 if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) { + clk_disable(pfdev->bus_ace_clock); clk_disable(pfdev->bus_clock); clk_disable(pfdev->clock); reset_control_assert(pfdev->rstc); diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/p= anfrost/panfrost_device.h index 0f3992412205..ec55c136b1b6 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.h +++ b/drivers/gpu/drm/panfrost/panfrost_device.h @@ -136,6 +136,7 @@ struct panfrost_device { void __iomem *iomem; struct clk *clock; struct clk *bus_clock; + struct clk *bus_ace_clock; struct regulator_bulk_data *regulators; struct reset_control *rstc; /* pm_domains for devices with more than one. */ --=20 2.43.0