From patchwork Tue Sep 25 06:09:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 1502001 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork1.kernel.org (Postfix) with ESMTP id B80623FC71 for ; Tue, 25 Sep 2012 06:11:15 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8P69PbY010567; Tue, 25 Sep 2012 01:09:25 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8P69PZa029490; Tue, 25 Sep 2012 01:09:25 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Tue, 25 Sep 2012 01:09:25 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8P69PQj009849; Tue, 25 Sep 2012 01:09:25 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 2382C80627; Tue, 25 Sep 2012 01:09:25 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 0424A80626 for ; Tue, 25 Sep 2012 01:09:23 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id q8P69MdM020526 for ; Tue, 25 Sep 2012 01:09:22 -0500 (CDT) Received: from psmtp.com (na3sys009amx232.postini.com [74.125.149.116]) by red.ext.ti.com (8.13.7/8.13.7) with SMTP id q8P69LOc020459 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 25 Sep 2012 01:09:22 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]) (using TLSv1) by na3sys009amx232.postini.com ([74.125.148.10]) with SMTP; Tue, 25 Sep 2012 16:09:22 EST Received: by pbbrp2 with SMTP id rp2so2604909pbb.4 for ; Mon, 24 Sep 2012 23:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=3Ke5buBqilE6too7A9zaCPLOsbe9lGTSwGfJLDgQdH0=; b=hojUWJQ3bcC288RYjx3Qs6oDwUQLplsK4JGon1NrSktMf/ix+BHHL1AbPTUEILHH+a OgjqV3TL7vORpTqJ7XWwKM7R/M0pOGHTgcX+z7UvIXGZDW7a5Gm3742vSfeI6Z0ZdF08 N2HPp/Gf4kntgEfrryh+N+17VPKBZFf3CZ6r7aQzpaS67QIo7glqBb3WBrPl5ZMxvWAQ pDmJQ4/haghkoHQPxV1lpuKCTD2eYqshWStiXjUHMCzPGY2OUBS3y/+tbds+Z9J2MBzA H7jOt9TxO0xZwVd7pX4SKBqe1+S556Hf2ofH0jYzfeOrd2MtE0FeHnqwRky46S5PWZsC naJA== Received: by 10.66.79.195 with SMTP id l3mr38116913pax.33.1348553360862; Mon, 24 Sep 2012 23:09:20 -0700 (PDT) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id j9sm9966098pav.15.2012.09.24.23.09.15 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 23:09:19 -0700 (PDT) From: Prabhakar To: LMML Subject: [PATCH v4] media: v4l2-ctrls: add control for test pattern Date: Tue, 25 Sep 2012 11:39:05 +0530 Message-ID: <1348553345-14296-1-git-send-email-prabhakar.lad@ti.com> X-Mailer: git-send-email 1.7.4.1 X-pstn-levels: (S:73.07358/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:88.1613 C:98.6951 ) X-pstn-dkim: 1 skipped:not-enabled X-pstn-settings: 2 (0.5000:0.0050) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [82/3] CC: DLOS , Rob Landley , LDOC , VGER , Mauro Carvalho Chehab , Hans de Goede , Kyungmin Park , Sakari Ailus , Sylwester Nawrocki , Hans Verkuil X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Lad, Prabhakar add V4L2_CID_TEST_PATTERN of type menu, which determines the internal test pattern selected by the device. Signed-off-by: Lad, Prabhakar Signed-off-by: Manjunath Hadli Acked-by: Sakari Ailus Cc: Hans Verkuil Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Sylwester Nawrocki Cc: Hans de Goede Cc: Kyungmin Park Cc: Rob Landley Acked-by: Hans Verkuil Acked-by: Sakari Ailus --- This patches has one checkpatch warning for line over 80 characters altough it can be avoided I have kept it for consistency. Changes for v4: 1: Fixed some grammar/style issues, pointed by Hans. Changes for v3: 1: Removed the menu for test pattern, pointed by Sakari. Changes for v2: 1: Included display devices in the description for test pattern as pointed by Hans. 2: In the menu replaced 'Test Pattern Disabled' by 'Disabled' as pointed by Sylwester. 3: Removed the test patterns from menu as the are hardware specific as pointed by Sakari. Documentation/DocBook/media/v4l/controls.xml | 10 ++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 2 ++ include/linux/videodev2.h | 1 + 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index f0fb08d..5450d31 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -4313,6 +4313,16 @@ interface and may change in the future. + + V4L2_CID_TEST_PATTERN + menu + + + Some capture/display/sensor devices have + the capability to generate test pattern images. These hardware + specific test patterns can be used to test if a device is working + properly. + diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 8f2f40b..41b7732 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -740,6 +740,7 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_LINK_FREQ: return "Link Frequency"; case V4L2_CID_PIXEL_RATE: return "Pixel Rate"; case V4L2_CID_DPCM_PREDICTOR: return "DPCM Predictor"; + case V4L2_CID_TEST_PATTERN: return "Test Pattern"; default: return NULL; @@ -841,6 +842,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_EXPOSURE_METERING: case V4L2_CID_SCENE_MODE: case V4L2_CID_DPCM_PREDICTOR: + case V4L2_CID_TEST_PATTERN: *type = V4L2_CTRL_TYPE_MENU; break; case V4L2_CID_LINK_FREQ: diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index ca9fb78..7014c0b 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -2005,6 +2005,7 @@ enum v4l2_dpcm_predictor { V4L2_DPCM_PREDICTOR_SIMPLE = 0, V4L2_DPCM_PREDICTOR_ADVANCED = 1, }; +#define V4L2_CID_TEST_PATTERN (V4L2_CID_IMAGE_PROC_CLASS_BASE + 4) /* * T U N I N G