From: Krzysztof Kozlowski <krzk@kernel.org>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Tomasz Figa <tfiga@chromium.org>,
Jason Chen <jasonx.z.chen@intel.com>,
Andy Yeh <andy.yeh@intel.com>,
Alan Chiang <alanx.chiang@intel.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Krzysztof Kozlowski <krzk@kernel.org>, stable@vger.kernel.org
Subject: [PATCH] media: i2c: imx258: correct mode to GBGB/RGRG
Date: Wed, 28 Oct 2020 10:19:47 +0100 [thread overview]
Message-ID: <20201028091947.93097-1-krzk@kernel.org> (raw)
The IMX258 sensor outputs pixels in GBGB/RGRG mode. This is described
explicitly in datasheet and was actually mentioned in a comment inside
the driver. Using other - wrong mode - leads to pinkish pictures.
Fixes: e4802cb00bfe ("media: imx258: Add imx258 camera sensor driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/media/i2c/imx258.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c
index ef069333a969..bf75d4e597af 100644
--- a/drivers/media/i2c/imx258.c
+++ b/drivers/media/i2c/imx258.c
@@ -715,7 +715,7 @@ static int imx258_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
/* Initialize try_fmt */
try_fmt->width = supported_modes[0].width;
try_fmt->height = supported_modes[0].height;
- try_fmt->code = MEDIA_BUS_FMT_SGRBG10_1X10;
+ try_fmt->code = MEDIA_BUS_FMT_SGBRG10_1X10;
try_fmt->field = V4L2_FIELD_NONE;
return 0;
@@ -827,7 +827,7 @@ static int imx258_enum_mbus_code(struct v4l2_subdev *sd,
if (code->index > 0)
return -EINVAL;
- code->code = MEDIA_BUS_FMT_SGRBG10_1X10;
+ code->code = MEDIA_BUS_FMT_SGBRG10_1X10;
return 0;
}
@@ -839,7 +839,7 @@ static int imx258_enum_frame_size(struct v4l2_subdev *sd,
if (fse->index >= ARRAY_SIZE(supported_modes))
return -EINVAL;
- if (fse->code != MEDIA_BUS_FMT_SGRBG10_1X10)
+ if (fse->code != MEDIA_BUS_FMT_SGBRG10_1X10)
return -EINVAL;
fse->min_width = supported_modes[fse->index].width;
@@ -855,7 +855,7 @@ static void imx258_update_pad_format(const struct imx258_mode *mode,
{
fmt->format.width = mode->width;
fmt->format.height = mode->height;
- fmt->format.code = MEDIA_BUS_FMT_SGRBG10_1X10;
+ fmt->format.code = MEDIA_BUS_FMT_SGBRG10_1X10;
fmt->format.field = V4L2_FIELD_NONE;
}
@@ -902,7 +902,7 @@ static int imx258_set_pad_format(struct v4l2_subdev *sd,
mutex_lock(&imx258->mutex);
/* Only one raw bayer(GBRG) order is supported */
- fmt->format.code = MEDIA_BUS_FMT_SGRBG10_1X10;
+ fmt->format.code = MEDIA_BUS_FMT_SGBRG10_1X10;
mode = v4l2_find_nearest_size(supported_modes,
ARRAY_SIZE(supported_modes), width, height,
--
2.25.1
next reply other threads:[~2020-10-28 22:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 9:19 Krzysztof Kozlowski [this message]
[not found] ` <MWHPR11MB0046B799E9AD3648C6F67BFE87170@MWHPR11MB0046.namprd11.prod.outlook.com>
2020-10-28 9:45 ` [PATCH] media: i2c: imx258: correct mode to GBGB/RGRG Krzysztof Kozlowski
2020-10-28 9:56 ` Krzysztof Kozlowski
[not found] ` <20201028100311.GF26150@paasikivi.fi.intel.com>
2020-10-28 10:15 ` Krzysztof Kozlowski
2020-10-28 12:08 ` Tomasz Figa
2020-10-30 11:32 ` Krzysztof Kozlowski
[not found] ` <MWHPR11MB0046CCA70D68CE1F3BA4FA4287170@MWHPR11MB0046.namprd11.prod.outlook.com>
2020-10-30 11:29 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201028091947.93097-1-krzk@kernel.org \
--to=krzk@kernel.org \
--cc=alanx.chiang@intel.com \
--cc=andy.yeh@intel.com \
--cc=jasonx.z.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=tfiga@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).