Пример #1
0
int __gsc_cap_pipeline_shutdown(struct gsc_dev *gsc)
{
	int ret = 0;

	if (gsc->pipeline.sensor && gsc->pipeline.flite)
		ret = gsc_cap_pipeline_s_power(gsc, 0);

	if (ret && ret != -ENXIO)
		gsc_set_cam_clock(gsc, false);

	return ret == -ENXIO ? 0 : ret;
}
Пример #2
0
static int __gsc_cap_pipeline_initialize(struct gsc_dev *gsc,
					 struct media_entity *me, bool prep)
{
	int ret = 0;

	if (prep)
		gsc_cap_pipeline_prepare(gsc, me);
	if ((!gsc->pipeline.sensor || !gsc->pipeline.flite) &&
			!gsc->pipeline.disp)
		return -EINVAL;

	gsc_set_cam_clock(gsc, true);

	if (gsc->pipeline.sensor && gsc->pipeline.flite)
		ret = gsc_cap_pipeline_s_power(gsc, 1);

	return ret;
}
Пример #3
0
int __gsc_cap_pipeline_shutdown(struct gsc_dev *gsc)
{
	struct exynos_md *mdev = gsc->mdev[MDEV_CAPTURE];
	int ret = 0;

	if (!mdev->is_flite_on && gsc->pipeline.sensor && gsc->pipeline.flite)
		ret = gsc_cap_pipeline_s_power(gsc, 0);

	if (ret && ret != -ENXIO)
		gsc_set_cam_clock(gsc, false);

	gsc->pipeline.sd_gsc= NULL;
	gsc->pipeline.disp= NULL;
	gsc->pipeline.flite = NULL;
	gsc->pipeline.csis = NULL;
	gsc->pipeline.sensor = NULL;

	return ret == -ENXIO ? 0 : ret;
}
Пример #4
0
static int __gsc_cap_pipeline_initialize(struct gsc_dev *gsc,
					 struct media_entity *me, bool prep)
{
	struct exynos_md *mdev = gsc->mdev[MDEV_CAPTURE];
	int ret = 0;

	if (prep) {
		gsc_cap_pipeline_prepare(gsc, me);
		if ((!gsc->pipeline.sensor || !gsc->pipeline.flite) &&
				!gsc->pipeline.disp)
			return -EINVAL;
	}

	gsc_set_cam_clock(gsc, true);

	if (!mdev->is_flite_on && gsc->pipeline.sensor && gsc->pipeline.flite)
		ret = gsc_cap_pipeline_s_power(gsc, 1);

	return ret;
}