mirror of
https://github.com/patjak/facetimehd.git
synced 2026-04-09 11:02:31 +02:00
Merge branch 'my_fixes' of git://github.com/sschnelle/facetimehd
This commit is contained in:
33
fthd_isp.c
33
fthd_isp.c
@@ -311,7 +311,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)
|
||||
@@ -320,8 +321,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);
|
||||
@@ -1003,6 +1002,34 @@ int fthd_isp_cmd_channel_contrast_set(struct fthd_private *dev_priv, int channel
|
||||
return fthd_isp_cmd(dev_priv, CISP_CMD_CH_SCALER_CONTRAST_SET, &cmd, sizeof(cmd), &len);
|
||||
}
|
||||
|
||||
int fthd_isp_cmd_channel_saturation_set(struct fthd_private *dev_priv, int channel, int saturation)
|
||||
{
|
||||
struct isp_cmd_channel_saturation_set cmd;
|
||||
int len;
|
||||
|
||||
pr_debug("set saturation %d\n", saturation);
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.channel = channel;
|
||||
cmd.contrast = saturation;
|
||||
len = sizeof(cmd);
|
||||
return fthd_isp_cmd(dev_priv, CISP_CMD_CH_SCALER_SATURATION_SET, &cmd, sizeof(cmd), &len);
|
||||
}
|
||||
|
||||
int fthd_isp_cmd_channel_hue_set(struct fthd_private *dev_priv, int channel, int hue)
|
||||
{
|
||||
struct isp_cmd_channel_hue_set cmd;
|
||||
int len;
|
||||
|
||||
pr_debug("set hue %d\n", hue);
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.channel = channel;
|
||||
cmd.contrast = hue;
|
||||
len = sizeof(cmd);
|
||||
return fthd_isp_cmd(dev_priv, CISP_CMD_CH_SCALER_HUE_SET, &cmd, sizeof(cmd), &len);
|
||||
}
|
||||
|
||||
int fthd_start_channel(struct fthd_private *dev_priv, int channel)
|
||||
{
|
||||
int ret, x1 = 0, x2 = 0, pixelformat;
|
||||
|
||||
Reference in New Issue
Block a user