mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
media: rockchip: isp: fix open video during device register
Change-Id: I9569dd51b5237307ff48e3daf25bf0c97a5fbbb6 Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
parent
464f935a46
commit
d7fed91daa
|
|
@ -821,6 +821,9 @@ int rkisp_fh_open(struct file *filp)
|
|||
struct rkisp_stream *stream = video_drvdata(filp);
|
||||
int ret;
|
||||
|
||||
if (!stream->ispdev->is_probe_end)
|
||||
return -EINVAL;
|
||||
|
||||
ret = v4l2_fh_open(filp);
|
||||
if (!ret) {
|
||||
ret = v4l2_pipeline_pm_get(&stream->vnode.vdev.entity);
|
||||
|
|
|
|||
|
|
@ -919,6 +919,7 @@ static int rkisp_plat_probe(struct platform_device *pdev)
|
|||
mutex_lock(&rkisp_dev_mutex);
|
||||
list_add_tail(&isp_dev->list, &rkisp_device_list);
|
||||
mutex_unlock(&rkisp_dev_mutex);
|
||||
isp_dev->is_probe_end = true;
|
||||
return 0;
|
||||
|
||||
err_unreg_media_dev:
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@ struct rkisp_device {
|
|||
bool is_rdbk_auto;
|
||||
bool is_pre_on;
|
||||
bool is_first_double;
|
||||
bool is_probe_end;
|
||||
|
||||
struct rkisp_vicap_input vicap_in;
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,9 @@ static int rkisp_luma_fh_open(struct file *filp)
|
|||
struct rkisp_luma_vdev *params = video_drvdata(filp);
|
||||
int ret;
|
||||
|
||||
if (!params->dev->is_probe_end)
|
||||
return -EINVAL;
|
||||
|
||||
ret = v4l2_fh_open(filp);
|
||||
if (!ret) {
|
||||
ret = v4l2_pipeline_pm_get(¶ms->vnode.vdev.entity);
|
||||
|
|
|
|||
|
|
@ -260,6 +260,9 @@ static int rkisp_params_fh_open(struct file *filp)
|
|||
struct rkisp_isp_params_vdev *params = video_drvdata(filp);
|
||||
int ret;
|
||||
|
||||
if (!params->dev->is_probe_end)
|
||||
return -EINVAL;
|
||||
|
||||
ret = v4l2_fh_open(filp);
|
||||
if (!ret) {
|
||||
ret = v4l2_pipeline_pm_get(¶ms->vnode.vdev.entity);
|
||||
|
|
|
|||
|
|
@ -88,6 +88,9 @@ static int rkisp_stats_fh_open(struct file *filp)
|
|||
struct rkisp_isp_stats_vdev *stats = video_drvdata(filp);
|
||||
int ret;
|
||||
|
||||
if (!stats->dev->is_probe_end)
|
||||
return -EINVAL;
|
||||
|
||||
ret = v4l2_fh_open(filp);
|
||||
if (!ret) {
|
||||
ret = v4l2_pipeline_pm_get(&stats->vnode.vdev.entity);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user