Commit 8b955034 authored by Inki Dae's avatar Inki Dae

drm/ipp: clean up debug messages

Print out debug messages with correct device name.

As for this, this patch adds device pointer to exynos_drm_ipp structure,
and in case of exynos_drm_ipp_task structure, replace drm_device pointer
with device one. This will make each ipp driver to print out debug
messages with correct device name.
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent df90a64e
...@@ -1134,9 +1134,10 @@ static int fimc_bind(struct device *dev, struct device *master, void *data) ...@@ -1134,9 +1134,10 @@ static int fimc_bind(struct device *dev, struct device *master, void *data)
struct exynos_drm_ipp *ipp = &ctx->ipp; struct exynos_drm_ipp *ipp = &ctx->ipp;
ctx->drm_dev = drm_dev; ctx->drm_dev = drm_dev;
ipp->drm_dev = drm_dev;
exynos_drm_register_dma(drm_dev, dev); exynos_drm_register_dma(drm_dev, dev);
exynos_drm_ipp_register(drm_dev, ipp, &ipp_funcs, exynos_drm_ipp_register(dev, ipp, &ipp_funcs,
DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE | DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE |
DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT, DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT,
ctx->formats, ctx->num_formats, "fimc"); ctx->formats, ctx->num_formats, "fimc");
...@@ -1153,7 +1154,7 @@ static void fimc_unbind(struct device *dev, struct device *master, ...@@ -1153,7 +1154,7 @@ static void fimc_unbind(struct device *dev, struct device *master,
struct drm_device *drm_dev = data; struct drm_device *drm_dev = data;
struct exynos_drm_ipp *ipp = &ctx->ipp; struct exynos_drm_ipp *ipp = &ctx->ipp;
exynos_drm_ipp_unregister(drm_dev, ipp); exynos_drm_ipp_unregister(dev, ipp);
exynos_drm_unregister_dma(drm_dev, dev); exynos_drm_unregister_dma(drm_dev, dev);
} }
......
...@@ -1169,10 +1169,11 @@ static int gsc_bind(struct device *dev, struct device *master, void *data) ...@@ -1169,10 +1169,11 @@ static int gsc_bind(struct device *dev, struct device *master, void *data)
struct drm_device *drm_dev = data; struct drm_device *drm_dev = data;
struct exynos_drm_ipp *ipp = &ctx->ipp; struct exynos_drm_ipp *ipp = &ctx->ipp;
ctx->drm_dev = drm_dev;
ctx->drm_dev = drm_dev; ctx->drm_dev = drm_dev;
exynos_drm_register_dma(drm_dev, dev); exynos_drm_register_dma(drm_dev, dev);
exynos_drm_ipp_register(drm_dev, ipp, &ipp_funcs, exynos_drm_ipp_register(dev, ipp, &ipp_funcs,
DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE | DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE |
DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT, DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT,
ctx->formats, ctx->num_formats, "gsc"); ctx->formats, ctx->num_formats, "gsc");
...@@ -1189,7 +1190,7 @@ static void gsc_unbind(struct device *dev, struct device *master, ...@@ -1189,7 +1190,7 @@ static void gsc_unbind(struct device *dev, struct device *master,
struct drm_device *drm_dev = data; struct drm_device *drm_dev = data;
struct exynos_drm_ipp *ipp = &ctx->ipp; struct exynos_drm_ipp *ipp = &ctx->ipp;
exynos_drm_ipp_unregister(drm_dev, ipp); exynos_drm_ipp_unregister(dev, ipp);
exynos_drm_unregister_dma(drm_dev, dev); exynos_drm_unregister_dma(drm_dev, dev);
} }
......
...@@ -43,7 +43,7 @@ static LIST_HEAD(ipp_list); ...@@ -43,7 +43,7 @@ static LIST_HEAD(ipp_list);
* Returns: * Returns:
* Zero on success, error code on failure. * Zero on success, error code on failure.
*/ */
int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp, int exynos_drm_ipp_register(struct device *dev, struct exynos_drm_ipp *ipp,
const struct exynos_drm_ipp_funcs *funcs, unsigned int caps, const struct exynos_drm_ipp_funcs *funcs, unsigned int caps,
const struct exynos_drm_ipp_formats *formats, const struct exynos_drm_ipp_formats *formats,
unsigned int num_formats, const char *name) unsigned int num_formats, const char *name)
...@@ -67,7 +67,7 @@ int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp, ...@@ -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); list_add_tail(&ipp->head, &ipp_list);
ipp->id = num_ipp++; ipp->id = num_ipp++;
DRM_DEV_DEBUG_DRIVER(dev->dev, "Registered ipp %d\n", ipp->id); DRM_DEV_DEBUG_DRIVER(dev, "Registered ipp %d\n", ipp->id);
return 0; return 0;
} }
...@@ -77,7 +77,7 @@ int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp, ...@@ -77,7 +77,7 @@ int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp,
* @dev: DRM device * @dev: DRM device
* @ipp: ipp module * @ipp: ipp module
*/ */
void exynos_drm_ipp_unregister(struct drm_device *dev, void exynos_drm_ipp_unregister(struct device *dev,
struct exynos_drm_ipp *ipp) struct exynos_drm_ipp *ipp)
{ {
WARN_ON(ipp->task); WARN_ON(ipp->task);
...@@ -268,7 +268,7 @@ static inline struct exynos_drm_ipp_task * ...@@ -268,7 +268,7 @@ static inline struct exynos_drm_ipp_task *
task->src.rect.h = task->dst.rect.h = UINT_MAX; task->src.rect.h = task->dst.rect.h = UINT_MAX;
task->transform.rotation = DRM_MODE_ROTATE_0; task->transform.rotation = DRM_MODE_ROTATE_0;
DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Allocated task %pK\n", task); DRM_DEV_DEBUG_DRIVER(task->dev, "Allocated task %pK\n", task);
return task; return task;
} }
...@@ -335,7 +335,7 @@ static int exynos_drm_ipp_task_set(struct exynos_drm_ipp_task *task, ...@@ -335,7 +335,7 @@ static int exynos_drm_ipp_task_set(struct exynos_drm_ipp_task *task,
size -= map[i].size; size -= map[i].size;
} }
DRM_DEV_DEBUG_DRIVER(task->dev->dev, DRM_DEV_DEBUG_DRIVER(task->dev,
"Got task %pK configuration from userspace\n", "Got task %pK configuration from userspace\n",
task); task);
return 0; return 0;
...@@ -391,12 +391,12 @@ static void exynos_drm_ipp_task_release_buf(struct exynos_drm_ipp_buffer *buf) ...@@ -391,12 +391,12 @@ 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, static void exynos_drm_ipp_task_free(struct exynos_drm_ipp *ipp,
struct exynos_drm_ipp_task *task) struct exynos_drm_ipp_task *task)
{ {
DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Freeing task %pK\n", task); DRM_DEV_DEBUG_DRIVER(task->dev, "Freeing task %pK\n", task);
exynos_drm_ipp_task_release_buf(&task->src); exynos_drm_ipp_task_release_buf(&task->src);
exynos_drm_ipp_task_release_buf(&task->dst); exynos_drm_ipp_task_release_buf(&task->dst);
if (task->event) if (task->event)
drm_event_cancel_free(ipp->dev, &task->event->base); drm_event_cancel_free(ipp->drm_dev, &task->event->base);
kfree(task); kfree(task);
} }
...@@ -555,7 +555,7 @@ static int exynos_drm_ipp_check_format(struct exynos_drm_ipp_task *task, ...@@ -555,7 +555,7 @@ static int exynos_drm_ipp_check_format(struct exynos_drm_ipp_task *task,
buf == src ? DRM_EXYNOS_IPP_FORMAT_SOURCE : buf == src ? DRM_EXYNOS_IPP_FORMAT_SOURCE :
DRM_EXYNOS_IPP_FORMAT_DESTINATION); DRM_EXYNOS_IPP_FORMAT_DESTINATION);
if (!fmt) { if (!fmt) {
DRM_DEV_DEBUG_DRIVER(task->dev->dev, DRM_DEV_DEBUG_DRIVER(task->dev,
"Task %pK: %s format not supported\n", "Task %pK: %s format not supported\n",
task, buf == src ? "src" : "dst"); task, buf == src ? "src" : "dst");
return -EINVAL; return -EINVAL;
...@@ -606,7 +606,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) ...@@ -606,7 +606,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task)
bool rotate = (rotation != DRM_MODE_ROTATE_0); bool rotate = (rotation != DRM_MODE_ROTATE_0);
bool scale = false; bool scale = false;
DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Checking task %pK\n", task); DRM_DEV_DEBUG_DRIVER(task->dev, "Checking task %pK\n", task);
if (src->rect.w == UINT_MAX) if (src->rect.w == UINT_MAX)
src->rect.w = src->buf.width; src->rect.w = src->buf.width;
...@@ -621,7 +621,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) ...@@ -621,7 +621,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task)
src->rect.y + src->rect.h > (src->buf.height) || src->rect.y + src->rect.h > (src->buf.height) ||
dst->rect.x + dst->rect.w > (dst->buf.width) || dst->rect.x + dst->rect.w > (dst->buf.width) ||
dst->rect.y + dst->rect.h > (dst->buf.height)) { dst->rect.y + dst->rect.h > (dst->buf.height)) {
DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, DRM_DEV_DEBUG_DRIVER(task->dev,
"Task %pK: defined area is outside provided buffers\n", "Task %pK: defined area is outside provided buffers\n",
task); task);
return -EINVAL; return -EINVAL;
...@@ -639,7 +639,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) ...@@ -639,7 +639,7 @@ 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_SCALE) && scale) ||
(!(ipp->capabilities & DRM_EXYNOS_IPP_CAP_CONVERT) && (!(ipp->capabilities & DRM_EXYNOS_IPP_CAP_CONVERT) &&
src->buf.fourcc != dst->buf.fourcc)) { src->buf.fourcc != dst->buf.fourcc)) {
DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Task %pK: hw capabilities exceeded\n", DRM_DEV_DEBUG_DRIVER(task->dev, "Task %pK: hw capabilities exceeded\n",
task); task);
return -EINVAL; return -EINVAL;
} }
...@@ -652,7 +652,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task) ...@@ -652,7 +652,7 @@ static int exynos_drm_ipp_task_check(struct exynos_drm_ipp_task *task)
if (ret) if (ret)
return ret; return ret;
DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "Task %pK: all checks done.\n", DRM_DEV_DEBUG_DRIVER(ipp->dev, "Task %pK: all checks done.\n",
task); task);
return ret; return ret;
...@@ -664,25 +664,25 @@ static int exynos_drm_ipp_task_setup_buffers(struct exynos_drm_ipp_task *task, ...@@ -664,25 +664,25 @@ 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; struct exynos_drm_ipp_buffer *src = &task->src, *dst = &task->dst;
int ret = 0; int ret = 0;
DRM_DEV_DEBUG_DRIVER(task->dev->dev, "Setting buffer for task %pK\n", DRM_DEV_DEBUG_DRIVER(task->dev, "Setting buffer for task %pK\n",
task); task);
ret = exynos_drm_ipp_task_setup_buffer(src, filp); ret = exynos_drm_ipp_task_setup_buffer(src, filp);
if (ret) { if (ret) {
DRM_DEV_DEBUG_DRIVER(task->dev->dev, DRM_DEV_DEBUG_DRIVER(task->dev,
"Task %pK: src buffer setup failed\n", "Task %pK: src buffer setup failed\n",
task); task);
return ret; return ret;
} }
ret = exynos_drm_ipp_task_setup_buffer(dst, filp); ret = exynos_drm_ipp_task_setup_buffer(dst, filp);
if (ret) { if (ret) {
DRM_DEV_DEBUG_DRIVER(task->dev->dev, DRM_DEV_DEBUG_DRIVER(task->dev,
"Task %pK: dst buffer setup failed\n", "Task %pK: dst buffer setup failed\n",
task); task);
return ret; return ret;
} }
DRM_DEV_DEBUG_DRIVER(task->dev->dev, "Task %pK: buffers prepared.\n", DRM_DEV_DEBUG_DRIVER(task->dev, "Task %pK: buffers prepared.\n",
task); task);
return ret; return ret;
...@@ -703,7 +703,7 @@ static int exynos_drm_ipp_event_create(struct exynos_drm_ipp_task *task, ...@@ -703,7 +703,7 @@ static int exynos_drm_ipp_event_create(struct exynos_drm_ipp_task *task,
e->event.base.length = sizeof(e->event); e->event.base.length = sizeof(e->event);
e->event.user_data = user_data; e->event.user_data = user_data;
ret = drm_event_reserve_init(task->dev, file_priv, &e->base, ret = drm_event_reserve_init(task->ipp->drm_dev, file_priv, &e->base,
&e->event.base); &e->event.base);
if (ret) if (ret)
goto free; goto free;
...@@ -724,7 +724,7 @@ static void exynos_drm_ipp_event_send(struct exynos_drm_ipp_task *task) ...@@ -724,7 +724,7 @@ static void exynos_drm_ipp_event_send(struct exynos_drm_ipp_task *task)
task->event->event.tv_usec = now.tv_nsec / NSEC_PER_USEC; task->event->event.tv_usec = now.tv_nsec / NSEC_PER_USEC;
task->event->event.sequence = atomic_inc_return(&task->ipp->sequence); task->event->event.sequence = atomic_inc_return(&task->ipp->sequence);
drm_send_event(task->dev, &task->event->base); drm_send_event(task->ipp->drm_dev, &task->event->base);
} }
static int exynos_drm_ipp_task_cleanup(struct exynos_drm_ipp_task *task) static int exynos_drm_ipp_task_cleanup(struct exynos_drm_ipp_task *task)
...@@ -761,7 +761,7 @@ void exynos_drm_ipp_task_done(struct exynos_drm_ipp_task *task, int ret) ...@@ -761,7 +761,7 @@ void exynos_drm_ipp_task_done(struct exynos_drm_ipp_task *task, int ret)
struct exynos_drm_ipp *ipp = task->ipp; struct exynos_drm_ipp *ipp = task->ipp;
unsigned long flags; unsigned long flags;
DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "ipp: %d, task %pK done: %d\n", DRM_DEV_DEBUG_DRIVER(task->dev, "ipp: %d, task %pK done: %d\n",
ipp->id, task, ret); ipp->id, task, ret);
spin_lock_irqsave(&ipp->lock, flags); spin_lock_irqsave(&ipp->lock, flags);
...@@ -786,7 +786,7 @@ static void exynos_drm_ipp_next_task(struct exynos_drm_ipp *ipp) ...@@ -786,7 +786,7 @@ static void exynos_drm_ipp_next_task(struct exynos_drm_ipp *ipp)
unsigned long flags; unsigned long flags;
int ret; int ret;
DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, "ipp: %d, try to run new task\n", DRM_DEV_DEBUG_DRIVER(ipp->dev, "ipp: %d, try to run new task\n",
ipp->id); ipp->id);
spin_lock_irqsave(&ipp->lock, flags); spin_lock_irqsave(&ipp->lock, flags);
...@@ -803,7 +803,7 @@ static void exynos_drm_ipp_next_task(struct exynos_drm_ipp *ipp) ...@@ -803,7 +803,7 @@ static void exynos_drm_ipp_next_task(struct exynos_drm_ipp *ipp)
spin_unlock_irqrestore(&ipp->lock, flags); spin_unlock_irqrestore(&ipp->lock, flags);
DRM_DEV_DEBUG_DRIVER(ipp->dev->dev, DRM_DEV_DEBUG_DRIVER(ipp->dev,
"ipp: %d, selected task %pK to run\n", ipp->id, "ipp: %d, selected task %pK to run\n", ipp->id,
task); task);
...@@ -913,7 +913,7 @@ int exynos_drm_ipp_commit_ioctl(struct drm_device *dev, void *data, ...@@ -913,7 +913,7 @@ int exynos_drm_ipp_commit_ioctl(struct drm_device *dev, void *data,
* then freed after exynos_drm_ipp_task_done() * then freed after exynos_drm_ipp_task_done()
*/ */
if (arg->flags & DRM_EXYNOS_IPP_FLAG_NONBLOCK) { if (arg->flags & DRM_EXYNOS_IPP_FLAG_NONBLOCK) {
DRM_DEV_DEBUG_DRIVER(dev->dev, DRM_DEV_DEBUG_DRIVER(ipp->dev,
"ipp: %d, nonblocking processing task %pK\n", "ipp: %d, nonblocking processing task %pK\n",
ipp->id, task); ipp->id, task);
...@@ -921,7 +921,7 @@ int exynos_drm_ipp_commit_ioctl(struct drm_device *dev, void *data, ...@@ -921,7 +921,7 @@ int exynos_drm_ipp_commit_ioctl(struct drm_device *dev, void *data,
exynos_drm_ipp_schedule_task(task->ipp, task); exynos_drm_ipp_schedule_task(task->ipp, task);
ret = 0; ret = 0;
} else { } else {
DRM_DEV_DEBUG_DRIVER(dev->dev, "ipp: %d, processing task %pK\n", DRM_DEV_DEBUG_DRIVER(ipp->dev, "ipp: %d, processing task %pK\n",
ipp->id, task); ipp->id, task);
exynos_drm_ipp_schedule_task(ipp, task); exynos_drm_ipp_schedule_task(ipp, task);
ret = wait_event_interruptible(ipp->done_wq, ret = wait_event_interruptible(ipp->done_wq,
......
...@@ -54,7 +54,8 @@ struct exynos_drm_ipp_funcs { ...@@ -54,7 +54,8 @@ struct exynos_drm_ipp_funcs {
* struct exynos_drm_ipp - central picture processor module structure * struct exynos_drm_ipp - central picture processor module structure
*/ */
struct exynos_drm_ipp { struct exynos_drm_ipp {
struct drm_device *dev; struct drm_device *drm_dev;
struct device *dev;
struct list_head head; struct list_head head;
unsigned int id; unsigned int id;
...@@ -85,7 +86,7 @@ struct exynos_drm_ipp_buffer { ...@@ -85,7 +86,7 @@ struct exynos_drm_ipp_buffer {
* has to be performed by the picture processor hardware module * has to be performed by the picture processor hardware module
*/ */
struct exynos_drm_ipp_task { struct exynos_drm_ipp_task {
struct drm_device *dev; struct device *dev;
struct exynos_drm_ipp *ipp; struct exynos_drm_ipp *ipp;
struct list_head head; struct list_head head;
...@@ -129,11 +130,11 @@ struct exynos_drm_ipp_formats { ...@@ -129,11 +130,11 @@ struct exynos_drm_ipp_formats {
#define IPP_SCALE_LIMIT(val...) \ #define IPP_SCALE_LIMIT(val...) \
.type = (DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE), val .type = (DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE), val
int exynos_drm_ipp_register(struct drm_device *dev, struct exynos_drm_ipp *ipp, int exynos_drm_ipp_register(struct device *dev, struct exynos_drm_ipp *ipp,
const struct exynos_drm_ipp_funcs *funcs, unsigned int caps, const struct exynos_drm_ipp_funcs *funcs, unsigned int caps,
const struct exynos_drm_ipp_formats *formats, const struct exynos_drm_ipp_formats *formats,
unsigned int num_formats, const char *name); unsigned int num_formats, const char *name);
void exynos_drm_ipp_unregister(struct drm_device *dev, void exynos_drm_ipp_unregister(struct device *dev,
struct exynos_drm_ipp *ipp); struct exynos_drm_ipp *ipp);
void exynos_drm_ipp_task_done(struct exynos_drm_ipp_task *task, int ret); void exynos_drm_ipp_task_done(struct exynos_drm_ipp_task *task, int ret);
......
...@@ -243,9 +243,10 @@ static int rotator_bind(struct device *dev, struct device *master, void *data) ...@@ -243,9 +243,10 @@ static int rotator_bind(struct device *dev, struct device *master, void *data)
struct exynos_drm_ipp *ipp = &rot->ipp; struct exynos_drm_ipp *ipp = &rot->ipp;
rot->drm_dev = drm_dev; rot->drm_dev = drm_dev;
ipp->drm_dev = drm_dev;
exynos_drm_register_dma(drm_dev, dev); exynos_drm_register_dma(drm_dev, dev);
exynos_drm_ipp_register(drm_dev, ipp, &ipp_funcs, exynos_drm_ipp_register(dev, ipp, &ipp_funcs,
DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE, DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE,
rot->formats, rot->num_formats, "rotator"); rot->formats, rot->num_formats, "rotator");
...@@ -258,10 +259,9 @@ static void rotator_unbind(struct device *dev, struct device *master, ...@@ -258,10 +259,9 @@ static void rotator_unbind(struct device *dev, struct device *master,
void *data) void *data)
{ {
struct rot_context *rot = dev_get_drvdata(dev); struct rot_context *rot = dev_get_drvdata(dev);
struct drm_device *drm_dev = data;
struct exynos_drm_ipp *ipp = &rot->ipp; struct exynos_drm_ipp *ipp = &rot->ipp;
exynos_drm_ipp_unregister(drm_dev, ipp); exynos_drm_ipp_unregister(dev, ipp);
exynos_drm_unregister_dma(rot->drm_dev, rot->dev); exynos_drm_unregister_dma(rot->drm_dev, rot->dev);
} }
......
...@@ -451,9 +451,10 @@ static int scaler_bind(struct device *dev, struct device *master, void *data) ...@@ -451,9 +451,10 @@ static int scaler_bind(struct device *dev, struct device *master, void *data)
struct exynos_drm_ipp *ipp = &scaler->ipp; struct exynos_drm_ipp *ipp = &scaler->ipp;
scaler->drm_dev = drm_dev; scaler->drm_dev = drm_dev;
ipp->drm_dev = drm_dev;
exynos_drm_register_dma(drm_dev, dev); exynos_drm_register_dma(drm_dev, dev);
exynos_drm_ipp_register(drm_dev, ipp, &ipp_funcs, exynos_drm_ipp_register(dev, ipp, &ipp_funcs,
DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE | DRM_EXYNOS_IPP_CAP_CROP | DRM_EXYNOS_IPP_CAP_ROTATE |
DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT, DRM_EXYNOS_IPP_CAP_SCALE | DRM_EXYNOS_IPP_CAP_CONVERT,
scaler->scaler_data->formats, scaler->scaler_data->formats,
...@@ -468,10 +469,9 @@ static void scaler_unbind(struct device *dev, struct device *master, ...@@ -468,10 +469,9 @@ static void scaler_unbind(struct device *dev, struct device *master,
void *data) void *data)
{ {
struct scaler_context *scaler = dev_get_drvdata(dev); struct scaler_context *scaler = dev_get_drvdata(dev);
struct drm_device *drm_dev = data;
struct exynos_drm_ipp *ipp = &scaler->ipp; struct exynos_drm_ipp *ipp = &scaler->ipp;
exynos_drm_ipp_unregister(drm_dev, ipp); exynos_drm_ipp_unregister(dev, ipp);
exynos_drm_unregister_dma(scaler->drm_dev, scaler->dev); exynos_drm_unregister_dma(scaler->drm_dev, scaler->dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment