Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72041
b: refs/heads/master
c: 0bfeb04
h: refs/heads/master
i:
  72039: d66bedc
v: v3
  • Loading branch information
Ian Armstrong authored and Mauro Carvalho Chehab committed Oct 22, 2007
1 parent e8a6cdf commit 5b4b247
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d343d7f9792ac1790757cb35a419b8b0b5210917
refs/heads/master: 0bfeb04a9f3ad9ad8c9bbba062231ff1a76e4465
22 changes: 12 additions & 10 deletions trunk/drivers/media/video/ivtv/ivtv-yuv.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ static u32 ivtv_yuv_window_setup (struct ivtv *itv, struct yuv_frame_info *windo

/* If there's nothing to safe to display, we may as well stop now */
if ((int)window->dst_w <= 2 || (int)window->dst_h <= 2 || (int)window->src_w <= 2 || (int)window->src_h <= 2) {
return 0;
return IVTV_YUV_UPDATE_INVALID;
}

/* Ensure video remains inside OSD area */
Expand Down Expand Up @@ -791,7 +791,7 @@ static u32 ivtv_yuv_window_setup (struct ivtv *itv, struct yuv_frame_info *windo

/* Check again. If there's nothing to safe to display, stop now */
if ((int)window->dst_w <= 2 || (int)window->dst_h <= 2 || (int)window->src_w <= 2 || (int)window->src_h <= 2) {
return 0;
return IVTV_YUV_UPDATE_INVALID;
}

/* Both x offset & width are linked, so they have to be done together */
Expand Down Expand Up @@ -840,12 +840,17 @@ void ivtv_yuv_work_handler (struct ivtv *itv)
if (!(yuv_update = ivtv_yuv_window_setup (itv, &window)))
return;

/* Update horizontal settings */
if (yuv_update & IVTV_YUV_UPDATE_HORIZONTAL)
ivtv_yuv_handle_horizontal(itv, &window);
if (yuv_update & IVTV_YUV_UPDATE_INVALID) {
write_reg(0x01008080, 0x2898);
} else if (yuv_update) {
write_reg(0x00108080, 0x2898);

if (yuv_update & IVTV_YUV_UPDATE_VERTICAL)
ivtv_yuv_handle_vertical(itv, &window);
if (yuv_update & IVTV_YUV_UPDATE_HORIZONTAL)
ivtv_yuv_handle_horizontal(itv, &window);

if (yuv_update & IVTV_YUV_UPDATE_VERTICAL)
ivtv_yuv_handle_vertical(itv, &window);
}

memcpy(&itv->yuv_info.old_frame_info, &window, sizeof (itv->yuv_info.old_frame_info));
}
Expand Down Expand Up @@ -936,9 +941,6 @@ static void ivtv_yuv_init (struct ivtv *itv)
IVTV_DEBUG_WARN ("Failed to allocate yuv blanking buffer\n");
}

IVTV_DEBUG_WARN("Enable video output\n");
write_reg_sync(0x00108080, 0x2898);

/* Enable YUV decoder output */
write_reg_sync(0x01, IVTV_REG_VDM);

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/ivtv/ivtv-yuv.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

#define IVTV_YUV_UPDATE_HORIZONTAL 0x01
#define IVTV_YUV_UPDATE_VERTICAL 0x02
#define IVTV_YUV_UPDATE_INVALID 0x04

extern const u32 yuv_offset[4];

Expand Down

0 comments on commit 5b4b247

Please sign in to comment.