From patchwork Sat Aug 22 06:48:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 43297 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7M6msUN027926 for ; Sat, 22 Aug 2009 06:48:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933234AbZHVGsu (ORCPT ); Sat, 22 Aug 2009 02:48:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933230AbZHVGsu (ORCPT ); Sat, 22 Aug 2009 02:48:50 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:36980 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933166AbZHVGsu convert rfc822-to-8bit (ORCPT ); Sat, 22 Aug 2009 02:48:50 -0400 Received: by bwz19 with SMTP id 19so755856bwz.37 for ; Fri, 21 Aug 2009 23:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:mime-version:content-type:content-transfer-encoding :message-id; bh=aOcn7YjYOVQbydMh6bwbNzAHcLs0q1esA0yCYwTL9ks=; b=du9mn8E1GfwEU/l5l+Rm8F/a3H2uP1i09rbfdmR9sWzJEelQpNC/eyxrJgj1moxs5o Vn5/nf8xmLva3qE/pwMCGXEKg4kuep4P6qJy7EnpsysPJ/yESInXeLt5gV+I3llncfex LXwl2I8TUW63RAbhnLamSq64ICaPjWDeoez4c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:mime-version :content-type:content-transfer-encoding:message-id; b=q0CpcRUaJbR899N1SkJNwxqlkGqgxQPuyVpoPpwdzsfkgv96khRmTYBZgY2czeg8w1 jOKh75a+DvVGm3KE7IsM4zjPqqdPM5KeWDzVQC9HzXPZcT2+Q0c46/M88fMsr5bcPu1x yrmvcL583ht7lke5wOtL2B+GTjqAUZ46Blcc4= Received: by 10.223.76.79 with SMTP id b15mr843876fak.66.1250923730201; Fri, 21 Aug 2009 23:48:50 -0700 (PDT) Received: from rin.localnet (85-132-216-250-eth3-gwfm10-user.802.cz [85.132.216.250]) by mx.google.com with ESMTPS id h2sm3776930fkh.16.2009.08.21.23.48.47 (version=SSLv3 cipher=RC4-MD5); Fri, 21 Aug 2009 23:48:48 -0700 (PDT) From: Marek Vasut Organization: Hack&Dev To: linux-media@vger.kernel.org, Guennadi Liakhovetski , Eric Miao Subject: [PATCH 1/3] Add RGB555X and RGB565X formats to pxa-camera Date: Sat, 22 Aug 2009 08:48:26 +0200 User-Agent: KMail/1.12.0 (Linux/2.6.30-1-amd64; KDE/4.3.0; x86_64; ; ) MIME-Version: 1.0 Message-Id: <200908220848.26702.marek.vasut@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From 287b146839e3f96b34336f40e1ab7b154cd58a64 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 22 Aug 2009 05:13:22 +0200 Subject: [PATCH 1/3] Add RGB555X and RGB565X formats to pxa-camera Those formats are requiered on widely used OmniVision OV96xx cameras. Those formats are nothing more then endian-swapped RGB555 and RGB565. Signed-off-by: Marek Vasut --- drivers/media/video/pxa_camera.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) } @@ -1240,6 +1242,8 @@ static int required_buswidth(const struct soc_camera_data_format *fmt) case V4L2_PIX_FMT_YVYU: case V4L2_PIX_FMT_RGB565: case V4L2_PIX_FMT_RGB555: + case V4L2_PIX_FMT_RGB565X: + case V4L2_PIX_FMT_RGB555X: return 8; default: return fmt->depth; @@ -1289,6 +1293,8 @@ static int pxa_camera_get_formats(struct soc_camera_device *icd, int idx, case V4L2_PIX_FMT_YVYU: case V4L2_PIX_FMT_RGB565: case V4L2_PIX_FMT_RGB555: + case V4L2_PIX_FMT_RGB565X: + case V4L2_PIX_FMT_RGB555X: formats++; if (xlate) { xlate->host_fmt = icd->formats + idx; diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 7c86ef9..ef5d293 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c @@ -1110,10 +1110,12 @@ static void pxa_camera_setup_cicr(struct soc_camera_device *icd, cicr1 |= CICR1_COLOR_SP_VAL(2); break; case V4L2_PIX_FMT_RGB555: + case V4L2_PIX_FMT_RGB555X: cicr1 |= CICR1_RGB_BPP_VAL(1) | CICR1_RGBT_CONV_VAL(2) | CICR1_TBIT | CICR1_COLOR_SP_VAL(1); break; case V4L2_PIX_FMT_RGB565: + case V4L2_PIX_FMT_RGB565X: cicr1 |= CICR1_COLOR_SP_VAL(1) | CICR1_RGB_BPP_VAL(2); break;