| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Register interface file for Samsung Camera Interface (FIMC) driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2010 - 2013 Samsung Electronics Co., Ltd. |
|---|
| 5 | 6 | * Sylwester Nawrocki <s.nawrocki@samsung.com> |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 9 | | - * published by the Free Software Foundation. |
|---|
| 10 | 7 | */ |
|---|
| 11 | 8 | |
|---|
| 12 | 9 | #include <linux/delay.h> |
|---|
| .. | .. |
|---|
| 609 | 606 | switch (source->fimc_bus_type) { |
|---|
| 610 | 607 | case FIMC_BUS_TYPE_ITU_601: |
|---|
| 611 | 608 | case FIMC_BUS_TYPE_ITU_656: |
|---|
| 609 | + if (fimc_fmt_is_user_defined(f->fmt->color)) { |
|---|
| 610 | + cfg |= FIMC_REG_CISRCFMT_ITU601_8BIT; |
|---|
| 611 | + break; |
|---|
| 612 | + } |
|---|
| 613 | + |
|---|
| 612 | 614 | for (i = 0; i < ARRAY_SIZE(pix_desc); i++) { |
|---|
| 613 | 615 | if (vc->ci_fmt.code == pix_desc[i].pixelcode) { |
|---|
| 614 | 616 | cfg = pix_desc[i].cisrcfmt; |
|---|
| .. | .. |
|---|
| 710 | 712 | case FIMC_BUS_TYPE_ITU_601...FIMC_BUS_TYPE_ITU_656: |
|---|
| 711 | 713 | if (source->mux_id == 0) /* ITU-A, ITU-B: 0, 1 */ |
|---|
| 712 | 714 | cfg |= FIMC_REG_CIGCTRL_SELCAM_ITU_A; |
|---|
| 715 | + if (vid_cap->ci_fmt.code == MEDIA_BUS_FMT_JPEG_1X8) |
|---|
| 716 | + cfg |= FIMC_REG_CIGCTRL_CAM_JPEG; |
|---|
| 713 | 717 | break; |
|---|
| 714 | 718 | case FIMC_BUS_TYPE_LCD_WRITEBACK_A: |
|---|
| 715 | 719 | cfg |= FIMC_REG_CIGCTRL_CAMIF_SELWB; |
|---|
| 716 | | - /* fall through */ |
|---|
| 720 | + fallthrough; |
|---|
| 717 | 721 | case FIMC_BUS_TYPE_ISP_WRITEBACK: |
|---|
| 718 | 722 | if (fimc->variant->has_isp_wb) |
|---|
| 719 | 723 | cfg |= FIMC_REG_CIGCTRL_CAMIF_SELWB; |
|---|