Commit bbfd899f authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab
Browse files

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: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent c5449bab
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -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 {
+2 −18
Original line number Diff line number Diff line
@@ -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 */
+2 −11
Original line number Diff line number Diff line
@@ -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,9 +610,6 @@ 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;
		break;
	default:
@@ -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) ?
			       ATOMISP_INPUT_STREAM_VIDEO :
			       ATOMISP_INPUT_STREAM_GENERAL;
	}

	if (0 != ia_css_pipe_get_info(asd->stream_env[stream_index]
		.pipes[pipe_index], &info)) {
+2 −4
Original line number Diff line number Diff line
@@ -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;
+1 −11
Original line number Diff line number Diff line
@@ -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
Loading