1 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
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.
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.
13 #define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
15 #include <linux/irqdomain.h>
16 #include <linux/irq.h>
17 #include <linux/kthread.h>
20 #include "dpu_core_irq.h"
22 irqreturn_t dpu_irq(struct msm_kms *kms)
24 struct dpu_kms *dpu_kms = to_dpu_kms(kms);
26 return dpu_core_irq(dpu_kms);
29 void dpu_irq_preinstall(struct msm_kms *kms)
31 struct dpu_kms *dpu_kms = to_dpu_kms(kms);
33 if (!dpu_kms->dev || !dpu_kms->dev->dev) {
34 pr_err("invalid device handles\n");
38 dpu_core_irq_preinstall(dpu_kms);
41 int dpu_irq_postinstall(struct msm_kms *kms)
43 struct dpu_kms *dpu_kms = to_dpu_kms(kms);
47 DPU_ERROR("invalid parameters\n");
51 rc = dpu_core_irq_postinstall(dpu_kms);
56 void dpu_irq_uninstall(struct msm_kms *kms)
58 struct dpu_kms *dpu_kms = to_dpu_kms(kms);
61 DPU_ERROR("invalid parameters\n");
65 dpu_core_irq_uninstall(dpu_kms);