Lines Matching refs:yi
30 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_prep_user_dma() local
31 u8 frame = yi->draw_frame; in ivtv_yuv_prep_user_dma()
32 struct yuv_frame_info *f = &yi->new_frame_info[frame]; in ivtv_yuv_prep_user_dma()
123 if (f->offset_y && yi->blanking_dmaptr) { in ivtv_yuv_prep_user_dma()
125 dma->SGarray[dma->SG_length].src = cpu_to_le32(yi->blanking_dmaptr); in ivtv_yuv_prep_user_dma()
214 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_handle_horizontal() local
333 yi->reg_2834, reg_2834, yi->reg_2838, reg_2838); in ivtv_yuv_handle_horizontal()
339 yi->reg_283c, reg_283c, yi->reg_2844, reg_2844); in ivtv_yuv_handle_horizontal()
344 yi->reg_2840, 0x00080514, yi->reg_2848, 0x00100514); in ivtv_yuv_handle_horizontal()
348 yi->reg_2854, reg_2854); in ivtv_yuv_handle_horizontal()
353 yi->reg_285c, reg_285c, yi->reg_2864, reg_2864); in ivtv_yuv_handle_horizontal()
357 yi->reg_2874, reg_2874); in ivtv_yuv_handle_horizontal()
361 yi->reg_2870, reg_2870); in ivtv_yuv_handle_horizontal()
365 yi->reg_2890, reg_2890); in ivtv_yuv_handle_horizontal()
368 if (h_filter != yi->h_filter) { in ivtv_yuv_handle_horizontal()
370 yi->h_filter = h_filter; in ivtv_yuv_handle_horizontal()
376 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_handle_vertical() local
515 if (yi->decode_height == 480) in ivtv_yuv_handle_vertical()
577 yi->reg_2934, reg_2934, yi->reg_293c, reg_293c); in ivtv_yuv_handle_vertical()
581 yi->reg_2944, reg_2944, yi->reg_294c, reg_294c); in ivtv_yuv_handle_vertical()
590 yi->reg_2930, reg_2930, yi->reg_2938, reg_2930); in ivtv_yuv_handle_vertical()
595 yi->reg_2928, reg_2928, yi->reg_292c, reg_2928 + 0x514); in ivtv_yuv_handle_vertical()
600 yi->reg_2920, reg_2920, yi->reg_2924, reg_2920 + 0x514); in ivtv_yuv_handle_vertical()
605 yi->reg_2918, reg_2918, yi->reg_291c, reg_291c); in ivtv_yuv_handle_vertical()
609 yi->reg_296c, reg_296c); in ivtv_yuv_handle_vertical()
614 yi->reg_2940, reg_2940, yi->reg_2948, reg_2940); in ivtv_yuv_handle_vertical()
619 yi->reg_2950, reg_2950, yi->reg_2954, reg_2954); in ivtv_yuv_handle_vertical()
624 yi->reg_2958, reg_2958, yi->reg_295c, reg_295c); in ivtv_yuv_handle_vertical()
628 yi->reg_2960, reg_2960); in ivtv_yuv_handle_vertical()
633 yi->reg_2964, reg_2964, yi->reg_2968, reg_2968); in ivtv_yuv_handle_vertical()
637 yi->reg_289c, reg_289c); in ivtv_yuv_handle_vertical()
640 if (v_filter_1 != yi->v_filter_1) { in ivtv_yuv_handle_vertical()
642 yi->v_filter_1 = v_filter_1; in ivtv_yuv_handle_vertical()
646 if (v_filter_2 != yi->v_filter_2) { in ivtv_yuv_handle_vertical()
648 yi->v_filter_2 = v_filter_2; in ivtv_yuv_handle_vertical()
800 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_work_handler() local
802 int frame = yi->update_frame; in ivtv_yuv_work_handler()
806 f = yi->new_frame_info[frame]; in ivtv_yuv_work_handler()
808 if (yi->track_osd) { in ivtv_yuv_work_handler()
810 f.pan_x = yi->osd_x_pan; in ivtv_yuv_work_handler()
811 f.pan_y = yi->osd_y_pan; in ivtv_yuv_work_handler()
812 f.vis_w = yi->osd_vis_w; in ivtv_yuv_work_handler()
813 f.vis_h = yi->osd_vis_h; in ivtv_yuv_work_handler()
819 f.vis_h = yi->decode_height; in ivtv_yuv_work_handler()
837 yi->old_frame_info = f; in ivtv_yuv_work_handler()
842 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_init() local
847 yi->reg_2834 = read_reg(0x02834); in ivtv_yuv_init()
848 yi->reg_2838 = read_reg(0x02838); in ivtv_yuv_init()
849 yi->reg_283c = read_reg(0x0283c); in ivtv_yuv_init()
850 yi->reg_2840 = read_reg(0x02840); in ivtv_yuv_init()
851 yi->reg_2844 = read_reg(0x02844); in ivtv_yuv_init()
852 yi->reg_2848 = read_reg(0x02848); in ivtv_yuv_init()
853 yi->reg_2854 = read_reg(0x02854); in ivtv_yuv_init()
854 yi->reg_285c = read_reg(0x0285c); in ivtv_yuv_init()
855 yi->reg_2864 = read_reg(0x02864); in ivtv_yuv_init()
856 yi->reg_2870 = read_reg(0x02870); in ivtv_yuv_init()
857 yi->reg_2874 = read_reg(0x02874); in ivtv_yuv_init()
858 yi->reg_2898 = read_reg(0x02898); in ivtv_yuv_init()
859 yi->reg_2890 = read_reg(0x02890); in ivtv_yuv_init()
861 yi->reg_289c = read_reg(0x0289c); in ivtv_yuv_init()
862 yi->reg_2918 = read_reg(0x02918); in ivtv_yuv_init()
863 yi->reg_291c = read_reg(0x0291c); in ivtv_yuv_init()
864 yi->reg_2920 = read_reg(0x02920); in ivtv_yuv_init()
865 yi->reg_2924 = read_reg(0x02924); in ivtv_yuv_init()
866 yi->reg_2928 = read_reg(0x02928); in ivtv_yuv_init()
867 yi->reg_292c = read_reg(0x0292c); in ivtv_yuv_init()
868 yi->reg_2930 = read_reg(0x02930); in ivtv_yuv_init()
869 yi->reg_2934 = read_reg(0x02934); in ivtv_yuv_init()
870 yi->reg_2938 = read_reg(0x02938); in ivtv_yuv_init()
871 yi->reg_293c = read_reg(0x0293c); in ivtv_yuv_init()
872 yi->reg_2940 = read_reg(0x02940); in ivtv_yuv_init()
873 yi->reg_2944 = read_reg(0x02944); in ivtv_yuv_init()
874 yi->reg_2948 = read_reg(0x02948); in ivtv_yuv_init()
875 yi->reg_294c = read_reg(0x0294c); in ivtv_yuv_init()
876 yi->reg_2950 = read_reg(0x02950); in ivtv_yuv_init()
877 yi->reg_2954 = read_reg(0x02954); in ivtv_yuv_init()
878 yi->reg_2958 = read_reg(0x02958); in ivtv_yuv_init()
879 yi->reg_295c = read_reg(0x0295c); in ivtv_yuv_init()
880 yi->reg_2960 = read_reg(0x02960); in ivtv_yuv_init()
881 yi->reg_2964 = read_reg(0x02964); in ivtv_yuv_init()
882 yi->reg_2968 = read_reg(0x02968); in ivtv_yuv_init()
883 yi->reg_296c = read_reg(0x0296c); in ivtv_yuv_init()
884 yi->reg_2970 = read_reg(0x02970); in ivtv_yuv_init()
886 yi->v_filter_1 = -1; in ivtv_yuv_init()
887 yi->v_filter_2 = -1; in ivtv_yuv_init()
888 yi->h_filter = -1; in ivtv_yuv_init()
891 yi->osd_x_offset = read_reg(0x02a04) & 0x00000FFF; in ivtv_yuv_init()
892 yi->osd_y_offset = (read_reg(0x02a04) >> 16) & 0x00000FFF; in ivtv_yuv_init()
897 yi->decode_height = 576; in ivtv_yuv_init()
899 yi->decode_height = 480; in ivtv_yuv_init()
902 yi->osd_vis_w = 720 - yi->osd_x_offset; in ivtv_yuv_init()
903 yi->osd_vis_h = yi->decode_height - yi->osd_y_offset; in ivtv_yuv_init()
906 if (!yi->osd_vis_w) in ivtv_yuv_init()
907 yi->osd_vis_w = 720 - yi->osd_x_offset; in ivtv_yuv_init()
909 if (!yi->osd_vis_h) { in ivtv_yuv_init()
910 yi->osd_vis_h = yi->decode_height - yi->osd_y_offset; in ivtv_yuv_init()
911 } else if (yi->osd_vis_h + yi->osd_y_offset > yi->decode_height) { in ivtv_yuv_init()
915 yi->osd_vis_h + yi->osd_y_offset, in ivtv_yuv_init()
916 yi->decode_height); in ivtv_yuv_init()
917 yi->osd_vis_h = yi->decode_height - yi->osd_y_offset; in ivtv_yuv_init()
922 yi->blanking_ptr = kzalloc(720 * 16, GFP_ATOMIC|__GFP_NOWARN); in ivtv_yuv_init()
923 if (yi->blanking_ptr) { in ivtv_yuv_init()
924 yi->blanking_dmaptr = dma_map_single(&itv->pdev->dev, in ivtv_yuv_init()
925 yi->blanking_ptr, in ivtv_yuv_init()
928 yi->blanking_dmaptr = 0; in ivtv_yuv_init()
936 atomic_set(&yi->next_dma_frame, 0); in ivtv_yuv_init()
943 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_next_free() local
945 if (atomic_read(&yi->next_dma_frame) == -1) in ivtv_yuv_next_free()
948 draw = atomic_read(&yi->next_fill_frame); in ivtv_yuv_next_free()
949 display = atomic_read(&yi->next_dma_frame); in ivtv_yuv_next_free()
954 if (draw - display >= yi->max_frames_buffered) in ivtv_yuv_next_free()
957 yi->new_frame_info[draw].update = 0; in ivtv_yuv_next_free()
959 yi->draw_frame = draw; in ivtv_yuv_next_free()
965 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_setup_frame() local
966 u8 frame = yi->draw_frame; in ivtv_yuv_setup_frame()
968 struct yuv_frame_info *nf = &yi->new_frame_info[frame]; in ivtv_yuv_setup_frame()
969 struct yuv_frame_info *of = &yi->new_frame_info[last_frame]; in ivtv_yuv_setup_frame()
970 int lace_threshold = yi->lace_threshold; in ivtv_yuv_setup_frame()
996 nf->lace_mode = yi->lace_mode & IVTV_YUV_MODE_MASK; in ivtv_yuv_setup_frame()
999 lace_threshold = yi->decode_height - 1; in ivtv_yuv_setup_frame()
1044 if (memcmp(&yi->old_frame_info_args, nf, sizeof(*nf))) { in ivtv_yuv_setup_frame()
1045 yi->old_frame_info_args = *nf; in ivtv_yuv_setup_frame()
1051 nf->sync_field = yi->lace_sync_field; in ivtv_yuv_setup_frame()
1109 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_setup_stream_frame() local
1119 dma_args.src.width = yi->v4l2_src_w; in ivtv_yuv_setup_stream_frame()
1120 dma_args.src.height = yi->v4l2_src_h; in ivtv_yuv_setup_stream_frame()
1121 dma_args.dst = yi->main_rect; in ivtv_yuv_setup_stream_frame()
1122 dma_args.src_width = yi->v4l2_src_w; in ivtv_yuv_setup_stream_frame()
1123 dma_args.src_height = yi->v4l2_src_h; in ivtv_yuv_setup_stream_frame()
1129 itv->dma_data_req_offset = yuv_offset[yi->draw_frame]; in ivtv_yuv_setup_stream_frame()
1135 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_udma_stream_frame() local
1143 dma_args.uv_source = src + 720 * ((yi->v4l2_src_h + 31) & ~31); in ivtv_yuv_udma_stream_frame()
1172 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_close() local
1180 yi->running = 0; in ivtv_yuv_close()
1181 atomic_set(&yi->next_dma_frame, -1); in ivtv_yuv_close()
1182 atomic_set(&yi->next_fill_frame, 0); in ivtv_yuv_close()
1189 write_reg(yi->reg_2898 | 0x01000000, 0x2898); in ivtv_yuv_close()
1191 write_reg(yi->reg_2834, 0x02834); in ivtv_yuv_close()
1192 write_reg(yi->reg_2838, 0x02838); in ivtv_yuv_close()
1193 write_reg(yi->reg_283c, 0x0283c); in ivtv_yuv_close()
1194 write_reg(yi->reg_2840, 0x02840); in ivtv_yuv_close()
1195 write_reg(yi->reg_2844, 0x02844); in ivtv_yuv_close()
1196 write_reg(yi->reg_2848, 0x02848); in ivtv_yuv_close()
1197 write_reg(yi->reg_2854, 0x02854); in ivtv_yuv_close()
1198 write_reg(yi->reg_285c, 0x0285c); in ivtv_yuv_close()
1199 write_reg(yi->reg_2864, 0x02864); in ivtv_yuv_close()
1200 write_reg(yi->reg_2870, 0x02870); in ivtv_yuv_close()
1201 write_reg(yi->reg_2874, 0x02874); in ivtv_yuv_close()
1202 write_reg(yi->reg_2890, 0x02890); in ivtv_yuv_close()
1203 write_reg(yi->reg_289c, 0x0289c); in ivtv_yuv_close()
1205 write_reg(yi->reg_2918, 0x02918); in ivtv_yuv_close()
1206 write_reg(yi->reg_291c, 0x0291c); in ivtv_yuv_close()
1207 write_reg(yi->reg_2920, 0x02920); in ivtv_yuv_close()
1208 write_reg(yi->reg_2924, 0x02924); in ivtv_yuv_close()
1209 write_reg(yi->reg_2928, 0x02928); in ivtv_yuv_close()
1210 write_reg(yi->reg_292c, 0x0292c); in ivtv_yuv_close()
1211 write_reg(yi->reg_2930, 0x02930); in ivtv_yuv_close()
1212 write_reg(yi->reg_2934, 0x02934); in ivtv_yuv_close()
1213 write_reg(yi->reg_2938, 0x02938); in ivtv_yuv_close()
1214 write_reg(yi->reg_293c, 0x0293c); in ivtv_yuv_close()
1215 write_reg(yi->reg_2940, 0x02940); in ivtv_yuv_close()
1216 write_reg(yi->reg_2944, 0x02944); in ivtv_yuv_close()
1217 write_reg(yi->reg_2948, 0x02948); in ivtv_yuv_close()
1218 write_reg(yi->reg_294c, 0x0294c); in ivtv_yuv_close()
1219 write_reg(yi->reg_2950, 0x02950); in ivtv_yuv_close()
1220 write_reg(yi->reg_2954, 0x02954); in ivtv_yuv_close()
1221 write_reg(yi->reg_2958, 0x02958); in ivtv_yuv_close()
1222 write_reg(yi->reg_295c, 0x0295c); in ivtv_yuv_close()
1223 write_reg(yi->reg_2960, 0x02960); in ivtv_yuv_close()
1224 write_reg(yi->reg_2964, 0x02964); in ivtv_yuv_close()
1225 write_reg(yi->reg_2968, 0x02968); in ivtv_yuv_close()
1226 write_reg(yi->reg_296c, 0x0296c); in ivtv_yuv_close()
1227 write_reg(yi->reg_2970, 0x02970); in ivtv_yuv_close()
1232 if ((yi->reg_2834 & 0x0000FFFF) == (yi->reg_2834 >> 16)) { in ivtv_yuv_close()
1237 h_filter = ((yi->reg_2834 << 16) / (yi->reg_2834 >> 16)) >> 15; in ivtv_yuv_close()
1244 if ((yi->reg_2918 & 0x0000FFFF) == (yi->reg_2918 >> 16)) { in ivtv_yuv_close()
1250 v_filter_1 = ((yi->reg_2918 << 16) / (yi->reg_2918 >> 16)) >> 15; in ivtv_yuv_close()
1267 if (yi->blanking_ptr) { in ivtv_yuv_close()
1268 kfree(yi->blanking_ptr); in ivtv_yuv_close()
1269 yi->blanking_ptr = NULL; in ivtv_yuv_close()
1270 dma_unmap_single(&itv->pdev->dev, yi->blanking_dmaptr, in ivtv_yuv_close()
1275 yi->old_frame_info.src_w = 0; in ivtv_yuv_close()
1276 yi->old_frame_info.src_h = 0; in ivtv_yuv_close()
1277 yi->old_frame_info_args.src_w = 0; in ivtv_yuv_close()
1278 yi->old_frame_info_args.src_h = 0; in ivtv_yuv_close()