• Home
  • Raw
  • Download

Lines Matching refs:itv

25 static int ivtv_yuv_prep_user_dma(struct ivtv *itv, struct ivtv_user_dma *dma,  in ivtv_yuv_prep_user_dma()  argument
30 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_prep_user_dma()
115 dma->SG_length = dma_map_sg(&itv->pdev->dev, dma->SGlist, in ivtv_yuv_prep_user_dma()
138 ivtv_udma_sync_for_device(itv); in ivtv_yuv_prep_user_dma()
143 int ivtv_yuv_filter_check(struct ivtv *itv) in ivtv_yuv_filter_check() argument
157 static void ivtv_yuv_filter(struct ivtv *itv, int h_filter, int v_filter_1, int v_filter_2) in ivtv_yuv_filter() argument
217 static void ivtv_yuv_handle_horizontal(struct ivtv *itv, struct yuv_frame_info *f) in ivtv_yuv_handle_horizontal() argument
219 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_handle_horizontal()
374 ivtv_yuv_filter(itv, h_filter, -1, -1); in ivtv_yuv_handle_horizontal()
379 static void ivtv_yuv_handle_vertical(struct ivtv *itv, struct yuv_frame_info *f) in ivtv_yuv_handle_vertical() argument
381 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_handle_vertical()
646 ivtv_yuv_filter(itv, -1, v_filter_1, -1); in ivtv_yuv_handle_vertical()
652 ivtv_yuv_filter(itv, -1, -1, v_filter_2); in ivtv_yuv_handle_vertical()
658 static u32 ivtv_yuv_window_setup(struct ivtv *itv, struct yuv_frame_info *f) in ivtv_yuv_window_setup() argument
660 struct yuv_frame_info *of = &itv->yuv_info.old_frame_info; in ivtv_yuv_window_setup()
737 if (itv->yuv_info.track_osd) { in ivtv_yuv_window_setup()
739 f->dst_x += itv->yuv_info.osd_x_offset; in ivtv_yuv_window_setup()
740 f->dst_y += itv->yuv_info.osd_y_offset; in ivtv_yuv_window_setup()
803 void ivtv_yuv_work_handler(struct ivtv *itv) in ivtv_yuv_work_handler() argument
805 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_work_handler()
828 if (!(yuv_update = ivtv_yuv_window_setup(itv, &f))) in ivtv_yuv_work_handler()
837 ivtv_yuv_handle_horizontal(itv, &f); in ivtv_yuv_work_handler()
840 ivtv_yuv_handle_vertical(itv, &f); in ivtv_yuv_work_handler()
845 static void ivtv_yuv_init(struct ivtv *itv) in ivtv_yuv_init() argument
847 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_init()
906 if (!itv->osd_info) { in ivtv_yuv_init()
929 yi->blanking_dmaptr = dma_map_single(&itv->pdev->dev, in ivtv_yuv_init()
940 set_bit(IVTV_F_I_DECODING_YUV, &itv->i_flags); in ivtv_yuv_init()
945 static void ivtv_yuv_next_free(struct ivtv *itv) in ivtv_yuv_next_free() argument
948 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_next_free()
951 ivtv_yuv_init(itv); in ivtv_yuv_next_free()
968 static void ivtv_yuv_setup_frame(struct ivtv *itv, struct ivtv_dma_frame *args) in ivtv_yuv_setup_frame() argument
970 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_setup_frame()
1061 void ivtv_yuv_frame_complete(struct ivtv *itv) in ivtv_yuv_frame_complete() argument
1063 atomic_set(&itv->yuv_info.next_fill_frame, in ivtv_yuv_frame_complete()
1064 (itv->yuv_info.draw_frame + 1) % IVTV_YUV_BUFFERS); in ivtv_yuv_frame_complete()
1067 static int ivtv_yuv_udma_frame(struct ivtv *itv, struct ivtv_dma_frame *args) in ivtv_yuv_udma_frame() argument
1073 mutex_lock(&itv->udma.lock); in ivtv_yuv_udma_frame()
1075 if ((rc = ivtv_yuv_prep_user_dma(itv, &itv->udma, args)) != 0) { in ivtv_yuv_udma_frame()
1076 mutex_unlock(&itv->udma.lock); in ivtv_yuv_udma_frame()
1080 ivtv_udma_prepare(itv); in ivtv_yuv_udma_frame()
1081 prepare_to_wait(&itv->dma_waitq, &wait, TASK_INTERRUPTIBLE); in ivtv_yuv_udma_frame()
1084 while (test_bit(IVTV_F_I_UDMA_PENDING, &itv->i_flags) || in ivtv_yuv_udma_frame()
1085 test_bit(IVTV_F_I_UDMA, &itv->i_flags)) { in ivtv_yuv_udma_frame()
1089 if (got_sig && test_and_clear_bit(IVTV_F_I_UDMA_PENDING, &itv->i_flags)) in ivtv_yuv_udma_frame()
1094 finish_wait(&itv->dma_waitq, &wait); in ivtv_yuv_udma_frame()
1097 ivtv_udma_unmap(itv); in ivtv_yuv_udma_frame()
1101 mutex_unlock(&itv->udma.lock); in ivtv_yuv_udma_frame()
1105 ivtv_yuv_frame_complete(itv); in ivtv_yuv_udma_frame()
1107 mutex_unlock(&itv->udma.lock); in ivtv_yuv_udma_frame()
1112 void ivtv_yuv_setup_stream_frame(struct ivtv *itv) in ivtv_yuv_setup_stream_frame() argument
1114 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_setup_stream_frame()
1117 ivtv_yuv_next_free(itv); in ivtv_yuv_setup_stream_frame()
1131 ivtv_yuv_setup_frame(itv, &dma_args); in ivtv_yuv_setup_stream_frame()
1133 if (!itv->dma_data_req_offset) in ivtv_yuv_setup_stream_frame()
1134 itv->dma_data_req_offset = yuv_offset[yi->draw_frame]; in ivtv_yuv_setup_stream_frame()
1138 int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src) in ivtv_yuv_udma_stream_frame() argument
1140 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_udma_stream_frame()
1144 ivtv_yuv_setup_stream_frame(itv); in ivtv_yuv_udma_stream_frame()
1152 mutex_unlock(&itv->serialize_lock); in ivtv_yuv_udma_stream_frame()
1153 res = ivtv_yuv_udma_frame(itv, &dma_args); in ivtv_yuv_udma_stream_frame()
1154 mutex_lock(&itv->serialize_lock); in ivtv_yuv_udma_stream_frame()
1159 int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args) in ivtv_yuv_prep_frame() argument
1164 ivtv_yuv_next_free(itv); in ivtv_yuv_prep_frame()
1165 ivtv_yuv_setup_frame(itv, args); in ivtv_yuv_prep_frame()
1169 mutex_unlock(&itv->serialize_lock); in ivtv_yuv_prep_frame()
1170 res = ivtv_yuv_udma_frame(itv, args); in ivtv_yuv_prep_frame()
1171 mutex_lock(&itv->serialize_lock); in ivtv_yuv_prep_frame()
1175 void ivtv_yuv_close(struct ivtv *itv) in ivtv_yuv_close() argument
1177 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_close()
1181 mutex_unlock(&itv->serialize_lock); in ivtv_yuv_close()
1182 ivtv_waitq(&itv->vsync_waitq); in ivtv_yuv_close()
1183 mutex_lock(&itv->serialize_lock); in ivtv_yuv_close()
1263 ivtv_yuv_filter(itv, h_filter, v_filter_1, v_filter_2); in ivtv_yuv_close()
1275 dma_unmap_single(&itv->pdev->dev, yi->blanking_dmaptr, in ivtv_yuv_close()
1286 clear_bit(IVTV_F_I_DECODING_YUV, &itv->i_flags); in ivtv_yuv_close()