From patchwork Mon Mar 28 16:32:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 12793887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3BFCC433EF for ; Mon, 28 Mar 2022 16:32:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233943AbiC1QeN (ORCPT ); Mon, 28 Mar 2022 12:34:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242237AbiC1QeL (ORCPT ); Mon, 28 Mar 2022 12:34:11 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 270486212F for ; Mon, 28 Mar 2022 09:32:28 -0700 (PDT) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 9276F100008; Mon, 28 Mar 2022 16:32:26 +0000 (UTC) From: Jacopo Mondi To: Laurent Pinchart , sakari.ailus@iki.fi, tomi.valkeinen@ideasonboard.com Cc: Jacopo Mondi , linux-media@vger.kernel.org Subject: [PATCH] media: i2c: ov5645: Fix media bus format Date: Mon, 28 Mar 2022 18:32:20 +0200 Message-Id: <20220328163220.250203-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The ov5645 driver reports as its unique supported format MEDIA_BUS_FMT_UYVY8_2X8, which is not correct as the sensor uses the MIPI CSI-2 serial bus. Fix that by using MEDIA_BUS_FMT_UYVY8_1X16 instead. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- drivers/media/i2c/ov5645.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.35.1 diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index 368fa21e675e..5720e74e843b 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -843,7 +843,7 @@ static int ov5645_enum_mbus_code(struct v4l2_subdev *sd, if (code->index > 0) return -EINVAL; - code->code = MEDIA_BUS_FMT_UYVY8_2X8; + code->code = MEDIA_BUS_FMT_UYVY8_1X16; return 0; } @@ -852,7 +852,7 @@ static int ov5645_enum_frame_size(struct v4l2_subdev *subdev, struct v4l2_subdev_state *sd_state, struct v4l2_subdev_frame_size_enum *fse) { - if (fse->code != MEDIA_BUS_FMT_UYVY8_2X8) + if (fse->code != MEDIA_BUS_FMT_UYVY8_1X16) return -EINVAL; if (fse->index >= ARRAY_SIZE(ov5645_mode_info_data)) @@ -948,7 +948,7 @@ static int ov5645_set_format(struct v4l2_subdev *sd, format->which); __format->width = __crop->width; __format->height = __crop->height; - __format->code = MEDIA_BUS_FMT_UYVY8_2X8; + __format->code = MEDIA_BUS_FMT_UYVY8_1X16; __format->field = V4L2_FIELD_NONE; __format->colorspace = V4L2_COLORSPACE_SRGB;