From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>,
Oded Gabbay <ogabbay@kernel.org>,
Jeffrey Hugo <quic_jhugo@quicinc.com>,
Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Subject: [PATCH 5/6] accel/ivpu: Do no initialize parameters on power up
Date: Fri, 20 Oct 2023 12:45:00 +0200 [thread overview]
Message-ID: <20231020104501.697763-6-stanislaw.gruszka@linux.intel.com> (raw)
In-Reply-To: <20231020104501.697763-1-stanislaw.gruszka@linux.intel.com>
Initialize HW specific parameters only once. We do not have to do this
on every power_up (performed during initialization and on resume). Move
corresponding code to ->init_info()
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
---
drivers/accel/ivpu/ivpu_hw_37xx.c | 8 ++++----
drivers/accel/ivpu/ivpu_hw_40xx.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/accel/ivpu/ivpu_hw_37xx.c b/drivers/accel/ivpu/ivpu_hw_37xx.c
index edd4d860f135..63ce5418d3fa 100644
--- a/drivers/accel/ivpu/ivpu_hw_37xx.c
+++ b/drivers/accel/ivpu/ivpu_hw_37xx.c
@@ -632,6 +632,10 @@ static int ivpu_hw_37xx_info_init(struct ivpu_device *vdev)
ivpu_hw_init_range(&hw->ranges.shave, 0x180000000, SZ_2G);
ivpu_hw_init_range(&hw->ranges.dma, 0x200000000, SZ_8G);
+ ivpu_hw_read_platform(vdev);
+ ivpu_hw_wa_init(vdev);
+ ivpu_hw_timeouts_init(vdev);
+
return 0;
}
@@ -688,10 +692,6 @@ static int ivpu_hw_37xx_power_up(struct ivpu_device *vdev)
{
int ret;
- ivpu_hw_read_platform(vdev);
- ivpu_hw_wa_init(vdev);
- ivpu_hw_timeouts_init(vdev);
-
ret = ivpu_hw_37xx_reset(vdev);
if (ret)
ivpu_warn(vdev, "Failed to reset HW: %d\n", ret);
diff --git a/drivers/accel/ivpu/ivpu_hw_40xx.c b/drivers/accel/ivpu/ivpu_hw_40xx.c
index 1c2528549635..4bf4c8780044 100644
--- a/drivers/accel/ivpu/ivpu_hw_40xx.c
+++ b/drivers/accel/ivpu/ivpu_hw_40xx.c
@@ -722,6 +722,10 @@ static int ivpu_hw_40xx_info_init(struct ivpu_device *vdev)
ivpu_hw_init_range(&vdev->hw->ranges.shave, 0x80000000 + SZ_256M, SZ_2G - SZ_256M);
ivpu_hw_init_range(&vdev->hw->ranges.dma, 0x200000000, SZ_8G);
+ ivpu_hw_read_platform(vdev);
+ ivpu_hw_wa_init(vdev);
+ ivpu_hw_timeouts_init(vdev);
+
return 0;
}
@@ -813,10 +817,6 @@ static int ivpu_hw_40xx_power_up(struct ivpu_device *vdev)
return ret;
}
- ivpu_hw_read_platform(vdev);
- ivpu_hw_wa_init(vdev);
- ivpu_hw_timeouts_init(vdev);
-
ret = ivpu_hw_40xx_d0i3_disable(vdev);
if (ret)
ivpu_warn(vdev, "Failed to disable D0I3: %d\n", ret);
--
2.25.1
next prev parent reply other threads:[~2023-10-20 10:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 10:44 [PATCH 0/6] accel/ivpu: Update to -next 2023-10-20 Stanislaw Gruszka
2023-10-20 10:44 ` [PATCH 1/6] accel/ivpu: Use ratelimited warn and err in IPC/JSM Stanislaw Gruszka
2023-10-20 15:10 ` Jeffrey Hugo
2023-10-20 10:44 ` [PATCH 2/6] accel/ivpu: Fix verbose version of REG_POLL macros Stanislaw Gruszka
2023-10-20 15:14 ` Jeffrey Hugo
2023-10-20 10:44 ` [PATCH 3/6] accel/ivpu: Read clock rate only if device is up Stanislaw Gruszka
2023-10-20 15:16 ` Jeffrey Hugo
2023-10-20 10:44 ` [PATCH 4/6] accel/ivpu: Print IPC type string instead of number Stanislaw Gruszka
2023-10-20 15:18 ` Jeffrey Hugo
2023-10-20 10:45 ` Stanislaw Gruszka [this message]
2023-10-20 15:21 ` [PATCH 5/6] accel/ivpu: Do no initialize parameters on power up Jeffrey Hugo
2023-10-20 10:45 ` [PATCH 6/6] accel/ivpu/37xx: Remove support for FPGA and simics Stanislaw Gruszka
2023-10-20 15:25 ` Jeffrey Hugo
2023-10-23 7:13 ` [PATCH 0/6] accel/ivpu: Update to -next 2023-10-20 Stanislaw Gruszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231020104501.697763-6-stanislaw.gruszka@linux.intel.com \
--to=stanislaw.gruszka@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=ogabbay@kernel.org \
--cc=quic_jhugo@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).