gpu: host1x: Enable actmon interrupt for OFA

To support interrupt-driven DFS, we need to enable actmon interrupt for
OFA.

Bug 4310958

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I0615ad4b28bb6d4bc6cd666eb354901f294f6173
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3001885
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Johnny Liu
2023-10-21 15:01:15 +00:00
committed by mobile promotions
parent a4afff1535
commit 1b6da7e345
2 changed files with 7 additions and 1 deletions

View File

@@ -20,9 +20,11 @@
#define HOST1X_COMMON_THOST_INTRMASK_NVDEC_ACTMON(v) (v << 4) #define HOST1X_COMMON_THOST_INTRMASK_NVDEC_ACTMON(v) (v << 4)
#define HOST1X_COMMON_THOST_INTRMASK_NVJPG_ACTMON(v) (v << 5) #define HOST1X_COMMON_THOST_INTRMASK_NVJPG_ACTMON(v) (v << 5)
#define HOST1X_COMMON_THOST_INTRMASK_NVJPG1_ACTMON(v) (v << 6) #define HOST1X_COMMON_THOST_INTRMASK_NVJPG1_ACTMON(v) (v << 6)
#define HOST1X_COMMON_THOST_INTRMASK_OFA_ACTMON(v) (v << 7)
#define HOST1X_COMMON_THOST_INTRSTATUS_NVENC_ACTMON_INTR BIT(2) #define HOST1X_COMMON_THOST_INTRSTATUS_NVENC_ACTMON_INTR BIT(2)
#define HOST1X_COMMON_THOST_INTRSTATUS_VIC_ACTMON_INTR BIT(3) #define HOST1X_COMMON_THOST_INTRSTATUS_VIC_ACTMON_INTR BIT(3)
#define HOST1X_COMMON_THOST_INTRSTATUS_NVDEC_ACTMON_INTR BIT(4) #define HOST1X_COMMON_THOST_INTRSTATUS_NVDEC_ACTMON_INTR BIT(4)
#define HOST1X_COMMON_THOST_INTRSTATUS_NVJPG_ACTMON_INTR BIT(5) #define HOST1X_COMMON_THOST_INTRSTATUS_NVJPG_ACTMON_INTR BIT(5)
#define HOST1X_COMMON_THOST_INTRSTATUS_NVJPG1_ACTMON_INTR BIT(6) #define HOST1X_COMMON_THOST_INTRSTATUS_NVJPG1_ACTMON_INTR BIT(6)
#define HOST1X_COMMON_THOST_INTRSTATUS_OFA_ACTMON_INTR BIT(7)

View File

@@ -31,6 +31,9 @@ static irqreturn_t host1x_general_isr(int irq, void *dev_id)
if (status & HOST1X_COMMON_THOST_INTRSTATUS_NVJPG1_ACTMON_INTR) if (status & HOST1X_COMMON_THOST_INTRSTATUS_NVJPG1_ACTMON_INTR)
host1x_actmon_handle_interrupt(host, HOST1X_CLASS_NVJPG1); host1x_actmon_handle_interrupt(host, HOST1X_CLASS_NVJPG1);
if (status & HOST1X_COMMON_THOST_INTRSTATUS_OFA_ACTMON_INTR)
host1x_actmon_handle_interrupt(host, HOST1X_CLASS_OFA);
host1x_common_writel(host, status, HOST1X_COMMON_THOST_INTRSTATUS); host1x_common_writel(host, status, HOST1X_COMMON_THOST_INTRSTATUS);
return IRQ_HANDLED; return IRQ_HANDLED;
@@ -72,7 +75,8 @@ static void host1x_intr_enable_general_intrs(struct host1x *host)
HOST1X_COMMON_THOST_INTRMASK_VIC_ACTMON(1) | HOST1X_COMMON_THOST_INTRMASK_VIC_ACTMON(1) |
HOST1X_COMMON_THOST_INTRMASK_NVDEC_ACTMON(1) | HOST1X_COMMON_THOST_INTRMASK_NVDEC_ACTMON(1) |
HOST1X_COMMON_THOST_INTRMASK_NVJPG_ACTMON(1) | HOST1X_COMMON_THOST_INTRMASK_NVJPG_ACTMON(1) |
HOST1X_COMMON_THOST_INTRMASK_NVJPG1_ACTMON(1), HOST1X_COMMON_THOST_INTRMASK_NVJPG1_ACTMON(1)|
HOST1X_COMMON_THOST_INTRMASK_OFA_ACTMON(1),
HOST1X_COMMON_THOST_INTRMASK); HOST1X_COMMON_THOST_INTRMASK);
} }