@@ -365,9 +365,11 @@ static int cif_stream_start(struct cif_stream *stream)
cif_write(cif_dev, CIF_FRAME_STATUS, CIF_FRAME_STAT_CLS);
cif_write(cif_dev, CIF_INTSTAT, CIF_INTSTAT_CLS);
- cif_write(cif_dev, CIF_SCL_CTRL, (fmt_type == CIF_FMT_TYPE_YUV) ?
- CIF_SCL_CTRL_ENABLE_YUV_16BIT_BYPASS :
- CIF_SCL_CTRL_ENABLE_RAW_16BIT_BYPASS);
+ if (cif_dev->match_data->has_scaler)
+ cif_write(cif_dev, CIF_SCL_CTRL,
+ (fmt_type == CIF_FMT_TYPE_YUV) ?
+ CIF_SCL_CTRL_ENABLE_YUV_16BIT_BYPASS :
+ CIF_SCL_CTRL_ENABLE_RAW_16BIT_BYPASS);
ret = cif_init_buffers(stream);
if (ret)
@@ -100,6 +100,7 @@ struct cif_match_data {
const struct cif_input_fmt *in_fmts;
int in_fmts_num;
void (*grf_dvp_setup)(struct cif_device *cif_dev);
+ bool has_scaler;
};
struct cif_device {
@@ -282,6 +282,7 @@ static const struct cif_match_data px30_cif_match_data = {
.clks_num = ARRAY_SIZE(px30_cif_clks),
.in_fmts = px30_in_fmts,
.in_fmts_num = ARRAY_SIZE(px30_in_fmts),
+ .has_scaler = true,
};
static const struct of_device_id cif_plat_of_match[] = {
Not all variants of the Rockchip CIF feature a scaler unit. Add variant specific Boolean variable to account for this. Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> --- drivers/media/platform/rockchip/cif/cif-capture.c | 8 +++++--- drivers/media/platform/rockchip/cif/cif-common.h | 1 + drivers/media/platform/rockchip/cif/cif-dev.c | 1 + 3 files changed, 7 insertions(+), 3 deletions(-)