From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756593Ab2ICTjz (ORCPT ); Mon, 3 Sep 2012 15:39:55 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:37697 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756327Ab2ICTjx (ORCPT ); Mon, 3 Sep 2012 15:39:53 -0400 Date: Mon, 3 Sep 2012 22:39:47 +0300 From: Sakari Ailus To: Prabhakar Lad Cc: LMML , dlos , linux-kernel@vger.kernel.org, Manjunath Hadli , Laurent Pinchart , linux-doc@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sylwester Nawrocki , Hans de Goede , Kyungmin Park , Rob Landley , HeungJun Kim Subject: Re: [PATCH] media: v4l2-ctrls: add control for test pattern Message-ID: <20120903193947.GD6834@valkosipuli.retiisi.org.uk> References: <1346663777-23149-1-git-send-email-prabhakar.lad@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1346663777-23149-1-git-send-email-prabhakar.lad@ti.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prabhakar, Thanks for the patch. On Mon, Sep 03, 2012 at 02:46:17PM +0530, Prabhakar Lad wrote: > 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 > Cc: 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 > Cc: HeungJun Kim > 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. > > Documentation/DocBook/media/v4l/controls.xml | 52 ++++++++++++++++++++++++++ > drivers/media/v4l2-core/v4l2-ctrls.c | 16 ++++++++ > include/linux/videodev2.h | 12 ++++++ > 3 files changed, 80 insertions(+), 0 deletions(-) > > diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml > index f704218..06f16e7 100644 > --- a/Documentation/DocBook/media/v4l/controls.xml > +++ b/Documentation/DocBook/media/v4l/controls.xml > @@ -4313,6 +4313,58 @@ interface and may change in the future. > > > > + > + V4L2_CID_TEST_PATTERN > + menu > + > + > + The capture devices/sensors have the capability to > + generate internal test patterns. This test patterns are used to test a device > + is properly working and can generate the desired waveforms that it supports. > + > + > + > + > + > + > + V4L2_TEST_PATTERN_DISABLED > + Test pattern generation is disabled > + > + > + V4L2_TEST_PATTERN_VERTICAL_LINES > + Generate vertical lines as test pattern > + > + > + V4L2_TEST_PATTERN_HORIZONTAL_LINES > + Generate horizontal lines as test pattern > + > + > + V4L2_TEST_PATTERN_DIAGONAL_LINES > + Generate diagonal lines as test pattern > + > + > + V4L2_TEST_PATTERN_SOLID_BLACK > + Generate solid black color as test pattern > + > + > + V4L2_TEST_PATTERN_SOLID_WHITE > + Generate solid white color as test pattern > + > + > + V4L2_TEST_PATTERN_SOLID_BLUE > + Generate solid blue color as test pattern > + > + > + V4L2_TEST_PATTERN_SOLID_RED > + Generate solid red color as test pattern > + > + > + V4L2_TEST_PATTERN_CHECKER_BOARD > + Generate a checker board as test pattern > + You're defining 8 different test patterns based on a single device, I guess? As the test patterns are not standardised, I'd suppose that if another driver implements the same control, it would require another n menu items added to the same standard menu. That way we'd run quickly out of menu items as the maximum is 32. For this reason I'd leave the items in the menu up to the driver that implements the control, until we have more information on the test patterns different devices implement --- as discussed earlier. Kind regards, -- Sakari Ailus e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk