if (params->contrast != (contrast * ISPPRV_CONTRAST_UNITS)) {
params->contrast = contrast * ISPPRV_CONTRAST_UNITS;
- prev->update |= PREV_CONTRAST;
+ prev->update |= OMAP3ISP_PREV_CONTRAST;
}
}
if (params->brightness != (brightness * ISPPRV_BRIGHT_UNITS)) {
params->brightness = brightness * ISPPRV_BRIGHT_UNITS;
- prev->update |= PREV_BRIGHTNESS;
+ prev->update |= OMAP3ISP_PREV_BRIGHTNESS;
}
}
/* preview parameters update structure */
struct preview_update {
- int cfg_bit;
int feature_bit;
void (*config)(struct isp_prev_device *, const void *);
void (*enable)(struct isp_prev_device *, u8);
+ bool skip;
};
static struct preview_update update_attrs[] = {
- {OMAP3ISP_PREV_LUMAENH, PREV_LUMA_ENHANCE,
+ {OMAP3ISP_PREV_LUMAENH,
preview_config_luma_enhancement,
preview_enable_luma_enhancement},
- {OMAP3ISP_PREV_INVALAW, PREV_INVERSE_ALAW,
+ {OMAP3ISP_PREV_INVALAW,
NULL,
preview_enable_invalaw},
- {OMAP3ISP_PREV_HRZ_MED, PREV_HORZ_MEDIAN_FILTER,
+ {OMAP3ISP_PREV_HRZ_MED,
preview_config_hmed,
preview_enable_hmed},
- {OMAP3ISP_PREV_CFA, PREV_CFA,
+ {OMAP3ISP_PREV_CFA,
preview_config_cfa,
preview_enable_cfa},
- {OMAP3ISP_PREV_CHROMA_SUPP, PREV_CHROMA_SUPPRESS,
+ {OMAP3ISP_PREV_CHROMA_SUPP,
preview_config_chroma_suppression,
preview_enable_chroma_suppression},
- {OMAP3ISP_PREV_WB, PREV_WB,
+ {OMAP3ISP_PREV_WB,
preview_config_whitebalance,
NULL},
- {OMAP3ISP_PREV_BLKADJ, PREV_BLKADJ,
+ {OMAP3ISP_PREV_BLKADJ,
preview_config_blkadj,
NULL},
- {OMAP3ISP_PREV_RGB2RGB, PREV_RGB2RGB,
+ {OMAP3ISP_PREV_RGB2RGB,
preview_config_rgb_blending,
NULL},
- {OMAP3ISP_PREV_COLOR_CONV, PREV_COLOR_CONV,
+ {OMAP3ISP_PREV_COLOR_CONV,
preview_config_rgb_to_ycbcr,
NULL},
- {OMAP3ISP_PREV_YC_LIMIT, PREV_YCLIMITS,
+ {OMAP3ISP_PREV_YC_LIMIT,
preview_config_yc_range,
NULL},
- {OMAP3ISP_PREV_DEFECT_COR, PREV_DEFECT_COR,
+ {OMAP3ISP_PREV_DEFECT_COR,
preview_config_dcor,
preview_enable_dcor},
- {OMAP3ISP_PREV_GAMMABYPASS, PREV_GAMMA_BYPASS,
+ {OMAP3ISP_PREV_GAMMABYPASS,
NULL,
preview_enable_gammabypass},
- {OMAP3ISP_PREV_DRK_FRM_CAPTURE, PREV_DARK_FRAME_CAPTURE,
+ {OMAP3ISP_PREV_DRK_FRM_CAPTURE,
NULL,
preview_enable_drkframe_capture},
- {OMAP3ISP_PREV_DRK_FRM_SUBTRACT, PREV_DARK_FRAME_SUBTRACT,
+ {OMAP3ISP_PREV_DRK_FRM_SUBTRACT,
NULL,
preview_enable_drkframe},
- {OMAP3ISP_PREV_LENS_SHADING, PREV_LENS_SHADING,
+ {OMAP3ISP_PREV_LENS_SHADING,
preview_config_drkf_shadcomp,
preview_enable_drkframe},
- {OMAP3ISP_PREV_NF, PREV_NOISE_FILTER,
+ {OMAP3ISP_PREV_NF,
preview_config_noisefilter,
preview_enable_noisefilter},
- {OMAP3ISP_PREV_GAMMA, PREV_GAMMA,
+ {OMAP3ISP_PREV_GAMMA,
preview_config_gammacorrn,
NULL},
- {-1, PREV_CONTRAST,
+ {OMAP3ISP_PREV_CONTRAST,
preview_config_contrast,
- NULL},
- {-1, PREV_BRIGHTNESS,
+ NULL, true},
+ {OMAP3ISP_PREV_BRIGHTNESS,
preview_config_brightness,
- NULL},
+ NULL, true},
};
/*
}
switch (bit) {
- case PREV_HORZ_MEDIAN_FILTER:
+ case OMAP3ISP_PREV_HRZ_MED:
*param = ¶ms->hmed;
CHKARG(configs, config, hmed)
return sizeof(params->hmed);
- case PREV_NOISE_FILTER:
+ case OMAP3ISP_PREV_NF:
*param = ¶ms->nf;
CHKARG(configs, config, nf)
return sizeof(params->nf);
break;
- case PREV_CFA:
+ case OMAP3ISP_PREV_CFA:
*param = ¶ms->cfa;
CHKARG(configs, config, cfa)
return sizeof(params->cfa);
- case PREV_LUMA_ENHANCE:
+ case OMAP3ISP_PREV_LUMAENH:
*param = ¶ms->luma;
CHKARG(configs, config, luma)
return sizeof(params->luma);
- case PREV_CHROMA_SUPPRESS:
+ case OMAP3ISP_PREV_CHROMA_SUPP:
*param = ¶ms->csup;
CHKARG(configs, config, csup)
return sizeof(params->csup);
- case PREV_DEFECT_COR:
+ case OMAP3ISP_PREV_DEFECT_COR:
*param = ¶ms->dcor;
CHKARG(configs, config, dcor)
return sizeof(params->dcor);
- case PREV_BLKADJ:
+ case OMAP3ISP_PREV_BLKADJ:
*param = ¶ms->blk_adj;
CHKARG(configs, config, blkadj)
return sizeof(params->blk_adj);
- case PREV_YCLIMITS:
+ case OMAP3ISP_PREV_YC_LIMIT:
*param = ¶ms->yclimit;
CHKARG(configs, config, yclimit)
return sizeof(params->yclimit);
- case PREV_RGB2RGB:
+ case OMAP3ISP_PREV_RGB2RGB:
*param = ¶ms->rgb2rgb;
CHKARG(configs, config, rgb2rgb)
return sizeof(params->rgb2rgb);
- case PREV_COLOR_CONV:
+ case OMAP3ISP_PREV_COLOR_CONV:
*param = ¶ms->rgb2ycbcr;
CHKARG(configs, config, csc)
return sizeof(params->rgb2ycbcr);
- case PREV_WB:
+ case OMAP3ISP_PREV_WB:
*param = ¶ms->wbal;
CHKARG(configs, config, wbal)
return sizeof(params->wbal);
- case PREV_GAMMA:
+ case OMAP3ISP_PREV_GAMMA:
*param = ¶ms->gamma;
CHKARG(configs, config, gamma)
return sizeof(params->gamma);
- case PREV_CONTRAST:
+ case OMAP3ISP_PREV_CONTRAST:
*param = ¶ms->contrast;
return 0;
- case PREV_BRIGHTNESS:
+ case OMAP3ISP_PREV_BRIGHTNESS:
*param = ¶ms->brightness;
return 0;
default:
attr = &update_attrs[i];
bit = 0;
- if (attr->cfg_bit == -1 || !(cfg->update & attr->cfg_bit))
+ if (attr->skip || !(cfg->update & attr->feature_bit))
continue;
- bit = cfg->flag & attr->cfg_bit;
+ bit = cfg->flag & attr->feature_bit;
if (bit) {
void *to = NULL, __user *from = NULL;
unsigned long sz = 0;
unsigned int slv = prev->crop.top;
unsigned int elv = prev->crop.top + prev->crop.height - 1;
- if (params->features & PREV_CFA) {
+ if (params->features & OMAP3ISP_PREV_CFA) {
sph -= 2;
eph += 2;
slv -= 2;
elv += 2;
}
- if (params->features & (PREV_DEFECT_COR | PREV_NOISE_FILTER)) {
+ if (params->features & (OMAP3ISP_PREV_DEFECT_COR | OMAP3ISP_PREV_NF)) {
sph -= 2;
eph += 2;
slv -= 2;
elv += 2;
}
- if (params->features & PREV_HORZ_MEDIAN_FILTER) {
+ if (params->features & OMAP3ISP_PREV_HRZ_MED) {
sph -= 2;
eph += 2;
}
- if (params->features & (PREV_CHROMA_SUPPRESS | PREV_LUMA_ENHANCE))
+ if (params->features & (OMAP3ISP_PREV_CHROMA_SUPP |
+ OMAP3ISP_PREV_LUMAENH))
sph -= 2;
isp_reg_writel(isp, (sph << ISPPRV_HORZ_INFO_SPH_SHIFT) | eph,
*/
void omap3isp_preview_restore_context(struct isp_device *isp)
{
- isp->isp_prev.update = PREV_FEATURES_END - 1;
+ isp->isp_prev.update = OMAP3ISP_PREV_FEATURES_END - 1;
preview_setup_hw(&isp->isp_prev);
}
params->yclimit.minY = ISPPRV_YC_MIN;
params->yclimit.maxY = ISPPRV_YC_MAX;
- params->features = PREV_CFA | PREV_DEFECT_COR | PREV_NOISE_FILTER
- | PREV_GAMMA | PREV_BLKADJ | PREV_YCLIMITS
- | PREV_RGB2RGB | PREV_COLOR_CONV | PREV_WB
- | PREV_BRIGHTNESS | PREV_CONTRAST;
+ params->features = OMAP3ISP_PREV_CFA | OMAP3ISP_PREV_DEFECT_COR
+ | OMAP3ISP_PREV_NF | OMAP3ISP_PREV_GAMMA
+ | OMAP3ISP_PREV_BLKADJ | OMAP3ISP_PREV_YC_LIMIT
+ | OMAP3ISP_PREV_RGB2RGB | OMAP3ISP_PREV_COLOR_CONV
+ | OMAP3ISP_PREV_WB | OMAP3ISP_PREV_BRIGHTNESS
+ | OMAP3ISP_PREV_CONTRAST;
- prev->update = PREV_FEATURES_END - 1;
+ prev->update = OMAP3ISP_PREV_FEATURES_END - 1;
}
/*