RE: [REVIEW PATCH 04/14] OMAP: CAM: Add ISP user header and register defs

2009-01-14 Thread Aguirre Rodriguez, Sergio Alberto


 -Original Message-
 From: Mauro Carvalho Chehab [mailto:mche...@infradead.org]
 Sent: Tuesday, January 13, 2009 2:42 PM
 To: Aguirre Rodriguez, Sergio Alberto
 Cc: linux-omap@vger.kernel.org; linux-me...@vger.kernel.org; video4linux-
 l...@redhat.com; Sakari Ailus; Tuukka.O Toivonen; Nagalla, Hari
 Subject: Re: [REVIEW PATCH 04/14] OMAP: CAM: Add ISP user header and
 register defs

 On Mon, 12 Jan 2009 20:03:15 -0600
 Aguirre Rodriguez, Sergio Alberto saagui...@ti.com wrote:

  +/* ISP Private IOCTLs */
  +#define VIDIOC_PRIVATE_ISP_CCDC_CFG\
  +   _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct
 ispccdc_update_config)
  +#define VIDIOC_PRIVATE_ISP_PRV_CFG \
  +   _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct ispprv_update_config)
  +#define VIDIOC_PRIVATE_ISP_AEWB_CFG \
  +   _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct isph3a_aewb_config)
  +#define VIDIOC_PRIVATE_ISP_AEWB_REQ \
  +   _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct isph3a_aewb_data)
  +#define VIDIOC_PRIVATE_ISP_HIST_CFG \
  +   _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct isp_hist_config)
  +#define VIDIOC_PRIVATE_ISP_HIST_REQ \
  +   _IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct isp_hist_data)
  +#define VIDIOC_PRIVATE_ISP_AF_CFG \
  +   _IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct af_configuration)
  +#define VIDIOC_PRIVATE_ISP_AF_REQ \
  +   _IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct isp_af_data)

 Are those new ioctl meant to be used by the userspace API? If so, we need
 to
 understand each one, since maybe some of them make some sense to be in the
 public API. Also, a proper documentation should be provided for all of
 those
 ioctls.

Yes, this Private IOCTLs that we added to the driver are currently being used 
by some of our customers by their userspace applications that contain algos for 
performing Auto Focus, AutoExposure, Auto White Balance, and some other gain 
table programming into the driver. A description of each one is shown below:


OMAP3 ISP driver Private IOCTLs explanation

- VIDIOC_PRIVATE_ISP_CCDC_CFG: Configures the OMAP3 ISP CCDC module settings 
contained in struct ispccdc_update_config (defined in 
arch/arm/plat-omap/include/mach/isp_user.h).

/**
 * ispccdc_update_config - Structure for CCDC configuration.
 * @update: Specifies which CCDC registers should be updated.
 * @flag: Specifies which CCDC functions should be enabled.
 * @alawip: Enable/Disable A-Law compression.
 * @bclamp: Black clamp control register.
 * @blcomp: Black level compensation value for RGrGbB Pixels. 2's complement.
 * @fpc: Number of faulty pixels corrected in the frame, address of FPC table.
 * @cull: Cull control register.
 * @colptn: Color pattern of the sensor.
 * @lsc: Pointer to LSC gain table.
 */
struct ispccdc_update_config {
__u16 update;
__u16 flag;
enum alaw_ipwidth alawip;
struct ispccdc_bclamp *bclamp;
struct ispccdc_blcomp *blcomp;
struct ispccdc_fpc *fpc;
struct ispccdc_lsc_config *lsc_cfg;
struct ispccdc_culling *cull;
__u32 colptn;
__u8 *lsc;
};

- VIDIOC_PRIVATE_ISP_PRV_CFG: Configures the OMAP3 ISP Preview module settings 
contained in struct ispprv_update_config (defined in 
arch/arm/plat-omap/include/mach/isp_user.h).

/**
 * struct ispprv_update_config - Structure for Preview Configuration (user).
 * @update: Specifies which ISP Preview registers should be updated.
 * @flag: Specifies which ISP Preview functions should be enabled.
 * @yen: Pointer to luma enhancement table.
 * @shading_shift: 3bit value of shift used in shading compensation.
 * @prev_hmed: Pointer to structure containing the odd and even distance.
 * between the pixels in the image along with the filter threshold.
 * @prev_cfa: Pointer to structure containing the CFA interpolation table, CFA.
 *format in the image, vertical and horizontal gradient threshold.
 * @csup: Pointer to Structure for Chrominance Suppression coefficients.
 * @prev_wbal: Pointer to structure for White Balance.
 * @prev_blkadj: Pointer to structure for Black Adjustment.
 * @rgb2rgb: Pointer to structure for RGB to RGB Blending.
 * @prev_csc: Pointer to structure for Color Space Conversion from RGB-YCbYCr.
 * @yclimit: Pointer to structure for Y, C Value Limit.
 * @prev_dcor: Pointer to structure for defect correction.
 * @prev_nf: Pointer to structure for Noise Filter
 * @red_gamma: Pointer to red gamma correction table.
 * @green_gamma: Pointer to green gamma correction table.
 * @blue_gamma: Pointer to blue gamma correction table.
 */
struct ispprv_update_config {
__u16 update;
__u16 flag;
void *yen;
__u32 shading_shift;
struct ispprev_hmed *prev_hmed;
struct ispprev_cfa *prev_cfa;
struct ispprev_csup *csup;
struct ispprev_wbal *prev_wbal;
struct ispprev_blkadj *prev_blkadj;
struct ispprev_rgbtorgb *rgb2rgb

Re: [REVIEW PATCH 04/14] OMAP: CAM: Add ISP user header and register defs

2009-01-13 Thread Trilok Soni
Hi Sergio,

 +++ b/arch/arm/plat-omap/include/mach/isp_user.h
 @@ -0,0 +1,668 @@
 +/*
 + * include/asm-arm/arch-omap/isp_user.h
 + *

Path doesn't match. Better remove paths from all files, as they keep
changing, and maintaining them is hard.


-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html