Patch "gpu: host1x: Skip reset assert on Tegra186" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    gpu: host1x: Skip reset assert on Tegra186

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gpu-host1x-skip-reset-assert-on-tegra186.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5c8245088ad0df3ac2a5537447f93cbbc6c9809f
Author: Mikko Perttunen <mperttunen@xxxxxxxxxx>
Date:   Thu Feb 22 03:05:16 2024 +0200

    gpu: host1x: Skip reset assert on Tegra186
    
    [ Upstream commit 1fa8d07ae1a5fa4e87de42c338e8fc27f46d8bb6 ]
    
    On Tegra186, secure world applications may need to access host1x
    during suspend/resume, and rely on the kernel to keep Host1x out
    of reset during the suspend cycle. As such, as a quirk,
    skip asserting Host1x's reset on Tegra186.
    
    We don't need to keep the clocks enabled, as BPMP ensures the clock
    stays on while Host1x is being used. On newer SoC's, the reset line
    is inaccessible, so there is no need for the quirk.
    
    Fixes: b7c00cdf6df5 ("gpu: host1x: Enable system suspend callbacks")
    Signed-off-by: Mikko Perttunen <mperttunen@xxxxxxxxxx>
    Reviewed-by: Jon Hunter <jonathanh@xxxxxxxxxx>
    Tested-by: Jon Hunter <jonathanh@xxxxxxxxxx>
    Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240222010517.1573931-1-cyndis@xxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 42fd504abbcda..89983d7d73ca1 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -169,6 +169,7 @@ static const struct host1x_info host1x06_info = {
 	.num_sid_entries = ARRAY_SIZE(tegra186_sid_table),
 	.sid_table = tegra186_sid_table,
 	.reserve_vblank_syncpts = false,
+	.skip_reset_assert = true,
 };
 
 static const struct host1x_sid_entry tegra194_sid_table[] = {
@@ -680,13 +681,15 @@ static int __maybe_unused host1x_runtime_suspend(struct device *dev)
 	host1x_intr_stop(host);
 	host1x_syncpt_save(host);
 
-	err = reset_control_bulk_assert(host->nresets, host->resets);
-	if (err) {
-		dev_err(dev, "failed to assert reset: %d\n", err);
-		goto resume_host1x;
-	}
+	if (!host->info->skip_reset_assert) {
+		err = reset_control_bulk_assert(host->nresets, host->resets);
+		if (err) {
+			dev_err(dev, "failed to assert reset: %d\n", err);
+			goto resume_host1x;
+		}
 
-	usleep_range(1000, 2000);
+		usleep_range(1000, 2000);
+	}
 
 	clk_disable_unprepare(host->clk);
 	reset_control_bulk_release(host->nresets, host->resets);
diff --git a/drivers/gpu/host1x/dev.h b/drivers/gpu/host1x/dev.h
index c8e302de76257..925a118db23f5 100644
--- a/drivers/gpu/host1x/dev.h
+++ b/drivers/gpu/host1x/dev.h
@@ -116,6 +116,12 @@ struct host1x_info {
 	 * the display driver disables VBLANK increments.
 	 */
 	bool reserve_vblank_syncpts;
+	/*
+	 * On Tegra186, secure world applications may require access to
+	 * host1x during suspend/resume. To allow this, we need to leave
+	 * host1x not in reset.
+	 */
+	bool skip_reset_assert;
 };
 
 struct host1x {




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux