From patchwork Mon Sep 24 12:53:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 1497561 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C8D32DF280 for ; Mon, 24 Sep 2012 12:54:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755480Ab2IXMy1 (ORCPT ); Mon, 24 Sep 2012 08:54:27 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:48966 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751997Ab2IXMyX (ORCPT ); Mon, 24 Sep 2012 08:54:23 -0400 Received: by pbbrr4 with SMTP id rr4so7099144pbb.19 for ; Mon, 24 Sep 2012 05:54:22 -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:in-reply-to:references; bh=p2zifRcLOl885zBywdGWdXoDwAJTp+QbxAInS4ibSU0=; b=JKyTSt+QNtfoxvgjK86NlQA3AG0IWnrJbSFLDn9RwIDj2hAY2vvmuTFUc76q7p4hJn rzlJ3N/E1298J5Dstgwna5wZKxPOhX0fTJpKv0BpO/dK3ESl7p8LFFkY6x7H0ed49N5s uBvV9kTiBWcI3GBxzswIOBBz5AAo5Q4Ke0DMTW8oAG3Q/157+d67DWl8w3P8QEob8X9e LvoIt9c1xYzpYPdjq68Mda8wMMHIeI1+1wq7gDSagrXPEuqD87JSpW+v7ztRF0VyZ5iv nybfFRVkPlYS7rAyf2SOtCDdzcjsI1VL5FH0N9HoFcv0yteGkNWAuk9/FFoFXkIeGRub BSnw== Received: by 10.68.204.169 with SMTP id kz9mr36514754pbc.39.1348491262622; Mon, 24 Sep 2012 05:54:22 -0700 (PDT) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id sr3sm9617540pbc.44.2012.09.24.05.54.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 05:54:21 -0700 (PDT) From: Prabhakar To: LMML Cc: DLOS , LDOC , Mauro Carvalho Chehab , VGER , "Lad, Prabhakar" , Manjunath Hadli , Hans Verkuil , Laurent Pinchart , Sylwester Nawrocki , Hans de Goede , Kyungmin Park , Rob Landley Subject: [PATCH v3] media: v4l2-ctrls: add control for test pattern Date: Mon, 24 Sep 2012 18:23:41 +0530 Message-Id: <1348491221-6068-2-git-send-email-prabhakar.lad@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1348491221-6068-1-git-send-email-prabhakar.lad@ti.com> References: <1348491221-6068-1-git-send-email-prabhakar.lad@ti.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 --- This patches has one checkpatch warning for line over 80 characters altough it can be avoided I have kept it for consistency. 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..51e9c4e 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 + + + The Capture/Display/Sensors have the capability + to generate internal test patterns and this are hardware specific. This + test patterns are used to test a device is properly working and can generate + the desired waveforms that it supports. + 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