From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Andrzej Hajda <a.hajda@samsung.com>, Inki Dae <inki.dae@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
dri-devel@lists.freedesktop.org,
open list <linux-kernel@vger.kernel.org>,
"moderated list:ARM/S5P EXYNOS AR..."
<linux-samsung-soc@vger.kernel.org>,
Joonyoung Shim <jy0922.shim@samsung.com>
Subject: Re: [PATCH v2 16/17] drm/exynos/ipp: remove file argument from node related functions
Date: Fri, 29 Aug 2014 16:03:23 +0900 [thread overview]
Message-ID: <540025BB.6070209@samsung.com> (raw)
In-Reply-To: <1409216861-12452-17-git-send-email-a.hajda@samsung.com>
Hi Andrzej,
On 08/28/2014 06:07 PM, Andrzej Hajda wrote:
> Since file pointer is preserved in c_node passing it
> as argument in node functions is redundant.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> drivers/gpu/drm/exynos/exynos_drm_ipp.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
> index 05f0f4e..fc8bb67 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
> @@ -529,7 +529,6 @@ static int ipp_put_mem_node(struct drm_device *drm_dev,
>
> static struct drm_exynos_ipp_mem_node
> *ipp_get_mem_node(struct drm_device *drm_dev,
> - struct drm_file *file,
> struct drm_exynos_ipp_cmd_node *c_node,
> struct drm_exynos_ipp_queue_buf *qbuf)
> {
> @@ -560,7 +559,7 @@ static struct drm_exynos_ipp_mem_node
> dma_addr_t *addr;
>
> addr = exynos_drm_gem_get_dma_addr(drm_dev,
> - qbuf->handle[i], file);
> + qbuf->handle[i], c_node->filp);
> if (IS_ERR(addr)) {
> DRM_ERROR("failed to get addr.\n");
> ipp_put_mem_node(drm_dev, c_node, m_node);
> @@ -606,7 +605,6 @@ static void ipp_free_event(struct drm_pending_event *event)
> }
>
> static int ipp_get_event(struct drm_device *drm_dev,
> - struct drm_file *file,
> struct drm_exynos_ipp_cmd_node *c_node,
> struct drm_exynos_ipp_queue_buf *qbuf)
> {
> @@ -618,7 +616,7 @@ static int ipp_get_event(struct drm_device *drm_dev,
> e = kzalloc(sizeof(*e), GFP_KERNEL);
> if (!e) {
> spin_lock_irqsave(&drm_dev->event_lock, flags);
> - file->event_space += sizeof(e->event);
> + c_node->filp->event_space += sizeof(e->event);
> spin_unlock_irqrestore(&drm_dev->event_lock, flags);
> return -ENOMEM;
> }
> @@ -630,7 +628,7 @@ static int ipp_get_event(struct drm_device *drm_dev,
> e->event.prop_id = qbuf->prop_id;
> e->event.buf_id[EXYNOS_DRM_OPS_DST] = qbuf->buf_id;
> e->base.event = &e->event.base;
> - e->base.file_priv = file;
> + e->base.file_priv = c_node->filp;
> e->base.destroy = ipp_free_event;
> mutex_lock(&c_node->event_lock);
> list_add_tail(&e->base.link, &c_node->event_list);
> @@ -899,7 +897,7 @@ int exynos_drm_ipp_queue_buf(struct drm_device *drm_dev, void *data,
> /* find command node */
> c_node = ipp_find_obj(&ctx->prop_idr, &ctx->prop_lock,
> qbuf->prop_id);
> - if (!c_node) {
> + if (!c_node || c_node->filp != file) {
I think this should go to patch 17.
Thanks.
> DRM_ERROR("failed to get command node.\n");
> return -ENODEV;
> }
> @@ -908,7 +906,7 @@ int exynos_drm_ipp_queue_buf(struct drm_device *drm_dev, void *data,
> switch (qbuf->buf_type) {
> case IPP_BUF_ENQUEUE:
> /* get memory node */
> - m_node = ipp_get_mem_node(drm_dev, file, c_node, qbuf);
> + m_node = ipp_get_mem_node(drm_dev, c_node, qbuf);
> if (IS_ERR(m_node)) {
> DRM_ERROR("failed to get m_node.\n");
> return PTR_ERR(m_node);
> @@ -921,7 +919,7 @@ int exynos_drm_ipp_queue_buf(struct drm_device *drm_dev, void *data,
> */
> if (qbuf->ops_id == EXYNOS_DRM_OPS_DST) {
> /* get event for destination buffer */
> - ret = ipp_get_event(drm_dev, file, c_node, qbuf);
> + ret = ipp_get_event(drm_dev, c_node, qbuf);
> if (ret) {
> DRM_ERROR("failed to get event.\n");
> goto err_clean_node;
>
next prev parent reply other threads:[~2014-08-29 7:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 9:07 [PATCH v2 00/17] drm/exynos/ipp: image post processing fixes and improvements, part four Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 01/17] drm/exynos/ipp: remove fake pm callbacks Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 02/17] drm/exynos/ipp: cancel works before command node clean Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 03/17] drm/exynos/ipp: move file reference from memory to command node Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 04/17] drm/exynos/ipp: remove only related commands on file close Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 05/17] drm/exynos/ipp: remove unused field in command node Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 06/17] drm/exynos/ipp: free partially allocated resources on error Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 07/17] drm/exynos/ipp: move nodes cleaning to separate function Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 08/17] drm/exynos/ipp: clean memory nodes on command node cleaning Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 09/17] drm/exynos/ipp: replace work_struct casting with better constructs Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 10/17] drm/exynos/ipp: stop hardware before freeing memory Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 11/17] drm/exynos/ipp: remove events during command cleaning Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 12/17] drm/exynos/fimc: avoid clearing overflow bits Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 13/17] drm/exynos/fimc: do not enable fimc twice Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 14/17] drm/exynos/fimc: simplify buffer queuing Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 15/17] drm/exynos/fimc: fix source buffer registers Andrzej Hajda
2014-08-28 9:07 ` [PATCH v2 16/17] drm/exynos/ipp: remove file argument from node related functions Andrzej Hajda
2014-08-29 7:03 ` Joonyoung Shim [this message]
2014-09-02 12:55 ` [PATCH v3 " Andrzej Hajda
2014-09-03 1:42 ` Joonyoung Shim
2014-08-28 9:07 ` [PATCH v2 17/17] drm/exynos/ipp: add file checks for ioctls Andrzej Hajda
2014-08-29 7:11 ` Joonyoung Shim
2014-09-02 12:56 ` [PATCH v3 " Andrzej Hajda
2014-09-11 12:50 ` [PATCH v2 00/17] drm/exynos/ipp: image post processing fixes and improvements, part four Inki Dae
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=540025BB.6070209@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=a.hajda@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=inki.dae@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sw0312.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox