diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtvfb.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtvfb.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index 49e1a283ed36..9ff3425891ed 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c | |||
@@ -1066,7 +1066,11 @@ static int ivtvfb_init_io(struct ivtv *itv) | |||
1066 | } | 1066 | } |
1067 | mutex_unlock(&itv->serialize_lock); | 1067 | mutex_unlock(&itv->serialize_lock); |
1068 | 1068 | ||
1069 | ivtvfb_get_framebuffer(itv, &oi->video_rbase, &oi->video_buffer_size); | 1069 | if (ivtvfb_get_framebuffer(itv, &oi->video_rbase, |
1070 | &oi->video_buffer_size) < 0) { | ||
1071 | IVTVFB_ERR("Firmware failed to respond\n"); | ||
1072 | return -EIO; | ||
1073 | } | ||
1070 | 1074 | ||
1071 | /* The osd buffer size depends on the number of video buffers allocated | 1075 | /* The osd buffer size depends on the number of video buffers allocated |
1072 | on the PVR350 itself. For now we'll hardcode the smallest osd buffer | 1076 | on the PVR350 itself. For now we'll hardcode the smallest osd buffer |
@@ -1158,8 +1162,11 @@ static int ivtvfb_init_card(struct ivtv *itv) | |||
1158 | } | 1162 | } |
1159 | 1163 | ||
1160 | /* Find & setup the OSD buffer */ | 1164 | /* Find & setup the OSD buffer */ |
1161 | if ((rc = ivtvfb_init_io(itv))) | 1165 | rc = ivtvfb_init_io(itv); |
1166 | if (rc) { | ||
1167 | ivtvfb_release_buffers(itv); | ||
1162 | return rc; | 1168 | return rc; |
1169 | } | ||
1163 | 1170 | ||
1164 | /* Set the startup video mode information */ | 1171 | /* Set the startup video mode information */ |
1165 | if ((rc = ivtvfb_init_vidmode(itv))) { | 1172 | if ((rc = ivtvfb_init_vidmode(itv))) { |
@@ -1210,6 +1217,7 @@ static int ivtvfb_callback_cleanup(struct device *dev, void *p) | |||
1210 | { | 1217 | { |
1211 | struct v4l2_device *v4l2_dev = dev_get_drvdata(dev); | 1218 | struct v4l2_device *v4l2_dev = dev_get_drvdata(dev); |
1212 | struct ivtv *itv = container_of(v4l2_dev, struct ivtv, v4l2_dev); | 1219 | struct ivtv *itv = container_of(v4l2_dev, struct ivtv, v4l2_dev); |
1220 | struct osd_info *oi = itv->osd_info; | ||
1213 | 1221 | ||
1214 | if (itv && (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) { | 1222 | if (itv && (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) { |
1215 | if (unregister_framebuffer(&itv->osd_info->ivtvfb_info)) { | 1223 | if (unregister_framebuffer(&itv->osd_info->ivtvfb_info)) { |
@@ -1218,7 +1226,7 @@ static int ivtvfb_callback_cleanup(struct device *dev, void *p) | |||
1218 | return 0; | 1226 | return 0; |
1219 | } | 1227 | } |
1220 | IVTVFB_INFO("Unregister framebuffer %d\n", itv->instance); | 1228 | IVTVFB_INFO("Unregister framebuffer %d\n", itv->instance); |
1221 | ivtvfb_blank(FB_BLANK_POWERDOWN, &itv->osd_info->ivtvfb_info); | 1229 | ivtvfb_blank(FB_BLANK_VSYNC_SUSPEND, &oi->ivtvfb_info); |
1222 | ivtvfb_release_buffers(itv); | 1230 | ivtvfb_release_buffers(itv); |
1223 | itv->osd_video_pbase = 0; | 1231 | itv->osd_video_pbase = 0; |
1224 | } | 1232 | } |