Lines Matching refs:isys
101 struct ipu6_isys *isys = av->isys; in video_open() local
102 struct ipu6_bus_device *adev = isys->adev; in video_open()
104 mutex_lock(&isys->mutex); in video_open()
105 if (isys->need_reset) { in video_open()
106 mutex_unlock(&isys->mutex); in video_open()
110 mutex_unlock(&isys->mutex); in video_open()
148 strscpy(cap->card, av->isys->media_dev.model, sizeof(cap->card)); in ipu6_isys_vidioc_querycap()
244 *bytesperline = ALIGN(*bytesperline, av->isys->line_align); in ipu6_isys_try_fmt_cap()
257 av->isys->pdata->ipdata->isys_dma_overshoot); in ipu6_isys_try_fmt_cap()
369 struct device *dev = &av->isys->adev->auxdev.dev; in link_validate()
425 spin_lock_irqsave(&av->isys->streams_lock, flags); in get_stream_opened()
426 av->isys->stream_opened++; in get_stream_opened()
427 spin_unlock_irqrestore(&av->isys->streams_lock, flags); in get_stream_opened()
434 spin_lock_irqsave(&av->isys->streams_lock, flags); in put_stream_opened()
435 av->isys->stream_opened--; in put_stream_opened()
436 spin_unlock_irqrestore(&av->isys->streams_lock, flags); in put_stream_opened()
452 struct ipu6_isys *isys = av->isys; in ipu6_isys_fw_pin_cfg() local
453 struct device *dev = &isys->adev->auxdev.dev; in ipu6_isys_fw_pin_cfg()
512 output_pin->sensor_type = isys->sensor_type++; in ipu6_isys_fw_pin_cfg()
513 if (isys->sensor_type > isys->pdata->ipdata->sensor_type_end) in ipu6_isys_fw_pin_cfg()
514 isys->sensor_type = isys->pdata->ipdata->sensor_type_start; in ipu6_isys_fw_pin_cfg()
525 struct device *dev = &av->isys->adev->auxdev.dev; in start_stream_firmware()
546 ipu6_put_fw_msg_buf(av->isys, (u64)stream_cfg); in start_stream_firmware()
557 ret = ipu6_fw_isys_complex_cmd(av->isys, stream->stream_handle, in start_stream_firmware()
563 ipu6_put_fw_msg_buf(av->isys, (u64)stream_cfg); in start_stream_firmware()
572 ipu6_put_fw_msg_buf(av->isys, (u64)stream_cfg); in start_stream_firmware()
604 ret = ipu6_fw_isys_complex_cmd(av->isys, stream->stream_handle, in start_stream_firmware()
609 ret = ipu6_fw_isys_simple_cmd(av->isys, stream->stream_handle, in start_stream_firmware()
637 retout = ipu6_fw_isys_simple_cmd(av->isys, in start_stream_firmware()
662 struct device *dev = &av->isys->adev->auxdev.dev; in stop_streaming_firmware()
668 ret = ipu6_fw_isys_simple_cmd(av->isys, stream->stream_handle, in stop_streaming_firmware()
689 struct device *dev = &av->isys->adev->auxdev.dev; in close_streaming_firmware()
694 ret = ipu6_fw_isys_simple_cmd(av->isys, stream->stream_handle, in close_streaming_firmware()
737 dev_dbg(&av->isys->adev->auxdev.dev, in ipu6_isys_video_prepare_stream()
747 struct ipu6_isys *isys = av->isys; in ipu6_isys_configure_stream_watermark() local
749 struct isys_iwake_watermark *iwake_watermark = &isys->iwake_watermark; in ipu6_isys_configure_stream_watermark()
750 struct device *dev = &isys->adev->auxdev.dev; in ipu6_isys_configure_stream_watermark()
766 av->watermark.sram_gran_shift = isys->pdata->ipdata->sram_gran_shift; in ipu6_isys_configure_stream_watermark()
767 av->watermark.sram_gran_size = isys->pdata->ipdata->sram_gran_size; in ipu6_isys_configure_stream_watermark()
824 &av->isys->iwake_watermark; in ipu6_isys_update_stream_watermark()
842 update_watermark_setting(av->isys); in ipu6_isys_update_stream_watermark()
856 dev = &stream->isys->adev->auxdev.dev; in ipu6_isys_put_stream()
858 spin_lock_irqsave(&stream->isys->streams_lock, flags); in ipu6_isys_put_stream()
860 if (&stream->isys->streams[i] == stream) { in ipu6_isys_put_stream()
861 if (stream->isys->streams_ref_count[i] > 0) in ipu6_isys_put_stream()
862 stream->isys->streams_ref_count[i]--; in ipu6_isys_put_stream()
869 spin_unlock_irqrestore(&stream->isys->streams_lock, flags); in ipu6_isys_put_stream()
876 struct ipu6_isys *isys = av->isys; in ipu6_isys_get_stream() local
881 if (!isys) in ipu6_isys_get_stream()
884 spin_lock_irqsave(&isys->streams_lock, flags); in ipu6_isys_get_stream()
886 if (isys->streams_ref_count[i] && isys->streams[i].vc == vc && in ipu6_isys_get_stream()
887 isys->streams[i].asd == asd) { in ipu6_isys_get_stream()
888 isys->streams_ref_count[i]++; in ipu6_isys_get_stream()
889 stream = &isys->streams[i]; in ipu6_isys_get_stream()
896 if (!isys->streams_ref_count[i]) { in ipu6_isys_get_stream()
897 isys->streams_ref_count[i]++; in ipu6_isys_get_stream()
898 stream = &isys->streams[i]; in ipu6_isys_get_stream()
905 spin_unlock_irqrestore(&isys->streams_lock, flags); in ipu6_isys_get_stream()
911 ipu6_isys_query_stream_by_handle(struct ipu6_isys *isys, u8 stream_handle) in ipu6_isys_query_stream_by_handle() argument
916 if (!isys) in ipu6_isys_query_stream_by_handle()
920 dev_err(&isys->adev->auxdev.dev, in ipu6_isys_query_stream_by_handle()
925 spin_lock_irqsave(&isys->streams_lock, flags); in ipu6_isys_query_stream_by_handle()
926 if (isys->streams_ref_count[stream_handle] > 0) { in ipu6_isys_query_stream_by_handle()
927 isys->streams_ref_count[stream_handle]++; in ipu6_isys_query_stream_by_handle()
928 stream = &isys->streams[stream_handle]; in ipu6_isys_query_stream_by_handle()
930 spin_unlock_irqrestore(&isys->streams_lock, flags); in ipu6_isys_query_stream_by_handle()
936 ipu6_isys_query_stream_by_source(struct ipu6_isys *isys, int source, u8 vc) in ipu6_isys_query_stream_by_source() argument
942 if (!isys) in ipu6_isys_query_stream_by_source()
946 dev_err(&isys->adev->auxdev.dev, in ipu6_isys_query_stream_by_source()
951 spin_lock_irqsave(&isys->streams_lock, flags); in ipu6_isys_query_stream_by_source()
953 if (!isys->streams_ref_count[i]) in ipu6_isys_query_stream_by_source()
956 if (isys->streams[i].stream_source == source && in ipu6_isys_query_stream_by_source()
957 isys->streams[i].vc == vc) { in ipu6_isys_query_stream_by_source()
958 stream = &isys->streams[i]; in ipu6_isys_query_stream_by_source()
959 isys->streams_ref_count[i]++; in ipu6_isys_query_stream_by_source()
963 spin_unlock_irqrestore(&isys->streams_lock, flags); in ipu6_isys_query_stream_by_source()
991 struct device *dev = &av->isys->adev->auxdev.dev; in ipu6_isys_video_set_streaming()
1095 int ipu6_isys_fw_open(struct ipu6_isys *isys) in ipu6_isys_fw_open() argument
1097 struct ipu6_bus_device *adev = isys->adev; in ipu6_isys_fw_open()
1098 const struct ipu6_isys_internal_pdata *ipdata = isys->pdata->ipdata; in ipu6_isys_fw_open()
1105 mutex_lock(&isys->mutex); in ipu6_isys_fw_open()
1107 if (isys->ref_count++) in ipu6_isys_fw_open()
1111 IPU6_CPD_PKG_DIR_ISYS_SERVER_IDX, isys->pdata->base, in ipu6_isys_fw_open()
1118 ipu6_cleanup_fw_msg_bufs(isys); in ipu6_isys_fw_open()
1120 if (isys->fwcom) { in ipu6_isys_fw_open()
1126 ipu6_fw_isys_cleanup(isys); in ipu6_isys_fw_open()
1129 ret = ipu6_fw_isys_init(isys, ipdata->num_parallel_streams); in ipu6_isys_fw_open()
1134 mutex_unlock(&isys->mutex); in ipu6_isys_fw_open()
1139 isys->ref_count--; in ipu6_isys_fw_open()
1140 mutex_unlock(&isys->mutex); in ipu6_isys_fw_open()
1146 void ipu6_isys_fw_close(struct ipu6_isys *isys) in ipu6_isys_fw_close() argument
1148 mutex_lock(&isys->mutex); in ipu6_isys_fw_close()
1150 isys->ref_count--; in ipu6_isys_fw_close()
1151 if (!isys->ref_count) { in ipu6_isys_fw_close()
1152 ipu6_fw_isys_close(isys); in ipu6_isys_fw_close()
1153 if (isys->fwcom) { in ipu6_isys_fw_close()
1154 isys->need_reset = true; in ipu6_isys_fw_close()
1155 dev_warn(&isys->adev->auxdev.dev, in ipu6_isys_fw_close()
1160 mutex_unlock(&isys->mutex); in ipu6_isys_fw_close()
1162 if (isys->need_reset) in ipu6_isys_fw_close()
1163 pm_runtime_put_sync(&isys->adev->auxdev.dev); in ipu6_isys_fw_close()
1165 pm_runtime_put(&isys->adev->auxdev.dev); in ipu6_isys_fw_close()
1173 struct device *dev = &av->isys->adev->auxdev.dev; in ipu6_isys_setup_video()
1298 av->vdev.v4l2_dev = &av->isys->v4l2_dev; in ipu6_isys_video_init()