facetimehd: remove cmd_ready variable

instead evaluate the ringbuffer status. This allows to have more than one isp
command in flight.
This commit is contained in:
Sven Schnelle
2015-11-28 16:10:34 +01:00
parent 9dd6bc2a02
commit ad486d4522
3 changed files with 3 additions and 5 deletions

View File

@@ -310,7 +310,8 @@ static int fthd_isp_cmd(struct fthd_private *dev_priv, enum fthd_isp_cmds comman
goto out;
}
if (wait_event_interruptible_timeout(dev_priv->cmd_wq, dev_priv->cmd_ready, HZ) <= 0) {
if (wait_event_interruptible_timeout(dev_priv->cmd_wq,
FTHD_S2_MEM_READ(entry + FTHD_RINGBUF_ADDRESS_FLAGS) & 1, HZ) <= 0) {
dev_err(&dev_priv->pdev->dev, "timeout wait for command %d\n", cmd.opcode);
fthd_channel_ringbuf_dump(dev_priv, dev_priv->channel_io);
if (response_len)
@@ -319,8 +320,6 @@ static int fthd_isp_cmd(struct fthd_private *dev_priv, enum fthd_isp_cmds comman
goto out;
}
dev_priv->cmd_ready = 0;
FTHD_S2_MEMCPY_FROMIO(&cmd, request->offset, sizeof(struct isp_cmd_hdr));
address = FTHD_S2_MEM_READ(entry + FTHD_RINGBUF_ADDRESS_FLAGS);
request_size = FTHD_S2_MEM_READ(entry + FTHD_RINGBUF_REQUEST_SIZE);