Lines Matching refs:yi
42 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_prep_user_dma() local
43 u8 frame = yi->draw_frame; in ivtv_yuv_prep_user_dma()
44 struct yuv_frame_info *f = &yi->new_frame_info[frame]; in ivtv_yuv_prep_user_dma()
140 if (f->offset_y && yi->blanking_dmaptr) { in ivtv_yuv_prep_user_dma()
142 dma->SGarray[dma->SG_length].src = cpu_to_le32(yi->blanking_dmaptr); in ivtv_yuv_prep_user_dma()
231 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_handle_horizontal() local
350 yi->reg_2834, reg_2834, yi->reg_2838, reg_2838); in ivtv_yuv_handle_horizontal()
356 yi->reg_283c, reg_283c, yi->reg_2844, reg_2844); in ivtv_yuv_handle_horizontal()
361 yi->reg_2840, 0x00080514, yi->reg_2848, 0x00100514); in ivtv_yuv_handle_horizontal()
365 yi->reg_2854, reg_2854); in ivtv_yuv_handle_horizontal()
370 yi->reg_285c, reg_285c, yi->reg_2864, reg_2864); in ivtv_yuv_handle_horizontal()
374 yi->reg_2874, reg_2874); in ivtv_yuv_handle_horizontal()
378 yi->reg_2870, reg_2870); in ivtv_yuv_handle_horizontal()
382 yi->reg_2890, reg_2890); in ivtv_yuv_handle_horizontal()
385 if (h_filter != yi->h_filter) { in ivtv_yuv_handle_horizontal()
387 yi->h_filter = h_filter; in ivtv_yuv_handle_horizontal()
393 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_handle_vertical() local
532 if (yi->decode_height == 480) in ivtv_yuv_handle_vertical()
594 yi->reg_2934, reg_2934, yi->reg_293c, reg_293c); in ivtv_yuv_handle_vertical()
598 yi->reg_2944, reg_2944, yi->reg_294c, reg_294c); in ivtv_yuv_handle_vertical()
607 yi->reg_2930, reg_2930, yi->reg_2938, reg_2930); in ivtv_yuv_handle_vertical()
612 yi->reg_2928, reg_2928, yi->reg_292c, reg_2928 + 0x514); in ivtv_yuv_handle_vertical()
617 yi->reg_2920, reg_2920, yi->reg_2924, reg_2920 + 0x514); in ivtv_yuv_handle_vertical()
622 yi->reg_2918, reg_2918, yi->reg_291c, reg_291c); in ivtv_yuv_handle_vertical()
626 yi->reg_296c, reg_296c); in ivtv_yuv_handle_vertical()
631 yi->reg_2940, reg_2940, yi->reg_2948, reg_2940); in ivtv_yuv_handle_vertical()
636 yi->reg_2950, reg_2950, yi->reg_2954, reg_2954); in ivtv_yuv_handle_vertical()
641 yi->reg_2958, reg_2958, yi->reg_295c, reg_295c); in ivtv_yuv_handle_vertical()
645 yi->reg_2960, reg_2960); in ivtv_yuv_handle_vertical()
650 yi->reg_2964, reg_2964, yi->reg_2968, reg_2968); in ivtv_yuv_handle_vertical()
654 yi->reg_289c, reg_289c); in ivtv_yuv_handle_vertical()
657 if (v_filter_1 != yi->v_filter_1) { in ivtv_yuv_handle_vertical()
659 yi->v_filter_1 = v_filter_1; in ivtv_yuv_handle_vertical()
663 if (v_filter_2 != yi->v_filter_2) { in ivtv_yuv_handle_vertical()
665 yi->v_filter_2 = v_filter_2; in ivtv_yuv_handle_vertical()
817 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_work_handler() local
819 int frame = yi->update_frame; in ivtv_yuv_work_handler()
823 f = yi->new_frame_info[frame]; in ivtv_yuv_work_handler()
825 if (yi->track_osd) { in ivtv_yuv_work_handler()
827 f.pan_x = yi->osd_x_pan; in ivtv_yuv_work_handler()
828 f.pan_y = yi->osd_y_pan; in ivtv_yuv_work_handler()
829 f.vis_w = yi->osd_vis_w; in ivtv_yuv_work_handler()
830 f.vis_h = yi->osd_vis_h; in ivtv_yuv_work_handler()
836 f.vis_h = yi->decode_height; in ivtv_yuv_work_handler()
854 yi->old_frame_info = f; in ivtv_yuv_work_handler()
859 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_init() local
864 yi->reg_2834 = read_reg(0x02834); in ivtv_yuv_init()
865 yi->reg_2838 = read_reg(0x02838); in ivtv_yuv_init()
866 yi->reg_283c = read_reg(0x0283c); in ivtv_yuv_init()
867 yi->reg_2840 = read_reg(0x02840); in ivtv_yuv_init()
868 yi->reg_2844 = read_reg(0x02844); in ivtv_yuv_init()
869 yi->reg_2848 = read_reg(0x02848); in ivtv_yuv_init()
870 yi->reg_2854 = read_reg(0x02854); in ivtv_yuv_init()
871 yi->reg_285c = read_reg(0x0285c); in ivtv_yuv_init()
872 yi->reg_2864 = read_reg(0x02864); in ivtv_yuv_init()
873 yi->reg_2870 = read_reg(0x02870); in ivtv_yuv_init()
874 yi->reg_2874 = read_reg(0x02874); in ivtv_yuv_init()
875 yi->reg_2898 = read_reg(0x02898); in ivtv_yuv_init()
876 yi->reg_2890 = read_reg(0x02890); in ivtv_yuv_init()
878 yi->reg_289c = read_reg(0x0289c); in ivtv_yuv_init()
879 yi->reg_2918 = read_reg(0x02918); in ivtv_yuv_init()
880 yi->reg_291c = read_reg(0x0291c); in ivtv_yuv_init()
881 yi->reg_2920 = read_reg(0x02920); in ivtv_yuv_init()
882 yi->reg_2924 = read_reg(0x02924); in ivtv_yuv_init()
883 yi->reg_2928 = read_reg(0x02928); in ivtv_yuv_init()
884 yi->reg_292c = read_reg(0x0292c); in ivtv_yuv_init()
885 yi->reg_2930 = read_reg(0x02930); in ivtv_yuv_init()
886 yi->reg_2934 = read_reg(0x02934); in ivtv_yuv_init()
887 yi->reg_2938 = read_reg(0x02938); in ivtv_yuv_init()
888 yi->reg_293c = read_reg(0x0293c); in ivtv_yuv_init()
889 yi->reg_2940 = read_reg(0x02940); in ivtv_yuv_init()
890 yi->reg_2944 = read_reg(0x02944); in ivtv_yuv_init()
891 yi->reg_2948 = read_reg(0x02948); in ivtv_yuv_init()
892 yi->reg_294c = read_reg(0x0294c); in ivtv_yuv_init()
893 yi->reg_2950 = read_reg(0x02950); in ivtv_yuv_init()
894 yi->reg_2954 = read_reg(0x02954); in ivtv_yuv_init()
895 yi->reg_2958 = read_reg(0x02958); in ivtv_yuv_init()
896 yi->reg_295c = read_reg(0x0295c); in ivtv_yuv_init()
897 yi->reg_2960 = read_reg(0x02960); in ivtv_yuv_init()
898 yi->reg_2964 = read_reg(0x02964); in ivtv_yuv_init()
899 yi->reg_2968 = read_reg(0x02968); in ivtv_yuv_init()
900 yi->reg_296c = read_reg(0x0296c); in ivtv_yuv_init()
901 yi->reg_2970 = read_reg(0x02970); in ivtv_yuv_init()
903 yi->v_filter_1 = -1; in ivtv_yuv_init()
904 yi->v_filter_2 = -1; in ivtv_yuv_init()
905 yi->h_filter = -1; in ivtv_yuv_init()
908 yi->osd_x_offset = read_reg(0x02a04) & 0x00000FFF; in ivtv_yuv_init()
909 yi->osd_y_offset = (read_reg(0x02a04) >> 16) & 0x00000FFF; in ivtv_yuv_init()
914 yi->decode_height = 576; in ivtv_yuv_init()
916 yi->decode_height = 480; in ivtv_yuv_init()
919 yi->osd_vis_w = 720 - yi->osd_x_offset; in ivtv_yuv_init()
920 yi->osd_vis_h = yi->decode_height - yi->osd_y_offset; in ivtv_yuv_init()
923 if (!yi->osd_vis_w) in ivtv_yuv_init()
924 yi->osd_vis_w = 720 - yi->osd_x_offset; in ivtv_yuv_init()
926 if (!yi->osd_vis_h) { in ivtv_yuv_init()
927 yi->osd_vis_h = yi->decode_height - yi->osd_y_offset; in ivtv_yuv_init()
928 } else if (yi->osd_vis_h + yi->osd_y_offset > yi->decode_height) { in ivtv_yuv_init()
932 yi->osd_vis_h + yi->osd_y_offset, in ivtv_yuv_init()
933 yi->decode_height); in ivtv_yuv_init()
934 yi->osd_vis_h = yi->decode_height - yi->osd_y_offset; in ivtv_yuv_init()
939 yi->blanking_ptr = kzalloc(720 * 16, GFP_ATOMIC|__GFP_NOWARN); in ivtv_yuv_init()
940 if (yi->blanking_ptr) { in ivtv_yuv_init()
941 yi->blanking_dmaptr = pci_map_single(itv->pdev, yi->blanking_ptr, 720*16, PCI_DMA_TODEVICE); in ivtv_yuv_init()
943 yi->blanking_dmaptr = 0; in ivtv_yuv_init()
951 atomic_set(&yi->next_dma_frame, 0); in ivtv_yuv_init()
958 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_next_free() local
960 if (atomic_read(&yi->next_dma_frame) == -1) in ivtv_yuv_next_free()
963 draw = atomic_read(&yi->next_fill_frame); in ivtv_yuv_next_free()
964 display = atomic_read(&yi->next_dma_frame); in ivtv_yuv_next_free()
969 if (draw - display >= yi->max_frames_buffered) in ivtv_yuv_next_free()
972 yi->new_frame_info[draw].update = 0; in ivtv_yuv_next_free()
974 yi->draw_frame = draw; in ivtv_yuv_next_free()
980 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_setup_frame() local
981 u8 frame = yi->draw_frame; in ivtv_yuv_setup_frame()
983 struct yuv_frame_info *nf = &yi->new_frame_info[frame]; in ivtv_yuv_setup_frame()
984 struct yuv_frame_info *of = &yi->new_frame_info[last_frame]; in ivtv_yuv_setup_frame()
985 int lace_threshold = yi->lace_threshold; in ivtv_yuv_setup_frame()
1011 nf->lace_mode = yi->lace_mode & IVTV_YUV_MODE_MASK; in ivtv_yuv_setup_frame()
1014 lace_threshold = yi->decode_height - 1; in ivtv_yuv_setup_frame()
1059 if (memcmp(&yi->old_frame_info_args, nf, sizeof(*nf))) { in ivtv_yuv_setup_frame()
1060 yi->old_frame_info_args = *nf; in ivtv_yuv_setup_frame()
1066 nf->sync_field = yi->lace_sync_field; in ivtv_yuv_setup_frame()
1124 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_setup_stream_frame() local
1134 dma_args.src.width = yi->v4l2_src_w; in ivtv_yuv_setup_stream_frame()
1135 dma_args.src.height = yi->v4l2_src_h; in ivtv_yuv_setup_stream_frame()
1136 dma_args.dst = yi->main_rect; in ivtv_yuv_setup_stream_frame()
1137 dma_args.src_width = yi->v4l2_src_w; in ivtv_yuv_setup_stream_frame()
1138 dma_args.src_height = yi->v4l2_src_h; in ivtv_yuv_setup_stream_frame()
1144 itv->dma_data_req_offset = yuv_offset[yi->draw_frame]; in ivtv_yuv_setup_stream_frame()
1150 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_udma_stream_frame() local
1158 dma_args.uv_source = src + 720 * ((yi->v4l2_src_h + 31) & ~31); in ivtv_yuv_udma_stream_frame()
1187 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_close() local
1195 yi->running = 0; in ivtv_yuv_close()
1196 atomic_set(&yi->next_dma_frame, -1); in ivtv_yuv_close()
1197 atomic_set(&yi->next_fill_frame, 0); in ivtv_yuv_close()
1204 write_reg(yi->reg_2898 | 0x01000000, 0x2898); in ivtv_yuv_close()
1206 write_reg(yi->reg_2834, 0x02834); in ivtv_yuv_close()
1207 write_reg(yi->reg_2838, 0x02838); in ivtv_yuv_close()
1208 write_reg(yi->reg_283c, 0x0283c); in ivtv_yuv_close()
1209 write_reg(yi->reg_2840, 0x02840); in ivtv_yuv_close()
1210 write_reg(yi->reg_2844, 0x02844); in ivtv_yuv_close()
1211 write_reg(yi->reg_2848, 0x02848); in ivtv_yuv_close()
1212 write_reg(yi->reg_2854, 0x02854); in ivtv_yuv_close()
1213 write_reg(yi->reg_285c, 0x0285c); in ivtv_yuv_close()
1214 write_reg(yi->reg_2864, 0x02864); in ivtv_yuv_close()
1215 write_reg(yi->reg_2870, 0x02870); in ivtv_yuv_close()
1216 write_reg(yi->reg_2874, 0x02874); in ivtv_yuv_close()
1217 write_reg(yi->reg_2890, 0x02890); in ivtv_yuv_close()
1218 write_reg(yi->reg_289c, 0x0289c); in ivtv_yuv_close()
1220 write_reg(yi->reg_2918, 0x02918); in ivtv_yuv_close()
1221 write_reg(yi->reg_291c, 0x0291c); in ivtv_yuv_close()
1222 write_reg(yi->reg_2920, 0x02920); in ivtv_yuv_close()
1223 write_reg(yi->reg_2924, 0x02924); in ivtv_yuv_close()
1224 write_reg(yi->reg_2928, 0x02928); in ivtv_yuv_close()
1225 write_reg(yi->reg_292c, 0x0292c); in ivtv_yuv_close()
1226 write_reg(yi->reg_2930, 0x02930); in ivtv_yuv_close()
1227 write_reg(yi->reg_2934, 0x02934); in ivtv_yuv_close()
1228 write_reg(yi->reg_2938, 0x02938); in ivtv_yuv_close()
1229 write_reg(yi->reg_293c, 0x0293c); in ivtv_yuv_close()
1230 write_reg(yi->reg_2940, 0x02940); in ivtv_yuv_close()
1231 write_reg(yi->reg_2944, 0x02944); in ivtv_yuv_close()
1232 write_reg(yi->reg_2948, 0x02948); in ivtv_yuv_close()
1233 write_reg(yi->reg_294c, 0x0294c); in ivtv_yuv_close()
1234 write_reg(yi->reg_2950, 0x02950); in ivtv_yuv_close()
1235 write_reg(yi->reg_2954, 0x02954); in ivtv_yuv_close()
1236 write_reg(yi->reg_2958, 0x02958); in ivtv_yuv_close()
1237 write_reg(yi->reg_295c, 0x0295c); in ivtv_yuv_close()
1238 write_reg(yi->reg_2960, 0x02960); in ivtv_yuv_close()
1239 write_reg(yi->reg_2964, 0x02964); in ivtv_yuv_close()
1240 write_reg(yi->reg_2968, 0x02968); in ivtv_yuv_close()
1241 write_reg(yi->reg_296c, 0x0296c); in ivtv_yuv_close()
1242 write_reg(yi->reg_2970, 0x02970); in ivtv_yuv_close()
1247 if ((yi->reg_2834 & 0x0000FFFF) == (yi->reg_2834 >> 16)) { in ivtv_yuv_close()
1252 h_filter = ((yi->reg_2834 << 16) / (yi->reg_2834 >> 16)) >> 15; in ivtv_yuv_close()
1259 if ((yi->reg_2918 & 0x0000FFFF) == (yi->reg_2918 >> 16)) { in ivtv_yuv_close()
1265 v_filter_1 = ((yi->reg_2918 << 16) / (yi->reg_2918 >> 16)) >> 15; in ivtv_yuv_close()
1282 if (yi->blanking_ptr) { in ivtv_yuv_close()
1283 kfree(yi->blanking_ptr); in ivtv_yuv_close()
1284 yi->blanking_ptr = NULL; in ivtv_yuv_close()
1285 pci_unmap_single(itv->pdev, yi->blanking_dmaptr, 720*16, PCI_DMA_TODEVICE); in ivtv_yuv_close()
1289 yi->old_frame_info.src_w = 0; in ivtv_yuv_close()
1290 yi->old_frame_info.src_h = 0; in ivtv_yuv_close()
1291 yi->old_frame_info_args.src_w = 0; in ivtv_yuv_close()
1292 yi->old_frame_info_args.src_h = 0; in ivtv_yuv_close()