diff options
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 301ef197d038..70ea578d6266 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -2459,6 +2459,19 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf, | |||
2459 | hdw,hdw_desc->description); | 2459 | hdw,hdw_desc->description); |
2460 | pvr2_trace(PVR2_TRACE_INFO, "Hardware description: %s", | 2460 | pvr2_trace(PVR2_TRACE_INFO, "Hardware description: %s", |
2461 | hdw_desc->description); | 2461 | hdw_desc->description); |
2462 | if (hdw_desc->flag_is_experimental) { | ||
2463 | pvr2_trace(PVR2_TRACE_INFO, "**********"); | ||
2464 | pvr2_trace(PVR2_TRACE_INFO, | ||
2465 | "WARNING: Support for this device (%s) is" | ||
2466 | " experimental.", hdw_desc->description); | ||
2467 | pvr2_trace(PVR2_TRACE_INFO, | ||
2468 | "Important functionality might not be" | ||
2469 | " entirely working."); | ||
2470 | pvr2_trace(PVR2_TRACE_INFO, | ||
2471 | "Please consider contacting the driver author to" | ||
2472 | " help with further stabilization of the driver."); | ||
2473 | pvr2_trace(PVR2_TRACE_INFO, "**********"); | ||
2474 | } | ||
2462 | if (!hdw) goto fail; | 2475 | if (!hdw) goto fail; |
2463 | 2476 | ||
2464 | init_timer(&hdw->quiescent_timer); | 2477 | init_timer(&hdw->quiescent_timer); |
@@ -3056,14 +3069,14 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw) | |||
3056 | } | 3069 | } |
3057 | 3070 | ||
3058 | if (hdw->res_hor_dirty || hdw->res_ver_dirty || hdw->force_dirty) { | 3071 | if (hdw->res_hor_dirty || hdw->res_ver_dirty || hdw->force_dirty) { |
3059 | struct v4l2_format fmt; | 3072 | struct v4l2_mbus_framefmt fmt; |
3060 | memset(&fmt, 0, sizeof(fmt)); | 3073 | memset(&fmt, 0, sizeof(fmt)); |
3061 | fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 3074 | fmt.width = hdw->res_hor_val; |
3062 | fmt.fmt.pix.width = hdw->res_hor_val; | 3075 | fmt.height = hdw->res_ver_val; |
3063 | fmt.fmt.pix.height = hdw->res_ver_val; | 3076 | fmt.code = V4L2_MBUS_FMT_FIXED; |
3064 | pvr2_trace(PVR2_TRACE_CHIPS, "subdev v4l2 set_size(%dx%d)", | 3077 | pvr2_trace(PVR2_TRACE_CHIPS, "subdev v4l2 set_size(%dx%d)", |
3065 | fmt.fmt.pix.width, fmt.fmt.pix.height); | 3078 | fmt.width, fmt.height); |
3066 | v4l2_device_call_all(&hdw->v4l2_dev, 0, video, s_fmt, &fmt); | 3079 | v4l2_device_call_all(&hdw->v4l2_dev, 0, video, s_mbus_fmt, &fmt); |
3067 | } | 3080 | } |
3068 | 3081 | ||
3069 | if (hdw->srate_dirty || hdw->force_dirty) { | 3082 | if (hdw->srate_dirty || hdw->force_dirty) { |
@@ -4084,12 +4097,20 @@ void pvr2_hdw_device_reset(struct pvr2_hdw *hdw) | |||
4084 | 4097 | ||
4085 | void pvr2_hdw_cpureset_assert(struct pvr2_hdw *hdw,int val) | 4098 | void pvr2_hdw_cpureset_assert(struct pvr2_hdw *hdw,int val) |
4086 | { | 4099 | { |
4087 | char da[1]; | 4100 | char *da; |
4088 | unsigned int pipe; | 4101 | unsigned int pipe; |
4089 | int ret; | 4102 | int ret; |
4090 | 4103 | ||
4091 | if (!hdw->usb_dev) return; | 4104 | if (!hdw->usb_dev) return; |
4092 | 4105 | ||
4106 | da = kmalloc(16, GFP_KERNEL); | ||
4107 | |||
4108 | if (da == NULL) { | ||
4109 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | ||
4110 | "Unable to allocate memory to control CPU reset"); | ||
4111 | return; | ||
4112 | } | ||
4113 | |||
4093 | pvr2_trace(PVR2_TRACE_INIT,"cpureset_assert(%d)",val); | 4114 | pvr2_trace(PVR2_TRACE_INIT,"cpureset_assert(%d)",val); |
4094 | 4115 | ||
4095 | da[0] = val ? 0x01 : 0x00; | 4116 | da[0] = val ? 0x01 : 0x00; |
@@ -4103,6 +4124,8 @@ void pvr2_hdw_cpureset_assert(struct pvr2_hdw *hdw,int val) | |||
4103 | "cpureset_assert(%d) error=%d",val,ret); | 4124 | "cpureset_assert(%d) error=%d",val,ret); |
4104 | pvr2_hdw_render_useless(hdw); | 4125 | pvr2_hdw_render_useless(hdw); |
4105 | } | 4126 | } |
4127 | |||
4128 | kfree(da); | ||
4106 | } | 4129 | } |
4107 | 4130 | ||
4108 | 4131 | ||