aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2014-08-28 05:07:27 -0400
committerInki Dae <daeinki@gmail.com>2014-09-19 11:56:10 -0400
commit945a0aad96d91ccb14b033cfe757994afb86bbc0 (patch)
tree545883d5e54cf9383f06d4c5cbf2b195ed3fbae6
parent6f7d48ea6541ac8c1000b7515c9fc458ba3d0f21 (diff)
drm/exynos/ipp: move file reference from memory to command node
Command node should contain file reference to distinguish commands created by different processes. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_ipp.c5
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_ipp.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index 97709664b7c2..bbe99689d1dd 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -75,7 +75,6 @@ struct drm_exynos_ipp_mem_node {
75 u32 prop_id; 75 u32 prop_id;
76 u32 buf_id; 76 u32 buf_id;
77 struct drm_exynos_ipp_buf_info buf_info; 77 struct drm_exynos_ipp_buf_info buf_info;
78 struct drm_file *filp;
79}; 78};
80 79
81/* 80/*
@@ -448,6 +447,7 @@ int exynos_drm_ipp_set_property(struct drm_device *drm_dev, void *data,
448 c_node->dev = dev; 447 c_node->dev = dev;
449 c_node->property = *property; 448 c_node->property = *property;
450 c_node->state = IPP_STATE_IDLE; 449 c_node->state = IPP_STATE_IDLE;
450 c_node->filp = file;
451 451
452 c_node->start_work = ipp_create_cmd_work(); 452 c_node->start_work = ipp_create_cmd_work();
453 if (IS_ERR(c_node->start_work)) { 453 if (IS_ERR(c_node->start_work)) {
@@ -645,7 +645,6 @@ static struct drm_exynos_ipp_mem_node
645 } 645 }
646 } 646 }
647 647
648 m_node->filp = file;
649 mutex_lock(&c_node->mem_lock); 648 mutex_lock(&c_node->mem_lock);
650 list_add_tail(&m_node->list, &c_node->mem_list[qbuf->ops_id]); 649 list_add_tail(&m_node->list, &c_node->mem_list[qbuf->ops_id]);
651 mutex_unlock(&c_node->mem_lock); 650 mutex_unlock(&c_node->mem_lock);
@@ -677,7 +676,7 @@ static int ipp_put_mem_node(struct drm_device *drm_dev,
677 unsigned long handle = m_node->buf_info.handles[i]; 676 unsigned long handle = m_node->buf_info.handles[i];
678 if (handle) 677 if (handle)
679 exynos_drm_gem_put_dma_addr(drm_dev, handle, 678 exynos_drm_gem_put_dma_addr(drm_dev, handle,
680 m_node->filp); 679 c_node->filp);
681 } 680 }
682 681
683 /* delete list in queue */ 682 /* delete list in queue */
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.h b/drivers/gpu/drm/exynos/exynos_drm_ipp.h
index 6f48d62aeb30..03110359dbdb 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.h
@@ -62,6 +62,7 @@ struct drm_exynos_ipp_cmd_work {
62 * @stop_work: stop command work structure. 62 * @stop_work: stop command work structure.
63 * @event_work: event work structure. 63 * @event_work: event work structure.
64 * @state: state of command node. 64 * @state: state of command node.
65 * @filp: associated file pointer.
65 */ 66 */
66struct drm_exynos_ipp_cmd_node { 67struct drm_exynos_ipp_cmd_node {
67 struct device *dev; 68 struct device *dev;
@@ -78,6 +79,7 @@ struct drm_exynos_ipp_cmd_node {
78 struct drm_exynos_ipp_cmd_work *stop_work; 79 struct drm_exynos_ipp_cmd_work *stop_work;
79 struct drm_exynos_ipp_event_work *event_work; 80 struct drm_exynos_ipp_event_work *event_work;
80 enum drm_exynos_ipp_state state; 81 enum drm_exynos_ipp_state state;
82 struct drm_file *filp;
81}; 83};
82 84
83/* 85/*