Lines Matching refs:isc

32 	struct isc_device *isc = container_of(sd, struct isc_device, scaler_sd);  in isc_scaler_get_fmt()  local
43 format->format = isc->scaler_format[format->pad]; in isc_scaler_get_fmt()
52 struct isc_device *isc = container_of(sd, struct isc_device, scaler_sd); in isc_scaler_set_fmt() local
59 req_fmt->format = isc->scaler_format[ISC_SCALER_PAD_SOURCE]; in isc_scaler_set_fmt()
69 fmt = isc_find_format_by_code(isc, req_fmt->format.code, &i); in isc_scaler_set_fmt()
72 fmt = &isc->formats_list[0]; in isc_scaler_set_fmt()
86 16, isc->max_width, 0, in isc_scaler_set_fmt()
88 16, isc->max_height, 0, 0); in isc_scaler_set_fmt()
93 isc->scaler_format[ISC_SCALER_PAD_SINK] = req_fmt->format; in isc_scaler_set_fmt()
96 isc->scaler_format[ISC_SCALER_PAD_SOURCE] = in isc_scaler_set_fmt()
97 isc->scaler_format[ISC_SCALER_PAD_SINK]; in isc_scaler_set_fmt()
99 (&isc->scaler_format[ISC_SCALER_PAD_SOURCE].width, 16, in isc_scaler_set_fmt()
100 isc->max_width, 0, in isc_scaler_set_fmt()
101 &isc->scaler_format[ISC_SCALER_PAD_SOURCE].height, 16, in isc_scaler_set_fmt()
102 isc->max_height, 0, 0); in isc_scaler_set_fmt()
111 struct isc_device *isc = container_of(sd, struct isc_device, scaler_sd); in isc_scaler_enum_mbus_code() local
118 if (code->index < isc->formats_list_size) { in isc_scaler_enum_mbus_code()
119 code->code = isc->formats_list[code->index].mbus_code; in isc_scaler_enum_mbus_code()
130 struct isc_device *isc = container_of(sd, struct isc_device, scaler_sd); in isc_scaler_g_sel() local
139 sel->r.height = isc->scaler_format[ISC_SCALER_PAD_SOURCE].height; in isc_scaler_g_sel()
140 sel->r.width = isc->scaler_format[ISC_SCALER_PAD_SOURCE].width; in isc_scaler_g_sel()
154 struct isc_device *isc = container_of(sd, struct isc_device, scaler_sd); in isc_scaler_init_cfg() local
156 *v4l2_try_fmt = isc->scaler_format[ISC_SCALER_PAD_SOURCE]; in isc_scaler_init_cfg()
184 int isc_scaler_init(struct isc_device *isc) in isc_scaler_init() argument
188 v4l2_subdev_init(&isc->scaler_sd, &xisc_scaler_subdev_ops); in isc_scaler_init()
190 isc->scaler_sd.owner = THIS_MODULE; in isc_scaler_init()
191 isc->scaler_sd.dev = isc->dev; in isc_scaler_init()
192 snprintf(isc->scaler_sd.name, sizeof(isc->scaler_sd.name), in isc_scaler_init()
195 isc->scaler_sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; in isc_scaler_init()
196 isc->scaler_sd.entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER; in isc_scaler_init()
197 isc->scaler_sd.entity.ops = &isc_scaler_entity_ops; in isc_scaler_init()
198 isc->scaler_pads[ISC_SCALER_PAD_SINK].flags = MEDIA_PAD_FL_SINK; in isc_scaler_init()
199 isc->scaler_pads[ISC_SCALER_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE; in isc_scaler_init()
201 isc_scaler_prepare_fmt(&isc->scaler_format[ISC_SCALER_PAD_SOURCE]); in isc_scaler_init()
202 isc->scaler_format[ISC_SCALER_PAD_SOURCE].height = isc->max_height; in isc_scaler_init()
203 isc->scaler_format[ISC_SCALER_PAD_SOURCE].width = isc->max_width; in isc_scaler_init()
204 isc->scaler_format[ISC_SCALER_PAD_SOURCE].code = in isc_scaler_init()
205 isc->formats_list[0].mbus_code; in isc_scaler_init()
207 isc->scaler_format[ISC_SCALER_PAD_SINK] = in isc_scaler_init()
208 isc->scaler_format[ISC_SCALER_PAD_SOURCE]; in isc_scaler_init()
210 ret = media_entity_pads_init(&isc->scaler_sd.entity, in isc_scaler_init()
212 isc->scaler_pads); in isc_scaler_init()
214 dev_err(isc->dev, "scaler sd media entity init failed\n"); in isc_scaler_init()
218 ret = v4l2_device_register_subdev(&isc->v4l2_dev, &isc->scaler_sd); in isc_scaler_init()
220 dev_err(isc->dev, "scaler sd failed to register subdev\n"); in isc_scaler_init()
228 int isc_scaler_link(struct isc_device *isc) in isc_scaler_link() argument
232 ret = media_create_pad_link(&isc->current_subdev->sd->entity, in isc_scaler_link()
233 isc->remote_pad, &isc->scaler_sd.entity, in isc_scaler_link()
239 dev_err(isc->dev, "Failed to create pad link: %s to %s\n", in isc_scaler_link()
240 isc->current_subdev->sd->entity.name, in isc_scaler_link()
241 isc->scaler_sd.entity.name); in isc_scaler_link()
245 dev_dbg(isc->dev, "link with %s pad: %d\n", in isc_scaler_link()
246 isc->current_subdev->sd->name, isc->remote_pad); in isc_scaler_link()
248 ret = media_create_pad_link(&isc->scaler_sd.entity, in isc_scaler_link()
250 &isc->video_dev.entity, ISC_PAD_SINK, in isc_scaler_link()
255 dev_err(isc->dev, "Failed to create pad link: %s to %s\n", in isc_scaler_link()
256 isc->scaler_sd.entity.name, in isc_scaler_link()
257 isc->video_dev.entity.name); in isc_scaler_link()
261 dev_dbg(isc->dev, "link with %s pad: %d\n", isc->scaler_sd.name, in isc_scaler_link()