38 if (dev->
variant->out_buf_count > 4)
39 fimc_hw_set_dma_seq(dev, 0xF);
57 static u32 fimc_hw_get_target_flip(
struct fimc_ctx *ctx)
94 cfg |= fimc_hw_get_target_flip(ctx);
100 flip |= fimc_hw_get_in_flip(ctx);
111 dbg(
"w= %d, h= %d color: %d", frame->
width,
118 switch (frame->
fmt->color) {
126 if (frame->
fmt->colplanes == 1)
148 static void fimc_hw_set_out_dma_size(
struct fimc_ctx *ctx)
176 cfg = (offset->
y_v << 16) | offset->
y_h;
179 cfg = (offset->
cb_v << 16) | offset->
cb_h;
182 cfg = (offset->
cr_v << 16) | offset->
cr_h;
185 fimc_hw_set_out_dma_size(ctx);
239 cfg = shfactor << 28;
248 static void fimc_hw_set_scaler(
struct fimc_ctx *ctx)
280 switch (src_frame->
fmt->color) {
319 dbg(
"main_hratio= 0x%X main_vratio= 0x%X",
322 fimc_hw_set_scaler(ctx);
399 cfg |= (frame->
alpha << 4);
403 static void fimc_hw_set_in_dma_size(
struct fimc_ctx *ctx)
428 cfg = (offset->
y_v << 16) | offset->
y_h;
431 cfg = (offset->
cb_v << 16) | offset->
cb_h;
434 cfg = (offset->
cr_v << 16) | offset->
cr_h;
438 fimc_hw_set_in_dma_size(ctx);
455 switch (frame->
fmt->color) {
462 if (frame->
fmt->colplanes == 2)
469 if (frame->
fmt->colplanes == 1) {
475 if (frame->
fmt->colplanes == 2)
492 if (tiled_fmt(ctx->
s_frame.fmt))
495 if (tiled_fmt(ctx->
d_frame.fmt))
545 int i = (index == -1) ? 0 : index;
550 dbg(
"dst_buf[%d]: 0x%X, cb: 0x%X, cr: 0x%X",
551 i, paddr->
y, paddr->
cb, paddr->
cr);
616 "Camera color format not supported: %d\n",
624 else if (bus_width == 16)
652 cfg = (hoff2 << 16) | voff2;
661 u32 csis_data_alignment = 32;
678 switch (vid_cap->
mf.code) {
689 "Not supported camera pixel format: %#x\n",
693 tmp |= (csis_data_alignment == 32) << 8;
705 v4l2_err(&vid_cap->
vfd,
"Invalid camera bus type selected\n");
752 if (dev->
variant->has_cistatus2) {
768 if (!dev->
variant->has_cistatus2)
772 return ((reg >> 7) & 0x3f) - 1;