All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: linux-media@vger.kernel.org,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Eric Miao <eric.y.miao@gmail.com>
Subject: [PATCH 1/3] Add RGB555X and RGB565X formats to pxa-camera
Date: Sat, 22 Aug 2009 08:48:26 +0200	[thread overview]
Message-ID: <200908220848.26702.marek.vasut@gmail.com> (raw)

>From 287b146839e3f96b34336f40e1ab7b154cd58a64 Mon Sep 17 00:00:00 2001
From: Marek Vasut <marek.vasut@gmail.com>
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 <marek.vasut@gmail.com>
---
 drivers/media/video/pxa_camera.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

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;
 	}
@@ -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;
-- 
1.6.3.3

                 reply	other threads:[~2009-08-22  6:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908220848.26702.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=eric.y.miao@gmail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.