mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-12 08:09:56 +00:00
[media] smiapp: Improve debug messages from frame layout reading
Provide more debugging information on reading the frame layout. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
3fc34b7beb
commit
e43665a9d7
@ -100,12 +100,11 @@ static int smiapp_read_frame_fmt(struct smiapp_sensor *sensor)
|
|||||||
u32 pixels;
|
u32 pixels;
|
||||||
char *which;
|
char *which;
|
||||||
char *what;
|
char *what;
|
||||||
|
u32 reg;
|
||||||
|
|
||||||
if (fmt_model_type == SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE) {
|
if (fmt_model_type == SMIAPP_FRAME_FORMAT_MODEL_TYPE_2BYTE) {
|
||||||
rval = smiapp_read(
|
reg = SMIAPP_REG_U16_FRAME_FORMAT_DESCRIPTOR_2(i);
|
||||||
sensor,
|
rval = smiapp_read(sensor, reg, &desc);
|
||||||
SMIAPP_REG_U16_FRAME_FORMAT_DESCRIPTOR_2(i),
|
|
||||||
&desc);
|
|
||||||
if (rval)
|
if (rval)
|
||||||
return rval;
|
return rval;
|
||||||
|
|
||||||
@ -116,10 +115,8 @@ static int smiapp_read_frame_fmt(struct smiapp_sensor *sensor)
|
|||||||
pixels = desc & SMIAPP_FRAME_FORMAT_DESC_2_PIXELS_MASK;
|
pixels = desc & SMIAPP_FRAME_FORMAT_DESC_2_PIXELS_MASK;
|
||||||
} else if (fmt_model_type
|
} else if (fmt_model_type
|
||||||
== SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE) {
|
== SMIAPP_FRAME_FORMAT_MODEL_TYPE_4BYTE) {
|
||||||
rval = smiapp_read(
|
reg = SMIAPP_REG_U32_FRAME_FORMAT_DESCRIPTOR_4(i);
|
||||||
sensor,
|
rval = smiapp_read(sensor, reg, &desc);
|
||||||
SMIAPP_REG_U32_FRAME_FORMAT_DESCRIPTOR_4(i),
|
|
||||||
&desc);
|
|
||||||
if (rval)
|
if (rval)
|
||||||
return rval;
|
return rval;
|
||||||
|
|
||||||
@ -158,12 +155,12 @@ static int smiapp_read_frame_fmt(struct smiapp_sensor *sensor)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
what = "invalid";
|
what = "invalid";
|
||||||
dev_dbg(&client->dev, "pixelcode %d\n", pixelcode);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_dbg(&client->dev, "%s pixels: %d %s\n",
|
dev_dbg(&client->dev,
|
||||||
what, pixels, which);
|
"0x%8.8x %s pixels: %d %s (pixelcode %u)\n", reg,
|
||||||
|
what, pixels, which, pixelcode);
|
||||||
|
|
||||||
if (i < ncol_desc) {
|
if (i < ncol_desc) {
|
||||||
if (pixelcode ==
|
if (pixelcode ==
|
||||||
|
Loading…
x
Reference in New Issue
Block a user