Return-path: Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mBG8t5sw027043 for ; Tue, 16 Dec 2008 03:55:05 -0500 Received: from mail03.idc.renesas.com (mail.renesas.com [202.234.163.13]) by mx3.redhat.com (8.13.8/8.13.8) with ESMTP id mBG8reqj011387 for ; Tue, 16 Dec 2008 03:53:40 -0500 Date: Tue, 16 Dec 2008 17:53:34 +0900 From: morimoto.kuninori@renesas.com In-reply-to: To: Guennadi Liakhovetski Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII References: Cc: V4L-Linux Subject: Re: [PATCH v3] Add tw9910 driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: video4linux-list-bounces@redhat.com Errors-To: video4linux-list-bounces@redhat.com List-ID: Dear Guennadi Thank you for checking my patch > > +static int tw9910_try_fmt(struct soc_camera_device *icd, > > + struct v4l2_format *f) > > +{ > > + struct v4l2_pix_format *pix = &f->fmt.pix; > > + __u32 wmax = (__u32)icd->width_max; > > + __u32 wmin = (__u32)icd->width_min; > > + __u32 hmax = (__u32)icd->height_max; > > + __u32 hmin = (__u32)icd->height_min; > > + > > + pix->width = min(pix->width, wmax); > > + pix->width = max(pix->width, wmin); > > + pix->height = min(pix->height, hmax); > > + pix->height = max(pix->height, hmin); > > + > > + pix->field = V4L2_FIELD_INTERLACED; > > + > > + return 0; > > +} > > You forgot to fix this one. Please, look again what O've written to you > regarding this function. You may replace the field, if it is > V4L2_FIELD_ANY, but if it is something different, you have to return > -EINVAL. Sorry I forget to tell you about this. I tried it. but pix->field was V4L2_FIELD_NONE when tw9910_try_fmt was 1st called. debug code is like this ---------------------------------------------------------- static int tw9910_try_fmt(struct soc_camera_device *icd, struct v4l2_format *f) { struct v4l2_pix_format *pix = &f->fmt.pix; .... if(pix->field == V4L2_FIELD_NONE) printk("V4L2_FIELD_NONE\n") if(pix->field == V4L2_FIELD_ANY) printk("V4L2_FIELD_ANY\n") if(pix->field == V4L2_FIELD_NONE) printk("V4L2_FIELD_INTERLACED\n") ... } ---------------------------------------------------------- answer is ---------------------------------------------------------- ... V4L2_FIELD_NONE V4L2_FIELD_ANY V4L2_FIELD_INTERLACED V4L2_FIELD_ANY ... ---------------------------------------------------------- I just removed field check from soc_camera.c :: soc_camera_fry_fmt_vid_cap It it not enough ? Best regards -- Kuninori Morimoto -- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list