From patchwork Thu Nov 11 09:57:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12614529 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DC59C433FE for ; Thu, 11 Nov 2021 09:57:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30D9F61107 for ; Thu, 11 Nov 2021 09:57:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232778AbhKKKAN (ORCPT ); Thu, 11 Nov 2021 05:00:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:45260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbhKKKAM (ORCPT ); Thu, 11 Nov 2021 05:00:12 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D1BDA61075; Thu, 11 Nov 2021 09:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636624643; bh=MUiRPrAO4mVo4miSJUVrU5TVK8DibltKkYTxim9absg=; h=From:To:Cc:Subject:Date:From; b=fdB/yBUh0ywl2Tr+HZVqcK4ijBPUMMetXO4QyVe+fZTz/xLCZ4N5SmMsDD82oboSB FrhZVHRwVy+wDAwOExsd3oZKtceln8xCHwx52wn0cB7Zoa2PDs3nNKbrwGFK3ZtduI N3RlPfzfElTkjgxs5gUSIU3Y6IIhspuMbQdQCpvrFSULIGd+a2tWXrtFIZPdmpjZ4m pWo1xOY49201D+NKxgm2JPLnAI8gPcvOm1Ni9ttUKCnLIU1SsWOZ0DOnWcd0lgQTkA /HcFT7nEAP5/m//GS+iZo+zh1ihOSKF1jSibPjJ58JOdeMi462zuntA7ny34420rwD 3eQgIJUcB638A== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1ml6pc-004vRY-Q7; Thu, 11 Nov 2021 09:57:20 +0000 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Bhaskar Chowdhury , Deepak R Varma , Greg Kroah-Hartman , Hans de Goede , Mauro Carvalho Chehab , Randy Dunlap , Sakari Ailus , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 1/2] media: atomisp-ov2680: uncomment other resolutions Date: Thu, 11 Nov 2021 09:57:18 +0000 Message-Id: <440a1ecd3e1ef3a58bff40cde2ae57a32e5b0f60.1636624633.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There are several resolutions defined for this sensor, but just two are currently uncommented. Change the driver to allow other resolutions to also be used. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Hans de Goede --- drivers/staging/media/atomisp/i2c/ov2680.h | 159 ++++++++++++++++++++- 1 file changed, 153 insertions(+), 6 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/ov2680.h b/drivers/staging/media/atomisp/i2c/ov2680.h index e53be612a1e4..ed68510bb0b9 100644 --- a/drivers/staging/media/atomisp/i2c/ov2680.h +++ b/drivers/staging/media/atomisp/i2c/ov2680.h @@ -282,7 +282,6 @@ static struct ov2680_reg const ov2680_global_setting[] = { {} }; -#if 0 /* None of the definitions below are used currently */ /* * 176x144 30fps VBlanking 1lane 10Bit (binning) */ @@ -442,7 +441,7 @@ static struct ov2680_reg const ov2680_656x496_30fps[] = { }; /* - * 800x600 30fps VBlanking 1lane 10Bit (binning) + * 720x592 30fps VBlanking 1lane 10Bit (binning) */ static struct ov2680_reg const ov2680_720x592_30fps[] = { {0x3086, 0x01}, @@ -637,7 +636,6 @@ static struct ov2680_reg const ov2680_1456x1096_30fps[] = { // {0x5090, 0x0c}, {} }; -#endif /* *1616x916 30fps VBlanking 1lane 10bit @@ -680,9 +678,8 @@ static struct ov2680_reg const ov2680_1616x916_30fps[] = { }; /* - * 1612x1212 30fps VBlanking 1lane 10Bit + * 1616x1082 30fps VBlanking 1lane 10Bit */ -#if 0 static struct ov2680_reg const ov2680_1616x1082_30fps[] = { {0x3086, 0x00}, {0x370a, 0x21}, @@ -718,7 +715,7 @@ static struct ov2680_reg const ov2680_1616x1082_30fps[] = { {0x5081, 0x41}, {} }; -#endif + /* * 1616x1216 30fps VBlanking 1lane 10Bit */ @@ -774,6 +771,21 @@ static struct ov2680_resolution ov2680_res_preview[] = { .skip_frames = 3, .regs = ov2680_1616x1216_30fps, }, + { + .desc = "ov2680_1616x1082_30fps", + .width = 1616, + .height = 1082, + .pix_clk_freq = 66, + .fps = 30, + .used = 0, + .pixels_per_line = 1698,//1704, + .lines_per_frame = 1294, + .bin_factor_x = 0, + .bin_factor_y = 0, + .bin_mode = 0, + .skip_frames = 3, + .regs = ov2680_1616x1082_30fps, + }, { .desc = "ov2680_1616x916_30fps", .width = 1616, @@ -789,6 +801,141 @@ static struct ov2680_resolution ov2680_res_preview[] = { .skip_frames = 3, .regs = ov2680_1616x916_30fps, }, + { + .desc = "ov2680_1456x1096_30fps", + .width = 1456, + .height = 1096, + .fps = 30, + .pix_clk_freq = 66, + .used = 0, + .pixels_per_line = 1698,//1704, + .lines_per_frame = 1294, + .bin_factor_x = 0, + .bin_factor_y = 0, + .bin_mode = 0, + .skip_frames = 3, + .regs = ov2680_1456x1096_30fps, + }, + { + .desc = "ov2680_1296x976_30fps", + .width = 1296, + .height = 976, + .fps = 30, + .pix_clk_freq = 66, + .used = 0, + .pixels_per_line = 1698,//1704, + .lines_per_frame = 1294, + .bin_factor_x = 0, + .bin_factor_y = 0, + .bin_mode = 0, + .skip_frames = 3, + .regs = ov2680_1296x976_30fps, + }, + { + .desc = "ov2680_720p_30fps", + .width = 1280, + .height = 720, + .fps = 30, + .pix_clk_freq = 66, + .used = 0, + .pixels_per_line = 1698,//1704, + .lines_per_frame = 1294, + .bin_factor_x = 0, + .bin_factor_y = 0, + .bin_mode = 0, + .skip_frames = 3, + .regs = ov2680_720p_30fps, + }, + { + .desc = "ov2680_800x600_30fps", + .width = 800, + .height = 600, + .fps = 30, + .pix_clk_freq = 66, + .used = 0, + .pixels_per_line = 1698,//1704, + .lines_per_frame = 1294, + .bin_factor_x = 0, + .bin_factor_y = 0, + .bin_mode = 0, + .skip_frames = 3, + .regs = ov2680_800x600_30fps, + }, + { + .desc = "ov2680_720x592_30fps", + .width = 720, + .height = 592, + .fps = 30, + .pix_clk_freq = 66, + .used = 0, + .pixels_per_line = 1698,//1704, + .lines_per_frame = 1294, + .bin_factor_x = 0, + .bin_factor_y = 0, + .bin_mode = 0, + .skip_frames = 3, + .regs = ov2680_720x592_30fps, + }, + { + .desc = "ov2680_656x496_30fps", + .width = 656, + .height = 496, + .fps = 30, + .pix_clk_freq = 66, + .used = 0, + .pixels_per_line = 1698,//1704, + .lines_per_frame = 1294, + .bin_factor_x = 0, + .bin_factor_y = 0, + .bin_mode = 0, + .skip_frames = 3, + .regs = ov2680_656x496_30fps, + }, + { + .desc = "ov2680_QVGA_30fps", + .width = 336, + .height = 256, + .fps = 30, + .pix_clk_freq = 66, + .used = 0, + .pixels_per_line = 1698,//1704, + .lines_per_frame = 1294, + .bin_factor_x = 0, + .bin_factor_y = 0, + .bin_mode = 0, + .skip_frames = 3, + .regs = ov2680_QVGA_30fps, + }, + { + .desc = "ov2680_CIF_30fps", + .width = 352, + .height = 288, + .fps = 30, + .pix_clk_freq = 66, + .used = 0, + .pixels_per_line = 1698,//1704, + .lines_per_frame = 1294, + .bin_factor_x = 0, + .bin_factor_y = 0, + .bin_mode = 0, + .skip_frames = 3, + .regs = ov2680_CIF_30fps, + }, + { + .desc = "ov2680_QCIF_30fps", + .width = 176, + .height = 144, + .fps = 30, + .pix_clk_freq = 66, + .used = 0, + .pixels_per_line = 1698,//1704, + .lines_per_frame = 1294, + .bin_factor_x = 0, + .bin_factor_y = 0, + .bin_mode = 0, + .skip_frames = 3, + .regs = ov2680_QCIF_30fps, + }, }; #define N_RES_PREVIEW (ARRAY_SIZE(ov2680_res_preview)) From patchwork Thu Nov 11 09:57:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12614527 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EBE0C433F5 for ; Thu, 11 Nov 2021 09:57:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 71EF461267 for ; Thu, 11 Nov 2021 09:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232724AbhKKKAN (ORCPT ); Thu, 11 Nov 2021 05:00:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:45264 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230358AbhKKKAM (ORCPT ); Thu, 11 Nov 2021 05:00:12 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D478D61107; Thu, 11 Nov 2021 09:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636624643; bh=Dbmpxl/hgypg3IsYM0mzq4CDNW9iJBlNW8cqKaLE/c0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RqmijOfJWPpud5dSkj/9SaCUNudP5cy6KRBMKL+jyGCWZssTN7KcakE5UoGngXirh 9c1DEHOmFz8fWI6ZQQJfZ08odnXGZtD+xh2tJnrQK8IwhB94PswiEiQYSA2AluhUIA IzD/LHQU/Fq5PiPdBc2CAUTPiseVCQOGEpqWpgshLe0/LxpUTTLH7po9825ohWyxsy tm2vJHQgoC9Q5Ae4AzOmcvD45aPsv9WMAVhoMuAzOaKQrTL5/932u7PuiZ/Y8ML9ue yirltBnn5m81TNRYZGstGk3F+LDBd/UlaQIF+CRTydOMvNtYsaDCys2ROFkPkcQfUI 8m/O6OjYU44DA== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1ml6pc-004vRb-Qj; Thu, 11 Nov 2021 09:57:20 +0000 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Bhaskar Chowdhury , Deepak R Varma , Greg Kroah-Hartman , Hans Verkuil , Hans de Goede , Mauro Carvalho Chehab , Randy Dunlap , Sakari Ailus , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 2/2] media: atomisp-ov2680: remove some unused fields Date: Thu, 11 Nov 2021 09:57:19 +0000 Message-Id: <832599e3d2c0d6d0683ccfcc728d68e5513c6210.1636624633.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <440a1ecd3e1ef3a58bff40cde2ae57a32e5b0f60.1636624633.git.mchehab+huawei@kernel.org> References: <440a1ecd3e1ef3a58bff40cde2ae57a32e5b0f60.1636624633.git.mchehab+huawei@kernel.org> MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The sensor resolution arrays have two unused fields. Drop them. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/i2c/ov2680.h | 26 ---------------------- 1 file changed, 26 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/ov2680.h b/drivers/staging/media/atomisp/i2c/ov2680.h index ed68510bb0b9..cb3c37d1c38e 100644 --- a/drivers/staging/media/atomisp/i2c/ov2680.h +++ b/drivers/staging/media/atomisp/i2c/ov2680.h @@ -141,7 +141,6 @@ struct regval_list { }; struct ov2680_resolution { - u8 *desc; const struct ov2680_reg *regs; int res; int width; @@ -154,7 +153,6 @@ struct ov2680_resolution { u8 bin_factor_x; u8 bin_factor_y; u8 bin_mode; - bool used; }; struct ov2680_format { @@ -757,12 +755,10 @@ static struct ov2680_reg const ov2680_1616x1216_30fps[] = { static struct ov2680_resolution ov2680_res_preview[] = { { - .desc = "ov2680_1616x1216_30fps", .width = 1616, .height = 1216, .pix_clk_freq = 66, .fps = 30, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -772,12 +768,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_1616x1216_30fps, }, { - .desc = "ov2680_1616x1082_30fps", .width = 1616, .height = 1082, .pix_clk_freq = 66, .fps = 30, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -787,12 +781,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_1616x1082_30fps, }, { - .desc = "ov2680_1616x916_30fps", .width = 1616, .height = 916, .fps = 30, .pix_clk_freq = 66, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -802,12 +794,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_1616x916_30fps, }, { - .desc = "ov2680_1456x1096_30fps", .width = 1456, .height = 1096, .fps = 30, .pix_clk_freq = 66, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -817,12 +807,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_1456x1096_30fps, }, { - .desc = "ov2680_1296x976_30fps", .width = 1296, .height = 976, .fps = 30, .pix_clk_freq = 66, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -832,12 +820,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_1296x976_30fps, }, { - .desc = "ov2680_720p_30fps", .width = 1280, .height = 720, .fps = 30, .pix_clk_freq = 66, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -847,12 +833,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_720p_30fps, }, { - .desc = "ov2680_800x600_30fps", .width = 800, .height = 600, .fps = 30, .pix_clk_freq = 66, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -862,12 +846,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_800x600_30fps, }, { - .desc = "ov2680_720x592_30fps", .width = 720, .height = 592, .fps = 30, .pix_clk_freq = 66, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -877,12 +859,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_720x592_30fps, }, { - .desc = "ov2680_656x496_30fps", .width = 656, .height = 496, .fps = 30, .pix_clk_freq = 66, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -892,12 +872,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_656x496_30fps, }, { - .desc = "ov2680_QVGA_30fps", .width = 336, .height = 256, .fps = 30, .pix_clk_freq = 66, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -907,12 +885,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_QVGA_30fps, }, { - .desc = "ov2680_CIF_30fps", .width = 352, .height = 288, .fps = 30, .pix_clk_freq = 66, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0, @@ -922,12 +898,10 @@ static struct ov2680_resolution ov2680_res_preview[] = { .regs = ov2680_CIF_30fps, }, { - .desc = "ov2680_QCIF_30fps", .width = 176, .height = 144, .fps = 30, .pix_clk_freq = 66, - .used = 0, .pixels_per_line = 1698,//1704, .lines_per_frame = 1294, .bin_factor_x = 0,