mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
gpu: host1x: Enable general interrupts for actmon
Host1x general interrupts include actmon-related interrupts, axi timeout interrupts, and illegal access interrupts. This change enables actmon-related interrupts only. Bug 3788919 Signed-off-by: Johnny Liu <johnliu@nvidia.com> Change-Id: Iea1f1622a11afa72f70f8d10efebd857a51cc4e2 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889825 Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
8733469474
commit
03fd3f1188
@@ -47,6 +47,11 @@ void host1x_common_writel(struct host1x *host1x, u32 v, u32 r)
|
||||
writel(v, host1x->common_regs + r);
|
||||
}
|
||||
|
||||
u32 host1x_common_readl(struct host1x *host1x, u32 r)
|
||||
{
|
||||
return readl(host1x->common_regs + r);
|
||||
}
|
||||
|
||||
void host1x_hypervisor_writel(struct host1x *host1x, u32 v, u32 r)
|
||||
{
|
||||
writel(v, host1x->hv_regs + r);
|
||||
@@ -832,8 +837,12 @@ static int host1x_probe(struct platform_device *pdev)
|
||||
if (host->syncpt_irq < 0)
|
||||
return host->syncpt_irq;
|
||||
|
||||
host->general_irq = platform_get_irq_byname_optional(pdev, "host1x");
|
||||
|
||||
mutex_init(&host->devices_lock);
|
||||
INIT_LIST_HEAD(&host->devices);
|
||||
spin_lock_init(&host->actmons_lock);
|
||||
INIT_LIST_HEAD(&host->actmons);
|
||||
INIT_LIST_HEAD(&host->list);
|
||||
host->dev = &pdev->dev;
|
||||
|
||||
@@ -849,6 +858,12 @@ static int host1x_probe(struct platform_device *pdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (host->general_irq > 0 && host->common_regs) {
|
||||
err = host1x_hw_intr_init_host_general(host);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
err = host1x_get_assigned_resources(host);
|
||||
if (err)
|
||||
return err;
|
||||
@@ -979,6 +994,7 @@ static int __maybe_unused host1x_runtime_suspend(struct device *dev)
|
||||
struct host1x *host = dev_get_drvdata(dev);
|
||||
int err;
|
||||
|
||||
host1x_hw_intr_disable_all_general_intrs(host);
|
||||
host1x_intr_stop(host);
|
||||
host1x_syncpt_save(host);
|
||||
|
||||
@@ -999,6 +1015,7 @@ static int __maybe_unused host1x_runtime_suspend(struct device *dev)
|
||||
resume_host1x:
|
||||
host1x_setup_virtualization_tables(host);
|
||||
host1x_syncpt_restore(host);
|
||||
host1x_hw_intr_enable_general_intrs(host);
|
||||
host1x_intr_start(host);
|
||||
|
||||
return err;
|
||||
@@ -1035,6 +1052,7 @@ static int __maybe_unused host1x_runtime_resume(struct device *dev)
|
||||
|
||||
host1x_setup_virtualization_tables(host);
|
||||
host1x_syncpt_restore(host);
|
||||
host1x_hw_intr_enable_general_intrs(host);
|
||||
host1x_intr_start(host);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user