From patchwork Mon May 3 07:39:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 96445 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o437dcoK025469 for ; Mon, 3 May 2010 07:39:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753538Ab0ECHjg (ORCPT ); Mon, 3 May 2010 03:39:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39977 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752975Ab0ECHjg (ORCPT ); Mon, 3 May 2010 03:39:36 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o437dZBK029087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 3 May 2010 03:39:35 -0400 Received: from [10.3.224.13] (vpn-224-13.phx2.redhat.com [10.3.224.13]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o437dW06000692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 3 May 2010 03:39:34 -0400 Message-ID: <4BDE7DB4.7030706@redhat.com> Date: Mon, 03 May 2010 04:39:32 -0300 From: Mauro Carvalho Chehab User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: "linux-media >> Linux Media Mailing List" Subject: [PATCH] Fix colorspace on tm6010 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 03 May 2010 07:39:38 +0000 (UTC) diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index 860553f..bfbc53b 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -156,10 +156,13 @@ int tm6000_get_reg32 (struct tm6000_core *dev, u8 req, u16 value, u16 index) void tm6000_set_fourcc_format(struct tm6000_core *dev) { if (dev->dev_type == TM6010) { + int val; + + val = tm6000_get_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, 0) & 0xfc; if (dev->fourcc == V4L2_PIX_FMT_UYVY) - tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0); + tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, val); else - tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0x90); + tm6000_set_reg(dev, TM6010_REQ07_RCC_ACTIVE_VIDEO_IF, val | 1); } else { if (dev->fourcc == V4L2_PIX_FMT_UYVY) tm6000_set_reg(dev, TM6010_REQ07_RC1_TRESHOLD, 0xd0); diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 4444487..9554472 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -149,8 +149,8 @@ static inline void get_next_buf(struct tm6000_dmaqueue *dma_q, /* Cleans up buffer - Usefull for testing for frame/URB loss */ outp = videobuf_to_vmalloc(&(*buf)->vb); - if (outp) - memset(outp, 0, (*buf)->vb.size); +// if (outp) +// memset(outp, 0, (*buf)->vb.size); return; }