public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luca Risolia <luca.risolia@studio.unibo.it>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.9-rc1-mm1] Disable colour conversion in the CPiA Video Camera driver
Date: Mon, 30 Aug 2004 10:10:18 +0200	[thread overview]
Message-ID: <20040830081018.GA3206@studio.unibo.it> (raw)

[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

Given that colour conversion is not allowed in kernel space, this patch
disables it in the CPiA driver. The routines implementing the conversions
can be removed at all by the maintainers of the driver; however, this
patch is a good starting point and makes someone happy.

I have already submitted this patch to both the V4L mailing list
and the V4L maintainer two months ago, but it has been ignored for
some unknown reasons, so here it is again.

Please apply.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>

--- devel-2.6.8/drivers/media/video/cpia.c.orig	2004-08-29 11:28:14.000000000 +0200
+++ devel-2.6.8/drivers/media/video/cpia.c	2004-08-29 11:29:55.000000000 +0200
@@ -1428,14 +1428,8 @@ static void __exit proc_cpia_destroy(voi
 /* supported frame palettes and depths */
 static inline int valid_mode(u16 palette, u16 depth)
 {
-	return (palette == VIDEO_PALETTE_GREY && depth == 8) ||
-	       (palette == VIDEO_PALETTE_RGB555 && depth == 16) ||
-	       (palette == VIDEO_PALETTE_RGB565 && depth == 16) ||
-	       (palette == VIDEO_PALETTE_RGB24 && depth == 24) ||
-	       (palette == VIDEO_PALETTE_RGB32 && depth == 32) ||
-	       (palette == VIDEO_PALETTE_YUV422 && depth == 16) ||
-	       (palette == VIDEO_PALETTE_YUYV && depth == 16) ||
-	       (palette == VIDEO_PALETTE_UYVY && depth == 16);
+	return (palette == VIDEO_PALETTE_YUV422 && depth == 16) ||
+	       (palette == VIDEO_PALETTE_YUYV && depth == 16);
 }
 
 static int match_videosize( int width, int height )

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2004-08-30  7:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-30  8:10 Luca Risolia [this message]
     [not found] <20040830013201.7d153288.akpm@osdl.org>
2004-08-30 13:32 ` [PATCH 2.6.9-rc1-mm1] Disable colour conversion in the CPiA Video Camera driver Gerd Knorr
2004-08-30 18:31   ` Luca Risolia
2004-08-31 17:52     ` Gerd Knorr
2004-08-31 18:05       ` Alan Cox
2004-09-01  6:07       ` Luca Risolia
2004-08-31 15:10   ` Bill Davidsen

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=20040830081018.GA3206@studio.unibo.it \
    --to=luca.risolia@studio.unibo.it \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox