Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSO-18310: d4xx: stderr is stall on printk #112

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions kernel/nvidia/0062-DSO-18310-d4xx-stderr-stall-on-printk.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
From 1ae2536788a3a506a58f3459a37aec494fd34caa Mon Sep 17 00:00:00 2001
From: Dmitry Perchanov <dmitry.perchanov@intel.com>
Date: Mon, 13 Jun 2022 13:07:44 +0300
Subject: [PATCH] d4xx: stderr is unbuffered causing stall on printk

---
drivers/media/i2c/d4xx.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/i2c/d4xx.c b/drivers/media/i2c/d4xx.c
index cf7c1e8..72de809 100644
--- a/drivers/media/i2c/d4xx.c
+++ b/drivers/media/i2c/d4xx.c
@@ -1334,7 +1334,7 @@ static int ds5_send_hwmc(struct ds5 *state, u16 cmdLen, struct hwm_cmd *cmd,
return -EAGAIN;
}

- dev_err(&state->client->dev, "%s(): HWMC read len: %d\n",
+ dev_info(&state->client->dev, "%s(): HWMC read len: %d\n",
__func__, *dataLen);
// First 4 bytes of cmd->Data after read will include opcode
ds5_raw_read_with_check(state, 0x4900, cmd->Data, *dataLen);
@@ -1455,7 +1455,7 @@ static int ds5_s_ctrl(struct v4l2_ctrl *ctrl)
case DS5_CAMERA_CID_AE_SETPOINT_SET: {
struct hwm_cmd *ae_setpoint_cmd;
if (ctrl->p_new.p_s32) {
- dev_err(&state->client->dev, "%s():0x%x \n", __func__,
+ dev_info(&state->client->dev, "%s():0x%x \n", __func__,
*(ctrl->p_new.p_s32));
ae_setpoint_cmd = devm_kzalloc(&state->client->dev, sizeof(struct hwm_cmd) + 4, GFP_KERNEL);
memcpy(ae_setpoint_cmd, &set_ae_setpoint, sizeof (set_ae_setpoint));
@@ -1476,7 +1476,7 @@ static int ds5_s_ctrl(struct v4l2_ctrl *ctrl)
size = *(ctrl->p_new.p_u8 + 2) << 8;
size |= *(ctrl->p_new.p_u8 + 3);

- dev_err(&state->client->dev, "%s(): offset %x, size: %x\n",
+ dev_info(&state->client->dev, "%s(): offset %x, size: %x\n",
__func__, offset, size);


@@ -1518,7 +1518,7 @@ static int ds5_s_ctrl(struct v4l2_ctrl *ctrl)
size = *((u8*)ctrl->p_new.p_u8 + 2) << 8;
size |= *((u8*)ctrl->p_new.p_u8 + 3);

- dev_err(&state->client->dev, "%s():0x%x 0x%x 0x%x 0x%x\n", __func__,
+ dev_info(&state->client->dev, "%s():0x%x 0x%x 0x%x 0x%x\n", __func__,
*((u8*)ctrl->p_new.p_u8),
*((u8*)ctrl->p_new.p_u8 + 1),
*((u8*)ctrl->p_new.p_u8 + 2),
@@ -1549,7 +1549,7 @@ static int ds5_s_ctrl(struct v4l2_ctrl *ctrl)

size = *((u8*)ctrl->p_new.p_u8 + 1) << 8;
size |= *((u8*)ctrl->p_new.p_u8 + 0);
- dev_err(&state->client->dev, "%s(): HWMC size %d\n", __func__, size);
+ dev_info(&state->client->dev, "%s(): HWMC size %d\n", __func__, size);
ret = ds5_send_hwmc(state, size + 4, (struct hwm_cmd *)ctrl->p_new.p_u8, true, &dataLen);
}
break;
@@ -2340,7 +2340,7 @@ static int ds5_mux_enum_frame_interval(struct v4l2_subdev *sd,

tmp.pad = 0;

- dev_err(state->depth.sensor.sd.dev, "%s(): pad %d code %x width %d height %d\n", __func__,
+ dev_info(state->depth.sensor.sd.dev, "%s(): pad %d code %x width %d height %d\n", __func__,
pad, tmp.code, tmp.width, tmp.height);

if (state->is_depth)
@@ -3704,4 +3704,4 @@ MODULE_AUTHOR( "Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>,\n\
Shikun Ding <shikun.ding@intel.com>");
MODULE_AUTHOR("Dmitry Perchanov <dmitry.perchanov@intel.com>");
MODULE_LICENSE("GPL v2");
-MODULE_VERSION("1.0.1.10");
+MODULE_VERSION("1.0.1.11");
--
2.17.1