gpu: nvgpu: re-organize interrupt logic

* Removed unnecessary irqs_enabled flag, and
   Replaced enable/disable irq logics with nvgpu variant functions.
 * Added nvgpu_interrupts data structure to hold interrupt details.
 * Interpret all stall irqs first and followed by nonstall irq from dt.
 * Used interrupt size checks for enable/disable irqs instead of
   comparing stall and nonstall interrupt lines.

Now adding new stall interrupt lines as easy as just updating macro.

Jira NVGPU-6019

Change-Id: I5a5eaa8d333c68ee87d25d2b45ec244ec8d7b297
Signed-off-by: Sagar Kadamati <skadamati@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2400777
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sagar Kadamati
2020-08-17 17:58:10 +05:30
committed by Alex Waterman
parent 2eaa3db3ee
commit e773cb6087
7 changed files with 111 additions and 88 deletions

View File

@@ -24,6 +24,7 @@
#include <linux/version.h>
#include <nvgpu/gk20a.h>
#include <nvgpu/interrupts.h>
#include "cde.h"
#include "sched.h"
@@ -74,6 +75,7 @@ struct nvgpu_os_linux {
struct gk20a g;
struct device *dev;
struct dgpu_thermal_alert thermal_alert;
struct nvgpu_interrupts interrupts;
struct {
struct cdev cdev;
struct device *node;