1 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. 2 * 3 * This program is free software; you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License version 2 and 5 * only version 2 as published by the Free Software Foundation. 6 * 7 * This program is distributed in the hope that it will be useful, 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * GNU General Public License for more details. 11 */ 12 13 #ifndef __DPU_IRQ_H__ 14 #define __DPU_IRQ_H__ 15 16 #include <linux/kernel.h> 17 #include <linux/irqdomain.h> 18 19 #include "msm_kms.h" 20 21 /** 22 * dpu_irq_controller - define MDSS level interrupt controller context 23 * @enabled_mask: enable status of MDSS level interrupt 24 * @domain: interrupt domain of this controller 25 */ 26 struct dpu_irq_controller { 27 unsigned long enabled_mask; 28 struct irq_domain *domain; 29 }; 30 31 /** 32 * dpu_irq_preinstall - perform pre-installation of MDSS IRQ handler 33 * @kms: pointer to kms context 34 * @return: none 35 */ 36 void dpu_irq_preinstall(struct msm_kms *kms); 37 38 /** 39 * dpu_irq_postinstall - perform post-installation of MDSS IRQ handler 40 * @kms: pointer to kms context 41 * @return: 0 if success; error code otherwise 42 */ 43 int dpu_irq_postinstall(struct msm_kms *kms); 44 45 /** 46 * dpu_irq_uninstall - uninstall MDSS IRQ handler 47 * @drm_dev: pointer to kms context 48 * @return: none 49 */ 50 void dpu_irq_uninstall(struct msm_kms *kms); 51 52 /** 53 * dpu_irq - MDSS level IRQ handler 54 * @kms: pointer to kms context 55 * @return: interrupt handling status 56 */ 57 irqreturn_t dpu_irq(struct msm_kms *kms); 58 59 #endif /* __DPU_IRQ_H__ */ 60