History

[media] V4L2: platform: rcar_jpu: switch off clock on release later

Give JPU peripheral chance to finish current job. Don't switch off clock until context release.

Mikhail Ulyanov committed 11 years ago

Commit 886aa711 parent 69ca0331 file · +5 −5Browse files

Unified · Split

drivers/media/platform/rcar_jpu.c+5−5
@@ -1300,17 +1300,17 @@ static int jpu_release(struct file *file) · 1299 unmodified lines
1300 struct jpu *jpu = video_drvdata(file);1300 struct jpu *jpu = video_drvdata(file);
1301 struct jpu_ctx *ctx = fh_to_ctx(file->private_data);1301 struct jpu_ctx *ctx = fh_to_ctx(file->private_data);
1302 1302
1303 mutex_lock(&jpu->mutex);
1304 if (--jpu->ref_count == 0)
1305 clk_disable_unprepare(jpu->clk);
1306 mutex_unlock(&jpu->mutex);
1307
1308 v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);1303 v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
1309 v4l2_ctrl_handler_free(&ctx->ctrl_handler);1304 v4l2_ctrl_handler_free(&ctx->ctrl_handler);
1310 v4l2_fh_del(&ctx->fh);1305 v4l2_fh_del(&ctx->fh);
1311 v4l2_fh_exit(&ctx->fh);1306 v4l2_fh_exit(&ctx->fh);
1312 kfree(ctx);1307 kfree(ctx);
1313 1308
1309 mutex_lock(&jpu->mutex);
1310 if (--jpu->ref_count == 0)
1311 clk_disable_unprepare(jpu->clk);
1312 mutex_unlock(&jpu->mutex);
1313
1314 return 0;1314 return 0;
1315}1315}
1316 1316

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t