media: atomisp: Remove unused SOC_CAMERA, XENON_FLASH and FILE_INPUT subdev types

Nothing registers subdevs with the SOC_CAMERA, XENON_FLASH and FILE_INPUT
types, remove the code for these.

Link: https://lore.kernel.org/r/20230221145906.8113-8-hdegoede@redhat.com

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
Hans de Goede 2023-02-21 14:59:03 +00:00 committed by Mauro Carvalho Chehab
parent c5449babb1
commit bbfd899fe0
7 changed files with 12 additions and 67 deletions

View File

@ -111,12 +111,9 @@ enum atomisp_input_format {
enum intel_v4l2_subdev_type {
RAW_CAMERA = 1,
SOC_CAMERA = 2,
CAMERA_MOTOR = 3,
LED_FLASH = 4,
XENON_FLASH = 5,
FILE_INPUT = 6,
TEST_PATTERN = 7,
CAMERA_MOTOR = 2,
LED_FLASH = 3,
TEST_PATTERN = 4,
};
struct intel_v4l2_subdev_id {

View File

@ -1068,9 +1068,7 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
if (!stream_restart[i])
continue;
if (isp->inputs[asd->input_curr].type != FILE_INPUT)
atomisp_css_input_set_mode(asd,
IA_CSS_INPUT_MODE_BUFFERED_SENSOR);
atomisp_css_input_set_mode(asd, IA_CSS_INPUT_MODE_BUFFERED_SENSOR);
css_pipe_id = atomisp_get_css_pipe_id(asd);
if (atomisp_css_start(asd, css_pipe_id, true)) {
@ -4264,8 +4262,7 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
if (!format)
return -EINVAL;
if (isp->inputs[asd->input_curr].type != TEST_PATTERN &&
isp->inputs[asd->input_curr].type != FILE_INPUT) {
if (isp->inputs[asd->input_curr].type != TEST_PATTERN) {
mipi_info = atomisp_to_sensor_mipi_info(
isp->inputs[asd->input_curr].camera);
if (!mipi_info) {
@ -4366,13 +4363,6 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
configure_pp_input = atomisp_css_preview_configure_pp_input;
pipe_id = IA_CSS_PIPE_ID_PREVIEW;
} else {
/* CSS doesn't support low light mode on SOC cameras, so disable
* it. FIXME: if this is done elsewhere, it gives corrupted
* colors into thumbnail image.
*/
if (isp->inputs[asd->input_curr].type == SOC_CAMERA)
asd->params.low_light = false;
if (format->sh_fmt == IA_CSS_FRAME_FORMAT_RAW) {
atomisp_css_capture_set_mode(asd, IA_CSS_CAPTURE_MODE_RAW);
atomisp_css_enable_dz(asd, false);
@ -4463,12 +4453,6 @@ static void atomisp_get_dis_envelop(struct atomisp_sub_device *asd,
unsigned int width, unsigned int height,
unsigned int *dvs_env_w, unsigned int *dvs_env_h)
{
struct atomisp_device *isp = asd->isp;
/* if subdev type is SOC camera,we do not need to set DVS */
if (isp->inputs[asd->input_curr].type == SOC_CAMERA)
asd->params.video_dis_en = false;
if (asd->params.video_dis_en &&
asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
/* envelope is 20% of the output resolution */

View File

@ -597,8 +597,6 @@ static void __apply_additional_pipe_config(
.enable_reduced_pipe = true;
stream_env->pipe_configs[pipe_id]
.enable_dz = false;
if (ATOMISP_SOC_CAMERA(asd))
stream_env->pipe_configs[pipe_id].enable_dz = true;
if (asd->params.video_dis_en) {
stream_env->pipe_extra_configs[pipe_id]
@ -612,10 +610,7 @@ static void __apply_additional_pipe_config(
break;
case IA_CSS_PIPE_ID_YUVPP:
case IA_CSS_PIPE_ID_COPY:
if (ATOMISP_SOC_CAMERA(asd))
stream_env->pipe_configs[pipe_id].enable_dz = true;
else
stream_env->pipe_configs[pipe_id].enable_dz = false;
stream_env->pipe_configs[pipe_id].enable_dz = false;
break;
default:
break;
@ -2573,13 +2568,9 @@ int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
int stream_index;
struct atomisp_device *isp = asd->isp;
if (ATOMISP_SOC_CAMERA(asd)) {
stream_index = ATOMISP_INPUT_STREAM_GENERAL;
} else {
stream_index = (pipe_index == IA_CSS_PIPE_ID_YUVPP) ?
stream_index = (pipe_index == IA_CSS_PIPE_ID_YUVPP) ?
ATOMISP_INPUT_STREAM_VIDEO :
ATOMISP_INPUT_STREAM_GENERAL;
}
if (0 != ia_css_pipe_get_info(asd->stream_env[stream_index]
.pipes[pipe_index], &info)) {

View File

@ -458,10 +458,8 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
buf_type = atomisp_get_css_buf_type(
asd, css_preview_pipe_id,
atomisp_subdev_source_pad(&preview_pipe->vdev));
if (ATOMISP_SOC_CAMERA(asd) && css_preview_pipe_id == IA_CSS_PIPE_ID_YUVPP)
input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
/* else for ext isp use case */
else if (css_preview_pipe_id == IA_CSS_PIPE_ID_YUVPP)
if (css_preview_pipe_id == IA_CSS_PIPE_ID_YUVPP)
input_stream_id = ATOMISP_INPUT_STREAM_VIDEO;
else if (asd->stream_env[ATOMISP_INPUT_STREAM_PREVIEW].stream)
input_stream_id = ATOMISP_INPUT_STREAM_PREVIEW;

View File

@ -117,17 +117,7 @@
#define ATOMISP_CSS_OUTPUT_SECOND_INDEX 1
#define ATOMISP_CSS_OUTPUT_DEFAULT_INDEX 0
/*
* ATOMISP_SOC_CAMERA
* This is to differentiate between ext-isp and soc camera in
* Moorefield/Baytrail platform.
*/
#define ATOMISP_SOC_CAMERA(asd) \
(asd->isp->inputs[asd->input_curr].type == SOC_CAMERA)
#define ATOMISP_USE_YUVPP(asd) \
(ATOMISP_SOC_CAMERA(asd) && ATOMISP_CSS_SUPPORT_YUVPP && \
!asd->copy_mode)
#define ATOMISP_USE_YUVPP(asd) false
/* ISP2401 */
#define ATOMISP_ION_DEVICE_FD_OFFSET 16

View File

@ -409,11 +409,6 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
padding_h = 12;
}
if (isp->inputs[isp_sd->input_curr].type == SOC_CAMERA) {
padding_w = 0;
padding_h = 0;
}
if (atomisp_subdev_format_conversion(isp_sd,
isp_sd->capture_pad)
&& crop[pad]->width && crop[pad]->height) {
@ -421,10 +416,6 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
crop[pad]->height -= padding_h;
}
/* if subdev type is SOC camera,we do not need to set DVS */
if (isp->inputs[isp_sd->input_curr].type == SOC_CAMERA)
isp_sd->params.video_dis_en = 0;
if (isp_sd->params.video_dis_en &&
isp_sd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
/* This resolution contains 20 % of DVS slack

View File

@ -842,8 +842,7 @@ int atomisp_csi_lane_config(struct atomisp_device *isp)
for (i = 0; i < isp->input_cnt; i++) {
struct camera_mipi_info *mipi_info;
if (isp->inputs[i].type != RAW_CAMERA &&
isp->inputs[i].type != SOC_CAMERA)
if (isp->inputs[i].type != RAW_CAMERA)
continue;
mipi_info = atomisp_to_sensor_mipi_info(isp->inputs[i].camera);
@ -923,8 +922,7 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
int camera_count = 0;
for (subdevs = pdata->subdevs; subdevs->type; ++subdevs) {
if (subdevs->type == RAW_CAMERA ||
subdevs->type == SOC_CAMERA)
if (subdevs->type == RAW_CAMERA)
camera_count++;
}
if (camera_count)
@ -945,9 +943,6 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
case RAW_CAMERA:
dev_dbg(isp->dev, "raw_index: %d\n", raw_index);
raw_index = isp->input_cnt;
fallthrough;
case SOC_CAMERA:
dev_dbg(isp->dev, "SOC_INDEX: %d\n", isp->input_cnt);
if (isp->input_cnt >= ATOM_ISP_MAX_INPUTS) {
dev_warn(isp->dev,
"too many atomisp inputs, ignored\n");
@ -974,7 +969,6 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
isp->motor = subdevs->subdev;
break;
case LED_FLASH:
case XENON_FLASH:
if (isp->flash) {
dev_warn(isp->dev, "too many atomisp flash devices\n");
continue;