mirror of
https://github.com/patjak/facetimehd.git
synced 2026-04-09 19:10:01 +02:00
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:
@@ -199,7 +199,6 @@ static void fthd_handle_irq(struct fthd_private *dev_priv, struct fw_channel *ch
|
|||||||
} else if (chan == dev_priv->channel_buf_t2h) {
|
} else if (chan == dev_priv->channel_buf_t2h) {
|
||||||
buf_t2h_handler(dev_priv, chan, entry);
|
buf_t2h_handler(dev_priv, chan, entry);
|
||||||
} else if (chan == dev_priv->channel_io) {
|
} else if (chan == dev_priv->channel_io) {
|
||||||
dev_priv->cmd_ready = 1;
|
|
||||||
wake_up_interruptible(&dev_priv->cmd_wq);
|
wake_up_interruptible(&dev_priv->cmd_wq);
|
||||||
} else if (chan == dev_priv->channel_io_t2h) {
|
} else if (chan == dev_priv->channel_io_t2h) {
|
||||||
io_t2h_handler(dev_priv, chan, entry);
|
io_t2h_handler(dev_priv, chan, entry);
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ struct fthd_private {
|
|||||||
|
|
||||||
/* waitqueue for signaling command completion */
|
/* waitqueue for signaling command completion */
|
||||||
wait_queue_head_t cmd_wq;
|
wait_queue_head_t cmd_wq;
|
||||||
int cmd_ready;
|
|
||||||
/* Mapped PCI resources */
|
/* Mapped PCI resources */
|
||||||
void __iomem *s2_io;
|
void __iomem *s2_io;
|
||||||
u32 s2_io_len;
|
u32 s2_io_len;
|
||||||
|
|||||||
@@ -310,7 +310,8 @@ static int fthd_isp_cmd(struct fthd_private *dev_priv, enum fthd_isp_cmds comman
|
|||||||
goto out;
|
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);
|
dev_err(&dev_priv->pdev->dev, "timeout wait for command %d\n", cmd.opcode);
|
||||||
fthd_channel_ringbuf_dump(dev_priv, dev_priv->channel_io);
|
fthd_channel_ringbuf_dump(dev_priv, dev_priv->channel_io);
|
||||||
if (response_len)
|
if (response_len)
|
||||||
@@ -319,8 +320,6 @@ static int fthd_isp_cmd(struct fthd_private *dev_priv, enum fthd_isp_cmds comman
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_priv->cmd_ready = 0;
|
|
||||||
|
|
||||||
FTHD_S2_MEMCPY_FROMIO(&cmd, request->offset, sizeof(struct isp_cmd_hdr));
|
FTHD_S2_MEMCPY_FROMIO(&cmd, request->offset, sizeof(struct isp_cmd_hdr));
|
||||||
address = FTHD_S2_MEM_READ(entry + FTHD_RINGBUF_ADDRESS_FLAGS);
|
address = FTHD_S2_MEM_READ(entry + FTHD_RINGBUF_ADDRESS_FLAGS);
|
||||||
request_size = FTHD_S2_MEM_READ(entry + FTHD_RINGBUF_REQUEST_SIZE);
|
request_size = FTHD_S2_MEM_READ(entry + FTHD_RINGBUF_REQUEST_SIZE);
|
||||||
|
|||||||
Reference in New Issue
Block a user