static irqreturn_t rotator_irq_handler(int irq, void *arg)
{
	struct rot_context *rot = arg;
	struct exynos_drm_ippdrv *ippdrv = &rot->ippdrv;
	enum rot_irq_status irq_status;

	/* Get execution result */
	irq_status = rotator_reg_get_irq_status(rot);
	rotator_reg_set_irq_status_clear(rot, irq_status);

	if (irq_status == ROT_IRQ_STATUS_COMPLETE) {
		struct drm_exynos_ipp_event_work *event_work;

		event_work = kzalloc(sizeof(*event_work), GFP_ATOMIC);
		if (!event_work) {
			DRM_ERROR("failed to alloc event_work.\n");
			return IRQ_HANDLED;
		}

		INIT_WORK((struct work_struct *)event_work,
			ippdrv->sched_event);
		event_work->ippdrv = ippdrv;
		event_work->buf_id[EXYNOS_DRM_OPS_DST] =
			rot->cur_buf_id[EXYNOS_DRM_OPS_DST];
		queue_work(ippdrv->event_workq,
			(struct work_struct *)event_work);
	} else {
		DRM_ERROR("the SFR is set illegally\n");
		rotator_reg_get_dump(rot);
	}

	return IRQ_HANDLED;
}
Пример #2
0
static irqreturn_t rotator_irq_handler(int irq, void *arg)
{
	struct rot_context *rot = arg;
	struct exynos_drm_ippdrv *ippdrv = &rot->ippdrv;
	enum rot_irq_status irq_status;

	/* Get execution result */
	irq_status = rotator_reg_get_irq_status(rot);
	rotator_reg_set_irq_status_clear(rot, irq_status);

	if (irq_status != ROT_IRQ_STATUS_COMPLETE) {
		DRM_ERROR("the SFR is set illegally\n");
		rotator_reg_get_dump(rot);
	}

	if (irq_status == ROT_IRQ_STATUS_COMPLETE)
		ipp_send_event_handler(ippdrv, 0);

	return IRQ_HANDLED;
}