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

media: atomisp: Remove delayed_init related code

After the continues-mode removal the delayed-work never gets queues
remove all the related code.

Link: https://lore.kernel.org/r/20230221145906.8113-4-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 6048fc1c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1102,7 +1102,6 @@ struct atomisp_sensor_ae_bracketing_lut {

#define V4L2_EVENT_ATOMISP_3A_STATS_READY   (V4L2_EVENT_PRIVATE_START + 1)
#define V4L2_EVENT_ATOMISP_METADATA_READY   (V4L2_EVENT_PRIVATE_START + 2)
#define V4L2_EVENT_ATOMISP_RAW_BUFFERS_ALLOC_DONE   (V4L2_EVENT_PRIVATE_START + 3)
#define V4L2_EVENT_ATOMISP_ACC_COMPLETE     (V4L2_EVENT_PRIVATE_START + 4)
#define V4L2_EVENT_ATOMISP_PAUSE_BUFFER	    (V4L2_EVENT_PRIVATE_START + 5)
#define V4L2_EVENT_ATOMISP_CSS_RESET	    (V4L2_EVENT_PRIVATE_START + 6)
+0 −35
Original line number Diff line number Diff line
@@ -1001,35 +1001,6 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
		atomisp_qbuffers_to_css(asd);
}

void atomisp_delayed_init_work(struct work_struct *work)
{
	struct atomisp_sub_device *asd = container_of(work,
					 struct atomisp_sub_device,
					 delayed_init_work);
	/*
	 * to SOC camera, use yuvpp pipe and no support continuous mode.
	 */
	if (!ATOMISP_USE_YUVPP(asd)) {
		struct v4l2_event event = {0};
		struct ia_css_stream *stream;

		stream = asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;


		if (ia_css_alloc_continuous_frame_remain(stream))
			return;

		ia_css_update_continuous_frames(stream);

		event.type = V4L2_EVENT_ATOMISP_RAW_BUFFERS_ALLOC_DONE;
		v4l2_event_queue(asd->subdev.devnode, &event);
	}

	/* signal streamon after delayed init is done */
	asd->delayed_init = ATOMISP_DELAYED_INIT_DONE;
	complete(&asd->init_done);
}

static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
{
	struct pci_dev *pdev = to_pci_dev(isp->dev);
@@ -1054,12 +1025,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
		    !asd->stream_prepared)
			continue;

		if (asd->delayed_init == ATOMISP_DELAYED_INIT_QUEUED)
			cancel_work_sync(&asd->delayed_init_work);

		complete(&asd->init_done);
		asd->delayed_init = ATOMISP_DELAYED_INIT_NOT_QUEUED;

		stream_restart[asd->index] = true;

		spin_lock_irqsave(&isp->lock, flags);
+0 −1
Original line number Diff line number Diff line
@@ -72,7 +72,6 @@ irqreturn_t atomisp_isr_thread(int irq, void *isp_ptr);
const struct atomisp_format_bridge *get_atomisp_format_bridge_from_mbus(
    u32 mbus_code);
bool atomisp_is_mbuscode_raw(uint32_t code);
void atomisp_delayed_init_work(struct work_struct *work);

/* Get internal fmt according to V4L2 fmt */
bool atomisp_is_viewfinder_support(struct atomisp_device *isp);
+0 −1
Original line number Diff line number Diff line
@@ -614,7 +614,6 @@ static void atomisp_subdev_init_struct(struct atomisp_sub_device *asd)
	/* s3a grid not enabled for any pipe */
	asd->params.s3a_enabled_pipe = IA_CSS_PIPE_ID_NUM;

	asd->delayed_init = ATOMISP_DELAYED_INIT_NOT_QUEUED;
	/* Add for channel */
	asd->input_curr = 0;

+0 −4
Original line number Diff line number Diff line
@@ -101,10 +101,6 @@
#define ATOMISP_METADATA_QUEUE_DEPTH_FOR_HAL	8
#define ATOMISP_S3A_BUF_QUEUE_DEPTH_FOR_HAL	8

#define ATOMISP_DELAYED_INIT_NOT_QUEUED	0
#define ATOMISP_DELAYED_INIT_QUEUED	1
#define ATOMISP_DELAYED_INIT_DONE	2

/*
 * Define how fast CPU should be able to serve ISP interrupts.
 * The bigger the value, the higher risk that the ISP is not
Loading