Lines Matching refs:ssd
1212 struct smiapp_subdev *ssd = to_smiapp_subdev(subdev); in smiapp_power_on() local
1218 container_of(ssd, struct smiapp_sensor, ssds[0]); in smiapp_power_on()
1362 struct smiapp_subdev *ssd = to_smiapp_subdev(subdev); in smiapp_power_off() local
1364 container_of(ssd, struct smiapp_sensor, ssds[0]); in smiapp_power_off()
1637 struct smiapp_subdev *ssd = to_smiapp_subdev(subdev); in __smiapp_get_format() local
1645 if (fmt->pad == ssd->source_pad) in __smiapp_get_format()
1646 r = &ssd->crop[ssd->source_pad]; in __smiapp_get_format()
1648 r = &ssd->sink_fmt; in __smiapp_get_format()
1678 struct smiapp_subdev *ssd = to_smiapp_subdev(subdev); in smiapp_get_crop_compose() local
1684 crops[i] = &ssd->crop[i]; in smiapp_get_crop_compose()
1686 *comps = &ssd->compose; in smiapp_get_crop_compose()
1708 struct smiapp_subdev *ssd = to_smiapp_subdev(subdev); in smiapp_propagate() local
1718 if (ssd == sensor->scaler) { in smiapp_propagate()
1724 } else if (ssd == sensor->binner) { in smiapp_propagate()
1810 struct smiapp_subdev *ssd = to_smiapp_subdev(subdev); in smiapp_set_format() local
1815 if (fmt->pad == ssd->source_pad) { in smiapp_set_format()
1842 crops[ssd->sink_pad]->left = 0; in smiapp_set_format()
1843 crops[ssd->sink_pad]->top = 0; in smiapp_set_format()
1844 crops[ssd->sink_pad]->width = fmt->format.width; in smiapp_set_format()
1845 crops[ssd->sink_pad]->height = fmt->format.height; in smiapp_set_format()
1847 ssd->sink_fmt = *crops[ssd->sink_pad]; in smiapp_set_format()
2069 struct smiapp_subdev *ssd = to_smiapp_subdev(subdev); in smiapp_set_compose() local
2077 if (ssd == sensor->binner) in smiapp_set_compose()
2095 struct smiapp_subdev *ssd = to_smiapp_subdev(subdev); in __smiapp_sel_supported() local
2101 if (ssd == sensor->pixel_array in __smiapp_sel_supported()
2104 if (ssd == sensor->src in __smiapp_sel_supported()
2107 if (ssd == sensor->scaler in __smiapp_sel_supported()
2114 if (ssd == sensor->pixel_array in __smiapp_sel_supported()
2120 if (sel->pad == ssd->source_pad) in __smiapp_sel_supported()
2122 if (ssd == sensor->binner) in __smiapp_sel_supported()
2124 if (ssd == sensor->scaler in __smiapp_sel_supported()
2139 struct smiapp_subdev *ssd = to_smiapp_subdev(subdev); in smiapp_set_crop() local
2146 if (sel->pad == ssd->sink_pad) in smiapp_set_crop()
2147 src_size = &ssd->sink_fmt; in smiapp_set_crop()
2149 src_size = &ssd->compose; in smiapp_set_crop()
2151 if (sel->pad == ssd->sink_pad) { in smiapp_set_crop()
2161 subdev, cfg, ssd->sink_pad); in smiapp_set_crop()
2165 if (ssd == sensor->src && sel->pad == SMIAPP_PAD_SRC) { in smiapp_set_crop()
2178 if (ssd != sensor->pixel_array && sel->pad == SMIAPP_PAD_SINK) in smiapp_set_crop()
2185 static void smiapp_get_native_size(struct smiapp_subdev *ssd, in smiapp_get_native_size() argument
2190 r->width = ssd->sensor->limits[SMIAPP_LIMIT_X_ADDR_MAX] + 1; in smiapp_get_native_size()
2191 r->height = ssd->sensor->limits[SMIAPP_LIMIT_Y_ADDR_MAX] + 1; in smiapp_get_native_size()
2199 struct smiapp_subdev *ssd = to_smiapp_subdev(subdev); in __smiapp_get_selection() local
2211 sink_fmt = ssd->sink_fmt; in __smiapp_get_selection()
2214 v4l2_subdev_get_try_format(subdev, cfg, ssd->sink_pad); in __smiapp_get_selection()
2225 if (ssd == sensor->pixel_array) in __smiapp_get_selection()
2226 smiapp_get_native_size(ssd, &sel->r); in __smiapp_get_selection()
2227 else if (sel->pad == ssd->sink_pad) in __smiapp_get_selection()
2515 struct smiapp_subdev *ssd, in smiapp_register_subdev() argument
2525 rval = media_entity_pads_init(&ssd->sd.entity, in smiapp_register_subdev()
2526 ssd->npads, ssd->pads); in smiapp_register_subdev()
2534 &ssd->sd); in smiapp_register_subdev()
2541 rval = media_create_pad_link(&ssd->sd.entity, source_pad, in smiapp_register_subdev()
2547 v4l2_device_unregister_subdev(&ssd->sd); in smiapp_register_subdev()
2603 struct smiapp_subdev *ssd, const char *name, in smiapp_create_subdev() argument
2608 if (!ssd) in smiapp_create_subdev()
2611 if (ssd != sensor->src) in smiapp_create_subdev()
2612 v4l2_subdev_init(&ssd->sd, &smiapp_ops); in smiapp_create_subdev()
2614 ssd->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; in smiapp_create_subdev()
2615 ssd->sensor = sensor; in smiapp_create_subdev()
2617 ssd->npads = num_pads; in smiapp_create_subdev()
2618 ssd->source_pad = num_pads - 1; in smiapp_create_subdev()
2620 snprintf(ssd->sd.name, in smiapp_create_subdev()
2621 sizeof(ssd->sd.name), "%s %s %d-%4.4x", sensor->minfo.name, in smiapp_create_subdev()
2624 smiapp_get_native_size(ssd, &ssd->sink_fmt); in smiapp_create_subdev()
2626 ssd->compose.width = ssd->sink_fmt.width; in smiapp_create_subdev()
2627 ssd->compose.height = ssd->sink_fmt.height; in smiapp_create_subdev()
2628 ssd->crop[ssd->source_pad] = ssd->compose; in smiapp_create_subdev()
2629 ssd->pads[ssd->source_pad].flags = MEDIA_PAD_FL_SOURCE; in smiapp_create_subdev()
2630 if (ssd != sensor->pixel_array) { in smiapp_create_subdev()
2631 ssd->crop[ssd->sink_pad] = ssd->compose; in smiapp_create_subdev()
2632 ssd->pads[ssd->sink_pad].flags = MEDIA_PAD_FL_SINK; in smiapp_create_subdev()
2635 ssd->sd.entity.ops = &smiapp_entity_ops; in smiapp_create_subdev()
2637 if (ssd == sensor->src) in smiapp_create_subdev()
2640 ssd->sd.internal_ops = &smiapp_internal_ops; in smiapp_create_subdev()
2641 ssd->sd.owner = THIS_MODULE; in smiapp_create_subdev()
2642 ssd->sd.dev = &client->dev; in smiapp_create_subdev()
2643 v4l2_set_subdevdata(&ssd->sd, client); in smiapp_create_subdev()
2648 struct smiapp_subdev *ssd = to_smiapp_subdev(sd); in smiapp_open() local
2649 struct smiapp_sensor *sensor = ssd->sensor; in smiapp_open()
2654 for (i = 0; i < ssd->npads; i++) { in smiapp_open()
2661 smiapp_get_native_size(ssd, try_crop); in smiapp_open()
2668 if (ssd != sensor->pixel_array) in smiapp_open()