return IRQ_HANDLED;
}
+#ifdef CONFIG_EXYNOS_IOVMM
+static int g2d_iommu_fault_handler(struct iommu_domain *domain,
+ struct device *dev, unsigned long fault_addr,
+ int fault_flags, void *token)
+{
+ struct g2d_device *g2d_dev = token;
+ int job_id = g2d_hw_get_current_task(g2d_dev);
+
+ g2d_dump_task(g2d_dev, job_id);
+
+ return 0;
+}
+#endif
+
static __u32 get_hw_version(struct g2d_device *g2d_dev, __u32 *version)
{
int ret;
return PTR_ERR(g2d_dev->clock);
}
+ iovmm_set_fault_handler(&pdev->dev, g2d_iommu_fault_handler, g2d_dev);
+
ret = iovmm_activate(&pdev->dev);
if (ret < 0) {
dev_err(&pdev->dev, "Failed to activate iommu\n");