* [PATCH 0/2] media: platform: rcar_jpu: code cleanup and release function changes
@ 2015-10-01 12:03 Mikhail Ulyanov
2015-10-01 12:03 ` [PATCH 1/2] V4L2: platform: rcar_jpu: remove redundant code Mikhail Ulyanov
2015-10-01 12:03 ` [PATCH 2/2] V4L2: platform: rcar_jpu: switch off clock on release later Mikhail Ulyanov
0 siblings, 2 replies; 3+ messages in thread
From: Mikhail Ulyanov @ 2015-10-01 12:03 UTC (permalink / raw)
To: hverkuil, horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
mchehab
Cc: laurent.pinchart, j.anaszewski, kamil, sergei.shtylyov,
devicetree, linux-media, linux-sh, Mikhail Ulyanov
This series of patches includes improvements and code cleanup for rcar_jpu driver.
Mikhail Ulyanov (2):
V4L2: platform: rcar_jpu: remove redundant code
V4L2: platform: rcar_jpu: switch off clock on release later
drivers/media/platform/rcar_jpu.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
--
2.5.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] V4L2: platform: rcar_jpu: remove redundant code
2015-10-01 12:03 [PATCH 0/2] media: platform: rcar_jpu: code cleanup and release function changes Mikhail Ulyanov
@ 2015-10-01 12:03 ` Mikhail Ulyanov
2015-10-01 12:03 ` [PATCH 2/2] V4L2: platform: rcar_jpu: switch off clock on release later Mikhail Ulyanov
1 sibling, 0 replies; 3+ messages in thread
From: Mikhail Ulyanov @ 2015-10-01 12:03 UTC (permalink / raw)
To: hverkuil, horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
mchehab
Cc: laurent.pinchart, j.anaszewski, kamil, sergei.shtylyov,
devicetree, linux-media, linux-sh, Mikhail Ulyanov
Remove redundant code. Following code line do what we want.
Signed-off-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
---
drivers/media/platform/rcar_jpu.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c
index 2973f07..039bbbc 100644
--- a/drivers/media/platform/rcar_jpu.c
+++ b/drivers/media/platform/rcar_jpu.c
@@ -1555,9 +1555,6 @@ static irqreturn_t jpu_irq_handler(int irq, void *dev_id)
dst_buf->v4l2_buf.timestamp = src_buf->v4l2_buf.timestamp;
if (src_buf->v4l2_buf.flags & V4L2_BUF_FLAG_TIMECODE)
dst_buf->v4l2_buf.timecode = src_buf->v4l2_buf.timecode;
- dst_buf->v4l2_buf.flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
- dst_buf->v4l2_buf.flags |= src_buf->v4l2_buf.flags &
- V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
dst_buf->v4l2_buf.flags = src_buf->v4l2_buf.flags &
(V4L2_BUF_FLAG_TIMECODE | V4L2_BUF_FLAG_KEYFRAME |
V4L2_BUF_FLAG_PFRAME | V4L2_BUF_FLAG_BFRAME |
--
2.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] V4L2: platform: rcar_jpu: switch off clock on release later
2015-10-01 12:03 [PATCH 0/2] media: platform: rcar_jpu: code cleanup and release function changes Mikhail Ulyanov
2015-10-01 12:03 ` [PATCH 1/2] V4L2: platform: rcar_jpu: remove redundant code Mikhail Ulyanov
@ 2015-10-01 12:03 ` Mikhail Ulyanov
1 sibling, 0 replies; 3+ messages in thread
From: Mikhail Ulyanov @ 2015-10-01 12:03 UTC (permalink / raw)
To: hverkuil, horms, magnus.damm, robh+dt, pawel.moll, mark.rutland,
mchehab
Cc: laurent.pinchart, j.anaszewski, kamil, sergei.shtylyov,
devicetree, linux-media, linux-sh, Mikhail Ulyanov
Give JPU peripheral chance to finish current job.
Don't switch off clock until context release.
Signed-off-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
---
drivers/media/platform/rcar_jpu.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c
index 039bbbc..aa327e6 100644
--- a/drivers/media/platform/rcar_jpu.c
+++ b/drivers/media/platform/rcar_jpu.c
@@ -1296,17 +1296,17 @@ static int jpu_release(struct file *file)
struct jpu *jpu = video_drvdata(file);
struct jpu_ctx *ctx = fh_to_ctx(file->private_data);
- mutex_lock(&jpu->mutex);
- if (--jpu->ref_count == 0)
- clk_disable_unprepare(jpu->clk);
- mutex_unlock(&jpu->mutex);
-
v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
v4l2_ctrl_handler_free(&ctx->ctrl_handler);
v4l2_fh_del(&ctx->fh);
v4l2_fh_exit(&ctx->fh);
kfree(ctx);
+ mutex_lock(&jpu->mutex);
+ if (--jpu->ref_count == 0)
+ clk_disable_unprepare(jpu->clk);
+ mutex_unlock(&jpu->mutex);
+
return 0;
}
--
2.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-01 12:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 12:03 [PATCH 0/2] media: platform: rcar_jpu: code cleanup and release function changes Mikhail Ulyanov
2015-10-01 12:03 ` [PATCH 1/2] V4L2: platform: rcar_jpu: remove redundant code Mikhail Ulyanov
2015-10-01 12:03 ` [PATCH 2/2] V4L2: platform: rcar_jpu: switch off clock on release later Mikhail Ulyanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).