diff options
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_ipp.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_ipp.c | 61 |
1 files changed, 39 insertions, 22 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c index 23226a0212e8..a1ee5416927d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c @@ -67,7 +67,7 @@ int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp, list_add_tail(&ipp->head, &ipp_list); ipp->id = num_ipp++; - DRM_DEBUG_DRIVER("Registered ipp %d\n", ipp->id); + DRM_DEV_DEBUG_DRIVER(dev->dev, "Registered ipp %d\n", ipp->id); return 0; } @@ -268,7 +268,7 @@ static inline struct exynos_drm_ipp_task * task->src.rect.h = task->dst.rect.h = UINT_MAX; task->transform.rotation = DRM_MODE_ROTATE_0; - DRM_DEBUG_DRIVER("Allocated task %pK\n", task); + DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Allocated task %pK\n", task); return task; } @@ -335,7 +335,9 @@ static int exynos_drm_ipp_task_set(struct exynos_drm_ipp_task *task, size -= map[i].size; } - DRM_DEBUG_DRIVER("Got task %pK configuration from userspace\n", task); + DRM_DEV_DEBUG_DRIVER(task->dev->dev, + "Got task %pK configuration from userspace\n", + task); return 0; } @@ -389,7 +391,7 @@ static void exynos_drm_ipp_task_release_buf(struct exynos_drm_ipp_buffer *buf) static void exynos_drm_ipp_task_free(struct exynos_drm_ipp *ipp, struct exynos_drm_ipp_task *task) { - DRM_DEBUG_DRIVER("Freeing task %pK\n", task); + DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Freeing task %pK\n", task); exynos_drm_ipp_task_release_buf(&task->src); exynos_drm_ipp_task_release_buf(&task->dst); @@ -553,8 +555,9 @@ static int exynos_drm_ipp_check_format(struct exynos_drm_ipp_task *task, buf == src ? DRM_EXYNOS_IPP_FORMAT_SOURCE : DRM_EXYNOS_IPP_FORMAT_DESTINATION); if (!fmt) { - DRM_DEBUG_DRIVER("Task %pK: %s format not supported\n", task, - buf == src ? "src" : "dst"); + DRM_DEV_DEBUG_DRIVER(task->dev->dev, + "Task %pK: %s format not supported\n", + task, buf == src ? "src" : "dst"); return -EINVAL; } @@ -603,7 +606,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) bool rotate = (rotation != DRM_MODE_ROTATE_0); bool scale = false; - DRM_DEBUG_DRIVER("Checking task %pK\n", task); + DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Checking task %pK\n", task); if (src->rect.w == UINT_MAX) src->rect.w = src->buf.width; @@ -618,8 +621,9 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) src->rect.y + src->rect.h > (src->buf.height) || dst->rect.x + dst->rect.w > (dst->buf.width) || dst->rect.y + dst->rect.h > (dst->buf.height)) { - DRM_DEBUG_DRIVER("Task %pK: defined area is outside provided buffers\n", - task); + DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, + "Task %pK: defined area is outside provided buffers\n", + task); return -EINVAL; } @@ -635,7 +639,8 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) (!(ipp->capabilities & DRM_EXYNOS_IPP_CAP_SCALE) && scale) || (!(ipp->capabilities & DRM_EXYNOS_IPP_CAP_CONVERT) && src->buf.fourcc != dst->buf.fourcc)) { - DRM_DEBUG_DRIVER("Task %pK: hw capabilities exceeded\n", task); + DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Task %pK: hw capabilities exceeded\n", + task); return -EINVAL; } @@ -647,7 +652,8 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) if (ret) return ret; - DRM_DEBUG_DRIVER("Task %pK: all checks done.\n", task); + DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Task %pK: all checks done.\n", + task); return ret; } @@ -658,20 +664,26 @@ static int exynos_drm_ipp_task_setup_buffers(struct exynos_drm_ipp_task *task, struct exynos_drm_ipp_buffer *src = &task->src, *dst = &task->dst; int ret = 0; - DRM_DEBUG_DRIVER("Setting buffer for task %pK\n", task); + DRM_DEV_DEBUG_DRIVER(task->dev->dev, "Setting buffer for task %pK\n", + task); ret = exynos_drm_ipp_task_setup_buffer(src, filp); if (ret) { - DRM_DEBUG_DRIVER("Task %pK: src buffer setup failed\n", task); + DRM_DEV_DEBUG_DRIVER(task->dev->dev, + "Task %pK: src buffer setup failed\n", + task); return ret; } ret = exynos_drm_ipp_task_setup_buffer(dst, filp); if (ret) { - DRM_DEBUG_DRIVER("Task %pK: dst buffer setup failed\n", task); + DRM_DEV_DEBUG_DRIVER(task->dev->dev, + "Task %pK: dst buffer setup failed\n", + task); return ret; } - DRM_DEBUG_DRIVER("Task %pK: buffers prepared.\n", task); + DRM_DEV_DEBUG_DRIVER(task->dev->dev, "Task %pK: buffers prepared.\n", + task); return ret; } @@ -749,7 +761,8 @@ void exynos_drm_ipp_task_done(struct exynos_drm_ipp_task *task, int ret) struct exynos_drm_ipp *ipp = task->ipp; unsigned long flags; - DRM_DEBUG_DRIVER("ipp: %d, task %pK done: %d\n", ipp->id, task, ret); + DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "ipp: %d, task %pK done: %d\n", + ipp->id, task, ret); spin_lock_irqsave(&ipp->lock, flags); if (ipp->task == task) @@ -773,7 +786,8 @@ static void exynos_drm_ipp_next_task(struct exynos_drm_ipp *ipp) unsigned long flags; int ret; - DRM_DEBUG_DRIVER("ipp: %d, try to run new task\n", ipp->id); + DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "ipp: %d, try to run new task\n", + ipp->id); spin_lock_irqsave(&ipp->lock, flags); @@ -789,7 +803,9 @@ static void exynos_drm_ipp_next_task(struct exynos_drm_ipp *ipp) spin_unlock_irqrestore(&ipp->lock, flags); - DRM_DEBUG_DRIVER("ipp: %d, selected task %pK to run\n", ipp->id, task); + DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, + "ipp: %d, selected task %pK to run\n", ipp->id, + task); ret = ipp->funcs->commit(ipp, task); if (ret) @@ -897,15 +913,16 @@ int exynos_drm_ipp_commit_ioctl(struct drm_device *dev, void *data, * then freed after exynos_drm_ipp_task_done() */ if (arg->flags & DRM_EXYNOS_IPP_FLAG_NONBLOCK) { - DRM_DEBUG_DRIVER("ipp: %d, nonblocking processing task %pK\n", - ipp->id, task); + DRM_DEV_DEBUG_DRIVER(dev->dev, + "ipp: %d, nonblocking processing task %pK\n", + ipp->id, task); task->flags |= DRM_EXYNOS_IPP_TASK_ASYNC; exynos_drm_ipp_schedule_task(task->ipp, task); ret = 0; } else { - DRM_DEBUG_DRIVER("ipp: %d, processing task %pK\n", ipp->id, - task); + DRM_DEV_DEBUG_DRIVER(dev->dev, "ipp: %d, processing task %pK\n", + ipp->id, task); exynos_drm_ipp_schedule_task(ipp, task); ret = wait_event_interruptible(ipp->done_wq, task->flags & DRM_EXYNOS_IPP_TASK_DONE); |