summaryrefslogtreecommitdiff
path: root/drivers/media/video/s5p-fimc/fimc-core.h
diff options
context:
space:
mode:
authorHyunwoong Kim <khw0178.kim@samsung.com>2010-12-28 14:27:13 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 23:31:39 (GMT)
commitb241c6d6f4ceddddfd8097c702dcfdd6b38fbe18 (patch)
tree84ba8792690b4ba2691c3d36ff518b54b4f80844 /drivers/media/video/s5p-fimc/fimc-core.h
parent10038bea7a729bcb8c51a2c856f5b58b33646d65 (diff)
downloadlinux-fsl-qoriq-b241c6d6f4ceddddfd8097c702dcfdd6b38fbe18.tar.xz
[media] s5p-fimc: Configure scaler registers depending on FIMC version
The main scaler has four SFRs for main scaler ratio depending on FIMC version. FIMC 4.x has only two SFRs and FIMC 5.x has four SFRs for main scaler. Those are MainHorRatio, MainHorRatio_ext, MainVerRatio and MainverRatio_ext. The FIMC 5.x has 15 bit resolution for scaling ratio as below. {MainHorRatio,MainHorRatio_ext} = {[14:6],[5:0]}. {MainVerRatio,MainVerRatio_ext} = {[14:6],[5:0]}. MainHorRatio = CISCCTRL[24:16], MainHorRatio_ext = CIEXTEN[15:10] MainVerRatio = CISCCTRL[8:0], MainVerRatio_ext = CIEXTEN[5:0] This patch supports FIMC 4.x and FIMC 5.x using platform_device_id::driver_data. Reviewed-by: Jonghun Han <jonghun.han@samsung.com> Signed-off-by: Hyunwoong Kim <khw0178.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s5p-fimc/fimc-core.h')
-rw-r--r--drivers/media/video/s5p-fimc/fimc-core.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-core.h b/drivers/media/video/s5p-fimc/fimc-core.h
index 562d15d..8aee9e3 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.h
+++ b/drivers/media/video/s5p-fimc/fimc-core.h
@@ -361,6 +361,8 @@ struct fimc_pix_limit {
* @has_inp_rot: set if has input rotator
* @has_out_rot: set if has output rotator
* @has_cistatus2: 1 if CISTATUS2 register is present in this IP revision
+ * @has_mainscaler_ext: 1 if extended mainscaler ratios in CIEXTEN register
+ * are present in this IP revision
* @pix_limit: pixel size constraints for the scaler
* @min_inp_pixsize: minimum input pixel size
* @min_out_pixsize: minimum output pixel size
@@ -372,6 +374,7 @@ struct samsung_fimc_variant {
unsigned int has_inp_rot:1;
unsigned int has_out_rot:1;
unsigned int has_cistatus2:1;
+ unsigned int has_mainscaler_ext:1;
struct fimc_pix_limit *pix_limit;
u16 min_inp_pixsize;
u16 min_out_pixsize;
@@ -569,7 +572,9 @@ void fimc_hw_set_target_format(struct fimc_ctx *ctx);
void fimc_hw_set_out_dma(struct fimc_ctx *ctx);
void fimc_hw_en_lastirq(struct fimc_dev *fimc, int enable);
void fimc_hw_en_irq(struct fimc_dev *fimc, int enable);
-void fimc_hw_set_scaler(struct fimc_ctx *ctx);
+void fimc_hw_set_prescaler(struct fimc_ctx *ctx);
+void fimc_hw_set_mainscaler(struct fimc_ctx *ctx);
+void fimc_hw_set_mainscaler_ext(struct fimc_ctx *ctx);
void fimc_hw_en_capture(struct fimc_ctx *ctx);
void fimc_hw_set_effect(struct fimc_ctx *ctx);
void fimc_hw_set_in_dma(struct fimc_ctx *ctx);