media: imx: remove code for non-existing config IMX_GPT_ICAP
There never was a config IMX_GPT_ICAP in the repository. So remove the code conditional on this config and simplify the callers that just called empty functions. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Reviewed-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
Родитель
7d21e0b1b4
Коммит
932d87c6ea
|
@ -187,54 +187,6 @@ out_update_ts:
|
|||
send_fim_event(fim, error_avg);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IMX_GPT_ICAP
|
||||
/*
|
||||
* Input Capture method of measuring frame intervals. Not subject
|
||||
* to interrupt latency.
|
||||
*/
|
||||
static void fim_input_capture_handler(int channel, void *dev_id,
|
||||
ktime_t timestamp)
|
||||
{
|
||||
struct imx_media_fim *fim = dev_id;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&fim->lock, flags);
|
||||
|
||||
frame_interval_monitor(fim, timestamp);
|
||||
|
||||
if (!completion_done(&fim->icap_first_event))
|
||||
complete(&fim->icap_first_event);
|
||||
|
||||
spin_unlock_irqrestore(&fim->lock, flags);
|
||||
}
|
||||
|
||||
static int fim_request_input_capture(struct imx_media_fim *fim)
|
||||
{
|
||||
init_completion(&fim->icap_first_event);
|
||||
|
||||
return mxc_request_input_capture(fim->icap_channel,
|
||||
fim_input_capture_handler,
|
||||
fim->icap_flags, fim);
|
||||
}
|
||||
|
||||
static void fim_free_input_capture(struct imx_media_fim *fim)
|
||||
{
|
||||
mxc_free_input_capture(fim->icap_channel, fim);
|
||||
}
|
||||
|
||||
#else /* CONFIG_IMX_GPT_ICAP */
|
||||
|
||||
static int fim_request_input_capture(struct imx_media_fim *fim)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void fim_free_input_capture(struct imx_media_fim *fim)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_IMX_GPT_ICAP */
|
||||
|
||||
/*
|
||||
* In case we are monitoring the first frame interval after streamon
|
||||
* (when fim->num_skip = 0), we need a valid fim->last_ts before we
|
||||
|
@ -434,15 +386,8 @@ int imx_media_fim_set_stream(struct imx_media_fim *fim,
|
|||
update_fim_nominal(fim, fi);
|
||||
spin_unlock_irqrestore(&fim->lock, flags);
|
||||
|
||||
if (icap_enabled(fim)) {
|
||||
ret = fim_request_input_capture(fim);
|
||||
if (ret)
|
||||
goto out;
|
||||
fim_acquire_first_ts(fim);
|
||||
}
|
||||
} else {
|
||||
if (icap_enabled(fim))
|
||||
fim_free_input_capture(fim);
|
||||
fim_acquire_first_ts(fim);
|
||||
}
|
||||
|
||||
fim->stream_on = on;
|
||||
|
|
Загрузка…
Ссылка в новой задаче