From patchwork Thu Jul 30 23:01:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693753 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CCC52722 for ; Thu, 30 Jul 2020 23:01:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BED7F21883 for ; Thu, 30 Jul 2020 23:01:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730687AbgG3XBr (ORCPT ); Thu, 30 Jul 2020 19:01:47 -0400 Received: from mail-dm6nam11olkn2063.outbound.protection.outlook.com ([40.92.19.63]:31832 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730610AbgG3XBq (ORCPT ); Thu, 30 Jul 2020 19:01:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NFE4JwmXrKpqZlEjAgtb2Ma7cqazdSlzvje0jPzjnwN+FbmpFtf6ZB7JpsHScxe3twUx13+E/2w39sKmJrMuHhY4Kdy7HuwJrzcDQPZFxDuFSaee51XidEk8+egNrNipRWhpQ4u0QpcViGo46npM5uq6h1PsBJqAOG+ZFli3EQimqnVndfUCC9vh5SrCusSrkGrXdnZuyuQcF7Qvk5uTsZ9TrKVlg9b1Y4EhpHTD34P3q7jB1QaqaRsxwBTM3crx0GHWwCMC+k7ZFxed+Qxym6LMCRc23Yy54WhG3nd1YMxcGvQE3SMUSpleJZqDstNAFk6qP/uNNA8xDInVLC/WUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aQOKs4z3oyCqFH1/N6DNbATpf65afldethlybdfmeCI=; b=PY2IRARRNwenlnIRefPUmV7gKwD8gsE4MOAOcKQBAdsaU44RvDS1998udGy3+Hm+Gnc3AR7XNLGHA0hxRcEvq+5dzSMYgoOJenIMmbBNOle6py3werkKNv2d09OmXtT0X+UaWO1hJEZmwlDRIPj/xrtkdbveTnxiXY9e7ryt6cCKYAiPXXDBSXKCTYdtyNIFAbTuMeNncAOrLbuXILw3gyqJoSUDwXiU1s3vIx61UD8w/uuJN9KxMuxh9pLYhb+3n98JbJXUV+1MmTG0iL2BPakuC8R1IrC/nUlnILH4bVQ4d7JG3nror+vq4ZmNNsc0nveygqnxoK7/t6KNSOxYKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::44) by CO1NAM11HT129.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::341) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20; Thu, 30 Jul 2020 23:01:42 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:01:42 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:3538F3A21A8EC971FD774DB37A6B524600BE435616978A34993947AB90E2A987;UpperCasedChecksum:1540BB733E1A7B0CF19245EB20CF9206838AAF2F39ADD65EFCCEA00AE2272D7D;SizeAsReceived:7948;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:01:42 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Jonathan Bakker , Tomasz Figa Subject: [PATCH v2 01/11] media: exynos4-is: Remove static driver data for S5PV210 FIMC variants Date: Thu, 30 Jul 2020 16:01:04 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-2-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:01:40 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-2-xc-racer2@live.ca> X-TMN: [xdlFrvN1cYpSRSw+BcwBYjrEe7q0kaD1TG4nQMfqTFz2K62bmR8bfVKVc3qTVvvu] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: ba3cca91-8404-4a19-faa8-08d834dc862d X-MS-TrafficTypeDiagnostic: CO1NAM11HT129: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IcXyHSoQr4sRVRPflvQudeLmz5m7ans69h9rAbqRGjceJ9aY7c32mT6f2xhhKjYVkXrV2sHMSwW+aNR/jpF9nJh4Jcs/HjSYR4D/NmkH5e9BRWfnbp4Hb6Sn6ord8MUhnCKS5kORAGJptCu7UM3dQFSxOECSKeePEAgLT/aP4lU1HrDjvscUgFTS0e1L41sHJokqJZG5f5+GFjjQo0Pf5g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: OLAtvydECkalkU8kDyWvussQnLybahOhZHBaMA+3rXmGZwytP94FCOFoqBawqrNBHcmTn/nnUNVxALvoN+IB6+AnYuVFDTDVZ5jze597tqWGkg3mi14TWGtsZJQ2hvkh1dAr+hIbnLSbwGXqE2cpOD5YMbvSlbGnekqjzlzrhK2XpZfCS4Pr3OsriMR37dO57D78v/n0kJDz5U98p2lCCA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba3cca91-8404-4a19-faa8-08d834dc862d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:01:42.6182 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT129 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The S5PV210 platform only supports device tree based booting where the FIMC variant data is parsed directly from the device tree, hence the now unused static data can be removed. Signed-off-by: Jonathan Bakker Reviewed-by: Tomasz Figa Reviewed-by: Sylwester Nawrocki --- Changes from v1: - Added R-b tags --- drivers/media/platform/exynos4-is/fimc-core.c | 59 ------------------- 1 file changed, 59 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c index cde60fbb23a8..2258f3bfc929 100644 --- a/drivers/media/platform/exynos4-is/fimc-core.c +++ b/drivers/media/platform/exynos4-is/fimc-core.c @@ -1110,67 +1110,8 @@ static int fimc_remove(struct platform_device *pdev) return 0; } -/* Image pixel limits, similar across several FIMC HW revisions. */ -static const struct fimc_pix_limit s5p_pix_limit[4] = { - [0] = { - .scaler_en_w = 3264, - .scaler_dis_w = 8192, - .out_rot_en_w = 1920, - .out_rot_dis_w = 4224, - }, - [1] = { - .scaler_en_w = 4224, - .scaler_dis_w = 8192, - .out_rot_en_w = 1920, - .out_rot_dis_w = 4224, - }, - [2] = { - .scaler_en_w = 1920, - .scaler_dis_w = 8192, - .out_rot_en_w = 1280, - .out_rot_dis_w = 1920, - }, -}; - -static const struct fimc_variant fimc0_variant_s5pv210 = { - .has_inp_rot = 1, - .has_out_rot = 1, - .has_cam_if = 1, - .min_inp_pixsize = 16, - .min_out_pixsize = 16, - .hor_offs_align = 8, - .min_vsize_align = 16, - .pix_limit = &s5p_pix_limit[1], -}; - -static const struct fimc_variant fimc1_variant_s5pv210 = { - .has_inp_rot = 1, - .has_out_rot = 1, - .has_cam_if = 1, - .has_mainscaler_ext = 1, - .min_inp_pixsize = 16, - .min_out_pixsize = 16, - .hor_offs_align = 1, - .min_vsize_align = 1, - .pix_limit = &s5p_pix_limit[2], -}; - -static const struct fimc_variant fimc2_variant_s5pv210 = { - .has_cam_if = 1, - .min_inp_pixsize = 16, - .min_out_pixsize = 16, - .hor_offs_align = 8, - .min_vsize_align = 16, - .pix_limit = &s5p_pix_limit[2], -}; - /* S5PV210, S5PC110 */ static const struct fimc_drvdata fimc_drvdata_s5pv210 = { - .variant = { - [0] = &fimc0_variant_s5pv210, - [1] = &fimc1_variant_s5pv210, - [2] = &fimc2_variant_s5pv210, - }, .num_entities = 3, .lclk_frequency = 166000000UL, .out_buf_count = 4, From patchwork Thu Jul 30 23:01:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693759 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A8EAB722 for ; Thu, 30 Jul 2020 23:01:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A32720829 for ; Thu, 30 Jul 2020 23:01:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730707AbgG3XBs (ORCPT ); Thu, 30 Jul 2020 19:01:48 -0400 Received: from mail-co1nam11olkn2101.outbound.protection.outlook.com ([40.92.18.101]:33504 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730679AbgG3XBr (ORCPT ); Thu, 30 Jul 2020 19:01:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S6AVtEu9gcNNKwiijxVCjVoZlfFrWdaqLiS0MbeY1SZSqryPjACSzwybDzfdMkdg1TuF2cKUHoRIJyE4CaAxG6gZC1m0+XfK7QEjH1aJRbgJevicmHkb9csPT8YiSsMPsvaS41JVB8iVDTvuYl/7gDW2et+usxgDnWlLKe0HBK+1W8y6I0S582yDyNUXcSk3Z4/K6Z5jc4V5YiK2Pw5J2JO5sU5f2rhFuMjARvRFe3sIOcz10zMm0M5L3dcm2i5lXB6tK5UdeaQXqQ+e/usJ8Eh6baVPmQCKbOFxHDOwHSFVCRG1m2mATUrDv0n93DFyEW4AOT8nnGess1ooqDcseA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LrWi4i7InKArJxirSj8URElHcdG+2YoYiJ74Ri0R1b4=; b=IIiCUYOFcDMeN6/Osom2C/Oo3C8YG4IWXII6f2PykHkUb0GNTRLMhDzeK1Dm36ezwggzHeaPeTS5O1I3q+mtsEV0N8iLXmvvydGcnYb/MQI2dfTFwkGXfsmY/khOmFOLWD6g2cba43GauYuA2BrREQNMIGktbL4IXzafGBzecy9yHpwbwBvzBtrV1PiO9m+vRhVSxc3+ydpFTq00/kt+mxIi22FY57LKh3wn5AXDa56/44RW+qSgh62ag2lcwm/ISXzeIB1HY+PSxq439/I2pxxpzGG5LX9tUuaaPgfjPQz9Q2vcu2UiopNIEpnnV/E072QMdQ+iFZCNl7CBwtk/SA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::4d) by CO1NAM11HT244.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20; Thu, 30 Jul 2020 23:01:45 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:01:45 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:69B6BC31054B3CD364E3DC61692BC3297A1AA36D662363AC7B8E6237F428C89C;UpperCasedChecksum:E3D2D5140C2722910C698BA52F0C2D1702EE18D9F843DD650C65B5145869F4EF;SizeAsReceived:7993;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:01:45 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Tomasz Figa , Jonathan Bakker , Tomasz Figa Subject: [PATCH v2 02/11] media: exynos4-is: Request syscon only if ISP writeback is present Date: Thu, 30 Jul 2020 16:01:05 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-3-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:01:42 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-3-xc-racer2@live.ca> X-TMN: [4B10MzEU3GoY2mHOist1sMIusdWFvf5V5FIZG3IrSJvcrHBuSGn7xs8x4cIYj/M1] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 03c5415f-122c-499c-59c4-08d834dc87d9 X-MS-TrafficTypeDiagnostic: CO1NAM11HT244: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QhW/jxyhrz8WYyBK8NyRiEpHt2YjCN2UxOmPXPKzsjVHOUXvSZv7OnSoatnVGmLpVAcrzIPVH+sk4mSnAaJ9IHmZcZKaNgzaCkKd1OZhZX9HE7NJiB117e2332wrlrdqXoP/ItYAlycSKCCTJhskMSWawUo49mBL2qT1kiu1N3iZDhQ8unEu6iiA+jlQRMjzU02ca72MilNL3n7DlJOqvQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: Kv4z+nPUZLHtRTYb+++L4FBNiqCN19YkRItGXWp02nfN8dpWczY08ELx/TYNyHywyE2WGgAUR7iu64Jwdru4U0mqv2pMNh061U/ymsnxNZwaIQYutZARlcEX4CQ5SIfUGjksbZZyoocEcmB5Mwq4RVvA6qc1dQYWeET7+92slkC28h2FXrjBQdYtl5tF0+DqdRBw7P2Pr7afUg0tqD9j5g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03c5415f-122c-499c-59c4-08d834dc87d9 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:01:45.3531 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT244 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Tomasz Figa On FIMC variants which don't have writeback channel, there is no need to access system registers. This patch makes the driver request sysreg regmap conditionally depending on whether writeback is supported. Signed-off-by: Tomasz Figa Signed-off-by: Jonathan Bakker Reviewed-by: Tomasz Figa Reviewed-by: Sylwester Nawrocki --- Changes from v1: - Added R-b tags --- drivers/media/platform/exynos4-is/fimc-core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c index 2258f3bfc929..08d1f39a914c 100644 --- a/drivers/media/platform/exynos4-is/fimc-core.c +++ b/drivers/media/platform/exynos4-is/fimc-core.c @@ -954,9 +954,11 @@ static int fimc_probe(struct platform_device *pdev) spin_lock_init(&fimc->slock); mutex_init(&fimc->lock); - fimc->sysreg = fimc_get_sysreg_regmap(dev->of_node); - if (IS_ERR(fimc->sysreg)) - return PTR_ERR(fimc->sysreg); + if (fimc->variant->has_isp_wb) { + fimc->sysreg = fimc_get_sysreg_regmap(dev->of_node); + if (IS_ERR(fimc->sysreg)) + return PTR_ERR(fimc->sysreg); + } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); fimc->regs = devm_ioremap_resource(dev, res); From patchwork Thu Jul 30 23:01:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693807 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 575F714B7 for ; Thu, 30 Jul 2020 23:02:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4930820829 for ; Thu, 30 Jul 2020 23:02:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730738AbgG3XB4 (ORCPT ); Thu, 30 Jul 2020 19:01:56 -0400 Received: from mail-bn8nam11olkn2070.outbound.protection.outlook.com ([40.92.20.70]:51041 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730722AbgG3XBv (ORCPT ); Thu, 30 Jul 2020 19:01:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=As57PK+A8bWbRZXOVwsn83Y7Va1yGuJqJUyySQBUma2iU+qPKTje0YFAQZMdLnvVv7h1rCtKDhvGGiNEoK4cy0pOFMdNW8a89uxUgnhes5wQcQ6J6VcLUNwAjC4dnpUA2nGkVxgPbroMcl0iKZk+nbjuIkULnrtnnqJFhvquqBHRbaYfMIenK5doG3Sw9Lj3qZu0SpY/TOSAGEfiW28JJ7bmYvCgwunc1gseuSeeAeXwWohzTpBXqVvSvC1J544wJmAQlBd9VakEkR85zLYUqzLZKFcsknLs9Z0S2mzWsmt9QQyKrm7CqtIXPu/tk2/RzYV6tYuey2ppkU0n0Fahow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IFwcI1sfhl05Cfxb1Di5AA+LY2hFfLfRai16fbWZX58=; b=WnhXwiCxloxr3Sj6eAzsffkVXT6fa7EYNio1ep+p5i2Js0WwPcMnwDg1y5vAN7+uHJDbfSwya2XHxrH3CECiOjKWhVR7GS++2eLPpDKWgmsI3/M/i/Tjj57V7JXbVKUIRgr5MSTxFSbkPE2lZNyhTFqF6hAeDBNfoza90T6xYQXSBsjQE6t7IOy92Zdd9koozWrAFfopg52Ly6mjeSUWtnPZbG4dZT3tKcgfmAq2gm4wX0BoUN9gjvkMedIk8ECTh++LkUjZMHfE+eD8Zf7buGDusFkeV3PKtC+idfQ/JswJwSGD4VwP4WH4U5mTgW7oFKehleLTKiF4qqFDiaxwcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::50) by CO1NAM11HT035.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::331) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20; Thu, 30 Jul 2020 23:01:48 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:01:48 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:33A44F6322D0AD2B83F43F8689C76C45CD5E42EA47158C51C25A6059191EF691;UpperCasedChecksum:D0CF47B78F902E1C38966E4DC74BFE8F4A91DB0BB8BB7896936D899EE9099558;SizeAsReceived:7878;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:01:48 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Jonathan Bakker Subject: [PATCH v2 03/11] media: exynos4-is: Fix nullptr when no CSIS device present Date: Thu, 30 Jul 2020 16:01:06 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-4-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:01:45 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-4-xc-racer2@live.ca> X-TMN: [5pTyvKD3uOwSfRd6igeVOCvD7KYa5IT+CI7MuP/mmKyP7C5Yjr67Dtg+vwaUTVjB] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 215fd480-fb37-472c-7bd8-08d834dc898e X-MS-TrafficTypeDiagnostic: CO1NAM11HT035: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4AI5RBbwESGuvJDWsrExH7cLCrJWaMivl2C9UZXfNfaN8ltOkAqJSjU0TE7GMz50PfyFHa9DA8cS4bKgC3dkTQZGeDoFMzF9T0kYLZjcvsoyY2Ch8uEEFRwmZEUqXGpHJaGhx+f3RwPPT+oQDDxZD1LGZaCMjekYa1WMwi/isq8crxLwY2MFKdB8WM5prWY0GMtoXmmf3w192JqkUwDixw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: 7kb0G2eI5B0JU/fAKFN4PAkfPk25wCftyzpqMxxu01/T/E7LXipeJfk83og3zQqfpz6bYST/9YmdXqlYfTG7AWGqTOWuY2Y//worAX3W83B5TdYrlGQgLaT6KrQor2iSN79wXi55q/hw9dXx6DQS9buYXBENzAJn80roruFYurWkANi/wOsHYzHPEW60ok9ZBUiCAAETc5r2Yw/jU8ot0A== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 215fd480-fb37-472c-7bd8-08d834dc898e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:01:48.2189 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT035 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Not all devices use the CSIS device, some may use the FIMC directly in which case the CSIS device isn't registered. This leads to a nullptr exception when starting the stream as the CSIS device is always referenced. Instead, if getting the CSIS device fails, try getting the FIMC directly to check if we are using the subdev API Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki --- Changes from v1: - Added R-b tag --- drivers/media/platform/exynos4-is/media-dev.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 9aaf3b8060d5..5c32abc7251b 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -289,11 +289,26 @@ static int __fimc_pipeline_s_stream(struct exynos_media_pipeline *ep, bool on) { IDX_CSIS, IDX_FLITE, IDX_FIMC, IDX_SENSOR, IDX_IS_ISP }, }; struct fimc_pipeline *p = to_fimc_pipeline(ep); - struct fimc_md *fmd = entity_to_fimc_mdev(&p->subdevs[IDX_CSIS]->entity); enum fimc_subdev_index sd_id; int i, ret = 0; if (p->subdevs[IDX_SENSOR] == NULL) { + struct fimc_md *fmd; + struct v4l2_subdev *sd = p->subdevs[IDX_CSIS]; + + if (!sd) + sd = p->subdevs[IDX_FIMC]; + + if (!sd) { + /* + * If neither CSIS nor FIMC was set up, + * it's impossible to have any sensors + */ + return -ENODEV; + } + + fmd = entity_to_fimc_mdev(&sd->entity); + if (!fmd->user_subdev_api) { /* * Sensor must be already discovered if we From patchwork Thu Jul 30 23:01:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693763 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DECDD138C for ; Thu, 30 Jul 2020 23:01:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C91832083B for ; Thu, 30 Jul 2020 23:01:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730458AbgG3XB4 (ORCPT ); Thu, 30 Jul 2020 19:01:56 -0400 Received: from mail-bn8nam11olkn2031.outbound.protection.outlook.com ([40.92.20.31]:37217 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730679AbgG3XBy (ORCPT ); Thu, 30 Jul 2020 19:01:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qn+NJ3pwYbw8TdGyGjfZ7pq19qFrBlWe9cYgBYOi4jWfdjkudrLwsN1nrIJDfS6z0ASh1LdGaJ+o0PhTaONW/8tmoo3h7xf/hV9jwr6PxgYOGdf+6nDEd0aNu2gkt7TJ/8kDsu1tmSbQ6WHb0m4vhzWA2ZALPl2VZT2j0NLwBtjsOODLN4byUfnYfdIy48EpIkhD/TSvMSq2Kxof3usD7CNZfNhkL9E2P+uEcWatdFusx92g4x/Fy3hFwXPwQYJEut5cf6bgpxIOMmfesC88afSMh4lssmAD13K/2lVRgldbFjB13rd13QuxpzSnMgM2bCm8qcxLimEvnWFh5m7gQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fzg4p0YpzGXpf7c5aJJBP2/5PAd5jC2Q8FULLAgJgeM=; b=VtBsHZyofX+RWAQuQ19hwYGOrvei0QyV7MW8fGwXA1Ow/o+uhpEEb5UNBrRdiSIX4UYgl7kMM5sn0gdvyDQQwcd1owsnZQ9MgVQfoi366zBMAHWX52nmKJZANuM7LVBJRdBXr4n32SzDNzdsEC5jZP5C64F5YTb3I5fCZJnfz2CeaxVN89+bpxZl9F9/rbVYH9RY975YMYdAFpr6wslCPjB9WMjW/THQN9Y9TntNFJbKw+sEBPft+lmQAAXwk1s8VWyX4Rh8NnEhCW1f+Kjzd3G2Vk1BS/Nv/ygWrayUVjdyGZKItq4Nprsa9aEsJrw2SJXpKGSI6AeNU2Oo44o63A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::4c) by CO1NAM11HT140.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::262) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20; Thu, 30 Jul 2020 23:01:50 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:01:50 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:930056DD45444DF0AC78256E6DFA894564C3A9184EBDBD6DD92555D32A7F8682;UpperCasedChecksum:824827314BBC270D468198818A60EA385CE1CFD2F658A6645D723140B0A60A3A;SizeAsReceived:7885;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:01:50 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Jonathan Bakker Subject: [PATCH v2 04/11] media: exynos4-is: Correct missing entity function initialization Date: Thu, 30 Jul 2020 16:01:07 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-5-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:01:48 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-5-xc-racer2@live.ca> X-TMN: [Sa45lLcPFhOwcEnF5E5Yb3IoYxNJ92gRTGfPqX30OqV8oD48i2Hvw64Ur5z4kkVg] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 445a7fea-0c28-466a-c284-08d834dc8b06 X-MS-TrafficTypeDiagnostic: CO1NAM11HT140: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oFUHIckc20eIyHlThbpMTM/up2nJleScSkNxHqC9/LGKjyMh+gRQwNC29wrU9mbtrHDnYFtBbchbEtI8ac/fqdNPYi4LKks67xGVE0wYdOD42A7AWpaa72rBOBMWRDWpW7TsVwhBoe6Lx6/2ar4yVUJ0WBuJwjXa10sPQ0mUEUGicuimtJ5IXc+N1p6URPWIZljJ0KcUtUJLkPS9ahU67A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: v2HlyQ9hR2O0LjT7FhgKOJfrPChCNVvEUgoUdFMsRuuxjzSUOt57w46ismZY/yO0dxDxmU/Z1ZhA2oyfwP6HMmtBeIB9mNnwnbjKko7j0MTLqMfrum3NJK+1MQ2h6VWYMxq7pkP/bPHP0WgWRKApeEJ9PuAOBjjZeG55lDI8/lddnH3hlQrHDIbXZw7CIYhoEQXAVOjQbBE5Z/phuMLTPQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 445a7fea-0c28-466a-c284-08d834dc8b06 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:01:50.6998 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT140 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Commit bae4500399c4 ("[media] exynos4-is: Add missing entity function initialization") tried to suppress the warnings such as s5p-fimc-md camera: Entity type for entity FIMC.0 was not initialized! However, this missed setting for the subdev. Set it now to avoid the ugly warnings on boot. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki --- Changes from v1: - Don't remove the function from the vfd entity as it is distinct from the sd entity - Re-word commit message for above change --- drivers/media/platform/exynos4-is/fimc-capture.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c index 705f182330ca..82f051f6b816 100644 --- a/drivers/media/platform/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/exynos4-is/fimc-capture.c @@ -1898,6 +1898,7 @@ int fimc_initialize_capture_subdev(struct fimc_dev *fimc) return ret; sd->entity.ops = &fimc_sd_media_ops; + sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER; sd->internal_ops = &fimc_capture_sd_internal_ops; v4l2_set_subdevdata(sd, fimc); return 0; From patchwork Thu Jul 30 23:01:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693799 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1DB4A722 for ; Thu, 30 Jul 2020 23:02:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0EDA02083E for ; Thu, 30 Jul 2020 23:02:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730773AbgG3XCD (ORCPT ); Thu, 30 Jul 2020 19:02:03 -0400 Received: from mail-bn8nam11olkn2038.outbound.protection.outlook.com ([40.92.20.38]:30688 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730730AbgG3XB4 (ORCPT ); Thu, 30 Jul 2020 19:01:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SowYpgBUnOP3L4PIpIW+QttKzdmDgVZF/U+5ulDJOjpjTKEqQ9i0X5x8kt59HpSK19Z0MAP1Hgji40xfS/UvVo+EVXy0x4J7DCy+FretDk1dND2y+CjbRbrHhucrbEjJoe31gCnxxGVYalLjuC1GJBHRWqUFW3l7G7c/pWeC3e2HJkfp5/S99kGbClxvhvtfdq4L9OnSWYtofXA5EqtWqCPbW41GWRj63WLKChXkq0SrhOMJpEmS9pCJcsTdBVgHfzAptSduocoY8eUyHmFGnr38rVKd08X0TbGhfdqP5y0+7YKf5593W61euVJmnQdZQ4AJXXRgycacMoEHG5/eAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oPOU3Pqy+7AMsEp+2f1FLlsm3Y/VJ9J0mITZ3S4WYqk=; b=A3/E0uwU6CYNR1CGm7Idh118u/Mwg9rCO5X6D685guuaRw7NAID5ZgE/9Wqgir2vITB1xbD0Rj7ldzypEesE4VoBpJPnKFHnhWBPOZ8VfsP+/Y11qMR6BRjtQSQzehGnBKHkMFUv4pyELb9aaHCRlhqAmr+2BKnktON3V5YfY7k1zpO1PmFnZI5a7JumH4PyPCkkuNj7XIdP3M2Kww6mg3M52U6AslAgqGyrH2WLRNaOtaSVhfl01dvXmTo9eDadaqfzk38MAgPl4Sm9sb007iGE1D+Fh+PQa/R00o7LtDq8DFRiFXgcHz5oeLV/aLoWy4qEy79roQH0OzClc77PlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::49) by CO1NAM11HT024.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.34; Thu, 30 Jul 2020 23:01:53 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:01:53 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:34E6A582C7CEEB1B120FF0426C8CBF7DEF9FC53914CDE0FA451380ACF3445E0E;UpperCasedChecksum:C3D149B0385F3212795C78D4112D990E1EEFF348F159996243496527CF57A9FA;SizeAsReceived:7897;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:01:53 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Jonathan Bakker Subject: [PATCH v2 05/11] media: exynos4-is: Properly set JPEG options for parallel ports Date: Thu, 30 Jul 2020 16:01:08 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-6-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:01:50 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-6-xc-racer2@live.ca> X-TMN: [XUMFdNQ3ktpLQlcl5YT/V9IQPutN4lV7yIQkFVF3IaPuV09RcCDOFjpFqnWZoTKn] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: adab711a-4a43-4b02-6848-08d834dc8c89 X-MS-TrafficTypeDiagnostic: CO1NAM11HT024: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Gdx0wHdFujlRIr6s0+ggopvAInFF9UjuCMXE5tBhRU+3Ijz1iFvkA6JCHXDAkTa+vHNu812XUNLGClueEZ4wrpbycuTM4om/WEzuLd096Th6CxLdeYm4VfwL5Hb/WJ1hLlDcpqEXgv2AhF+eNCO9JD419g4XmDtXNZA4KbyfEZalDDSgd+holGN6BeFDx6sy8kuJCepPBpV5VjvrU3Cytg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: 37GHycH95X64Zwn0w26gyL48Z2Vj++IPng6Wa6sKLg6wI0bEQPSyGyQYw1qDksLi9lulBdzKzWCfGbTcfH/w49Z8AM+6ti5B/TpSDEIZJevLCPV5S24TToKhRvjjCR2zqsQAnljOwHikyC7EWYxYv7rG0y1RtvtYgaKPomvJeyVuRlbiAQVTIXUmPbnxHJ6O8ubYeEuInJYH5iYzSbwcAQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: adab711a-4a43-4b02-6848-08d834dc8c89 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:01:53.2248 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT024 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Commit ee7160e57c98 ("[media] s5p-fimc: Add support for JPEG capture") added support for JPEG capture, but missed setting a register when the parallel port was used rather than the CSIS device. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki --- Changes from v1: - Re-wording commit message - Add R-b tag --- drivers/media/platform/exynos4-is/fimc-reg.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/platform/exynos4-is/fimc-reg.c b/drivers/media/platform/exynos4-is/fimc-reg.c index 5ce2bdebd424..269a98fca1e8 100644 --- a/drivers/media/platform/exynos4-is/fimc-reg.c +++ b/drivers/media/platform/exynos4-is/fimc-reg.c @@ -606,6 +606,11 @@ int fimc_hw_set_camera_source(struct fimc_dev *fimc, switch (source->fimc_bus_type) { case FIMC_BUS_TYPE_ITU_601: case FIMC_BUS_TYPE_ITU_656: + if (fimc_fmt_is_user_defined(f->fmt->color)) { + cfg |= FIMC_REG_CISRCFMT_ITU601_8BIT; + break; + } + for (i = 0; i < ARRAY_SIZE(pix_desc); i++) { if (vc->ci_fmt.code == pix_desc[i].pixelcode) { cfg = pix_desc[i].cisrcfmt; @@ -707,6 +712,8 @@ int fimc_hw_set_camera_type(struct fimc_dev *fimc, case FIMC_BUS_TYPE_ITU_601...FIMC_BUS_TYPE_ITU_656: if (source->mux_id == 0) /* ITU-A, ITU-B: 0, 1 */ cfg |= FIMC_REG_CIGCTRL_SELCAM_ITU_A; + if (vid_cap->ci_fmt.code == MEDIA_BUS_FMT_JPEG_1X8) + cfg |= FIMC_REG_CIGCTRL_CAM_JPEG; break; case FIMC_BUS_TYPE_LCD_WRITEBACK_A: cfg |= FIMC_REG_CIGCTRL_CAMIF_SELWB; From patchwork Thu Jul 30 23:01:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693801 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE72C138C for ; Thu, 30 Jul 2020 23:02:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFF112250E for ; Thu, 30 Jul 2020 23:02:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730765AbgG3XCC (ORCPT ); Thu, 30 Jul 2020 19:02:02 -0400 Received: from mail-bn8nam11olkn2057.outbound.protection.outlook.com ([40.92.20.57]:12065 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730759AbgG3XCA (ORCPT ); Thu, 30 Jul 2020 19:02:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NGk32Sw6be5mpPSNM8GYZb+mRoTamhUG6a/00/CL3mvj1X7Eqny+vjppiDJwPmln/81/4bCG0CIT+RqVhym7/lqNA5NuinAsJ4WbraGYNGMSkKq0I0RuFTQpHqqLOvH7kvZctX5TzjzFIgUw4Ayr+pnKASjqi2b8eADS6RfSJh0jGdVLdv4vMVDhpaZUdvd/KYHPT2MgLhHkO9sSXhU/kHElVL6c23a9fXixm2FsqVjy/lEHajRT7DFUQ6QuruWdIuPE9Ootk9AfRFbJFl+94chQH3d20pYBu6F+6yJz/7qHB1cdqZkdsdxByo9v8+1OHwHaN5UnjF1Fprp2MEH3pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YzV4jJ26gKp+YoyYh2H7zNySDRn/44W+1lg1EWI3eRs=; b=e+Oqe6RswafIcAZBIBO7w0A7m0ExykNBwWIAOjdYrFllZ9Bmi7b2P1PglmDrjisUFHI9DYFX5GindmhJ2WzAqS1wKxRbaxbJZ4VeXP0u2Uk6JFqhX9Cr31aZkADMwlHFcayioXaeJ3WB2jf0LdDwwQDeG82iL5qdDPeyt17N9IvlTf58lOQyo705SrQuOrIYe7zG3+5TRVhPRGKTMrxASqD1Jk3UTBmCWnHa5KHsL//FPCLJRu+pP7oY2h8xzke2kdsif0o57MiU+2zDGzjpzuaNSWwm2PXKgmTkYE7+roXsvO68JrzEKC2OWgFXh50PfRuJvdaWYnCdWy0UFTIPow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::43) by CO1NAM11HT255.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::391) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20; Thu, 30 Jul 2020 23:01:57 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:01:57 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:90C7DFD20FEE48D4A92D59C9E1AE01C5384C3DC4A9366603477D130A311D71C5;UpperCasedChecksum:F2D0D7A2362F274319A1DBAD0FEF24C064011A265C3A4BA6E4E386A0927F93C8;SizeAsReceived:7875;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:01:57 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Jonathan Bakker Subject: [PATCH v2 06/11] media: exynos4-is: Use global num_sensors rather than local index Date: Thu, 30 Jul 2020 16:01:09 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-7-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:01:54 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-7-xc-racer2@live.ca> X-TMN: [eLa2Rbv6VCJG/Hsz7K+M81GItwGuTbRYFBXedc8GzqsoGD3qo0vzKhexeYG9l+V8] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 24082640-ada7-4321-2eab-08d834dc8edb X-MS-TrafficTypeDiagnostic: CO1NAM11HT255: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LlNiGL7vAMnMC/QLUtVWdmaUobOPeADzz6pTrkmNKfUxxdY1GjZykuKhkgUMABYvzABzw1InrVSjl5EiKh9c1ITN/yfzM7aSJ48tXRj3jmkG2dOwzwcjJFdbjvw8a1Y0u54H+sVvGAbR5+nG6IPAu56h3KVzA1FOHSLQSDBbtVfptHhKHzyIf2CfAf3PrtATL/P+CzRngODaCTPUqC7ZPw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: 9A1Jzr8Ik4QXA+tC32j2M0a/+mhO09HjNPICDBL4FLDckfnT1BODCqrU+/Lew7kEE58RPeyO6B6ClvGcX9NO6X45SdfJpEdKR1Tu++GbQig8Z7k3REihh3Jf9jaanH0idPPrYIbe40os3PraAznHREqmx6DhVezCp4/zkkvj0WNa1nUdcubFnJWoAAO9krKrbckTUNLYFc314/OIqVJqnA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24082640-ada7-4321-2eab-08d834dc8edb X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:01:57.1361 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT255 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Instead of keeping a local copy of how many sensors we've probed (which may not even properly represent the number of sensors probed if we have a port without a sensor), use the global num_sensors counter that has the actual number used. This will also make it easier to add support for multiple sensors being connected to the same port. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki --- Changes from v1: - New patch --- drivers/media/platform/exynos4-is/media-dev.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 5c32abc7251b..70b0a70840cf 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -396,9 +396,9 @@ static void fimc_md_pipelines_free(struct fimc_md *fmd) /* Parse port node and register as a sub-device any sensor specified there. */ static int fimc_md_parse_port_node(struct fimc_md *fmd, - struct device_node *port, - unsigned int index) + struct device_node *port) { + int index = fmd->num_sensors; struct fimc_source_info *pd = &fmd->sensor[index].pdata; struct device_node *rem, *ep, *np; struct v4l2_fwnode_endpoint endpoint = { .bus_type = 0 }; @@ -488,7 +488,6 @@ static int fimc_md_register_sensor_entities(struct fimc_md *fmd) struct device_node *parent = fmd->pdev->dev.of_node; struct device_node *ports = NULL; struct device_node *node; - int index = 0; int ret; /* @@ -515,13 +514,12 @@ static int fimc_md_register_sensor_entities(struct fimc_md *fmd) if (!port) continue; - ret = fimc_md_parse_port_node(fmd, port, index); + ret = fimc_md_parse_port_node(fmd, port); of_node_put(port); if (ret < 0) { of_node_put(node); goto cleanup; } - index++; } /* Attach sensors listed in the parallel-ports node */ @@ -530,12 +528,11 @@ static int fimc_md_register_sensor_entities(struct fimc_md *fmd) goto rpm_put; for_each_child_of_node(ports, node) { - ret = fimc_md_parse_port_node(fmd, node, index); + ret = fimc_md_parse_port_node(fmd, node); if (ret < 0) { of_node_put(node); goto cleanup; } - index++; } of_node_put(ports); From patchwork Thu Jul 30 23:01:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693795 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9DAA138C for ; Thu, 30 Jul 2020 23:02:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A735D21883 for ; Thu, 30 Jul 2020 23:02:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730781AbgG3XCE (ORCPT ); Thu, 30 Jul 2020 19:02:04 -0400 Received: from mail-co1nam11olkn2046.outbound.protection.outlook.com ([40.92.18.46]:27315 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730448AbgG3XCB (ORCPT ); Thu, 30 Jul 2020 19:02:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AKE3Mf6UqFX5HD2DOyHl5bDRbRQeN+9TXN3UYi2nRBdMjETmgc7+0AHluAvtg88fxciTGsgaCkeJ9htzOUw2NV17vp7Ntk+RaWbdyHQrZ6XjV2LI8eAYpSw9k7nMiB5bYOPdRU4asoIq3lHlRQt2B1TObSS48XUGebkSdC+sqJ92TUsPLPqo2KhfXJS+C96MLskBmaa5Y6A/gfsFWQdbXhwRJ2wnLHGN3Fap8g5JWnAK9B5eL+J8GgLNRomO1IZQeqQPWgbHvZqkudcQMjKXY+dBZqOYux8DDd7Dn2v+HP7h5rs8oAIo3nCoC/iczeh/zuEH42/Z1AcVcyvvsLsvrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JD5D/K+YOcaHEelvCtTtp3WVVuV1oKEaVPdLgu7VF8k=; b=DY5eWIi1kL8yo2BwdZNbEHFLwSWJglmVMHN2TCJQXrJMF4+FIR9M/+w8rvc+gbL5vXgFMSl5tjku2Uh+liFRNvbz4763kmemcehJ8V4kq3vfKuv+PR18S7cn5heqC/wftxp4nmXxNnLY4SILAo/6F0h3HbNQon0Qq3xuQ42VVbLpHx3BjVhVDf1uVnHzsbL2CwCiY+zEGC37ULL/At8PHDzIGR0B4IUEctBeE9tDaDLtUJYu552h9f57ybt+HuJdyLm7jB2dM1J4TI1A3eg25A6PAjcMzd2OXZV3+I139LTp3l6u9KG1Rtr59OHdWE7yg1IyFHQOeYxvB0j5ZZcBog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::47) by CO1NAM11HT248.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.10; Thu, 30 Jul 2020 23:01:59 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:01:59 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:91B40D7CCB0CF246473237CE7063468868981E2365E6A229D029AAE4A81270B0;UpperCasedChecksum:27A67388A55D91C7A5DA75087D551B23173E720CEF8C3A7DBC961D1D488CDE32;SizeAsReceived:7874;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:01:59 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Jonathan Bakker Subject: [PATCH v2 07/11] media: exynos4-is: Add support for multiple sensors on one port Date: Thu, 30 Jul 2020 16:01:10 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-8-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:01:57 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-8-xc-racer2@live.ca> X-TMN: [JrF8oTi6rFTDZdf5fmmX6ALqLUqYrBV2AmSBzh+md3cYM8SZSL76vFqOPu4Nd9Vx] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: db38cafc-8b28-4935-e1a5-08d834dc9057 X-MS-TrafficTypeDiagnostic: CO1NAM11HT248: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EZymLmPO/YonkdFjQPRNlKJ2UoqMOJcm5V5Wril5aZjUR+c1ncx58dEVSXi7yoM8efyEtHZuyKhOcMKsvaB5grqAbNwC6oKMWAVFYgqDeXvkiAW6g6TeTLw3fEr41UlFKBcPZbHDueXyQ9MQERhlUguOOio21obbo8mWiBBOfJo+kBEphjwTmqc4m4ISYru8vyAigFecJNzB0o6QPzTxdQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: uChhgvxFYvgDL3O7FnZxkxOMS7TznRdNmdcSDvTzF4X7I7m2SZfrhhE1haYr6JDyDGMfW0dKUJ3CYoGQPAh0Jb100H0EQv2Dm47/DR/MK2GCiCWau17Xcn8midrhKluTHvmjRYLZ0J4AVpJS7D1zgpW7T4FspzPludfx+2f56ss8tMwoPD2LwoPubyPNPmuC4/E3PnnMj6DXvEdZVpqRZA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: db38cafc-8b28-4935-e1a5-08d834dc9057 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:01:59.5691 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT248 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org On some devices, there may be multiple camera sensors attached to the same port. Make sure we probe all of them, not just the first one. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki --- Changes from v1: - Separated parsing each endpoint into separate func --- drivers/media/platform/exynos4-is/media-dev.c | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 70b0a70840cf..6d9b8fe3ac79 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -394,21 +394,15 @@ static void fimc_md_pipelines_free(struct fimc_md *fmd) } } -/* Parse port node and register as a sub-device any sensor specified there. */ -static int fimc_md_parse_port_node(struct fimc_md *fmd, - struct device_node *port) +static int fimc_md_parse_one_endpoint(struct fimc_md *fmd, + struct device_node *ep) { int index = fmd->num_sensors; struct fimc_source_info *pd = &fmd->sensor[index].pdata; - struct device_node *rem, *ep, *np; + struct device_node *rem, *np; struct v4l2_fwnode_endpoint endpoint = { .bus_type = 0 }; int ret; - /* Assume here a port node can have only one endpoint node. */ - ep = of_get_next_child(port, NULL); - if (!ep) - return 0; - ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &endpoint); if (ret) { of_node_put(ep); @@ -482,6 +476,22 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd, return 0; } +/* Parse port node and register as a sub-device any sensor specified there. */ +static int fimc_md_parse_port_node(struct fimc_md *fmd, + struct device_node *port) +{ + struct device_node *ep; + int ret; + + for_each_child_of_node(port, ep) { + ret = fimc_md_parse_one_endpoint(fmd, ep); + if (ret < 0) + return ret; + } + + return 0; +} + /* Register all SoC external sub-devices */ static int fimc_md_register_sensor_entities(struct fimc_md *fmd) { From patchwork Thu Jul 30 23:01:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693793 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70033138C for ; Thu, 30 Jul 2020 23:02:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62BE722B48 for ; Thu, 30 Jul 2020 23:02:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730853AbgG3XC0 (ORCPT ); Thu, 30 Jul 2020 19:02:26 -0400 Received: from mail-co1nam11olkn2089.outbound.protection.outlook.com ([40.92.18.89]:48096 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730770AbgG3XCE (ORCPT ); Thu, 30 Jul 2020 19:02:04 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b6t+tJROmpXol7kejzNBPpdvwjjoxV6yA/Kla5FMK2FB9/8W3xXXxkJafVoAi2r6hh4aT5ELtD5NYjWYR/d+kNb0CjDPSkJ9Mtx/7qY2Kqr+GIl1kL4DFbA0LGiX5F6yzptPW3ze23SKj/zzPQt0kvFg5e2r40h9KQtNgzuGvT4V+RJu92ATs+k6N270bQYNrAGvaCBv5W79UNJAF0/FdB58u2yvi6bEyJ3fJ/a/YYVTAqfB+RckKW7vqz0pRUPG4u0E/RqyDKQZjl8YRUGbDBNiFolwjm4BsinzdyU4+YCearEoxYTfe3AizDR3xB1qa9wGZvfut+V3uFfhFaRpaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2pJ6xJQhePW4eETLLlJKJGjutRhO0/Rc8Esmkoshk5s=; b=S+2UQJba76GrvFrt3FLlgCMjK84lfPK+IIkDhmQQTXLZJM+0Qjvn5HU7M3z3jlhVMoy7uLKBsjWmc9/v2E5B+I4J1CzqyXPUwKiKJG2KKwylkZ7L6VWxUAlQW+37rzDvmImDB6V9Vo0foHIkYg6urQzytPM0OVzf6lGLzk/D7bPT1GkEHtHnSCmK6FKUeNHSUzkA2nIdOCXzD5SK5bBdYUnMzLPxT+V1OfvIRr9zZn3l5cXrfPvmTwliOFguik9drhBDGXD6A3rKpjTIo+selT7h63CdjEtP5QKqKetw5nadg9yivdzG2oI4Wes1GtLSnnvXSI/Zvskj7R3i7UYqhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::45) by CO1NAM11HT133.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20; Thu, 30 Jul 2020 23:02:02 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:02:02 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:22984D4AC8BD4FCEA25A7B65AFA40CA7A2EBD9C78C1223786523D479F330E945;UpperCasedChecksum:134294722C09C000F6ACEE3BBB1E529F04DE0C8A6F6FF0B70C9A587EC48BD131;SizeAsReceived:7912;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:02:02 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Jonathan Bakker , Tomasz Figa Subject: [PATCH v2 08/11] media: exynos4-is: Remove inh_sensor_ctrls Date: Thu, 30 Jul 2020 16:01:11 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-9-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:01:59 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-9-xc-racer2@live.ca> X-TMN: [Mg/ZFCpLrxkWYy9upa9oNV+bBeZCE0wJaDtq08CU5OCCzmMNLfCN+/Y5Z2zfV++L] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 4fdd141b-1242-4ba5-efa9-08d834dc91d7 X-MS-TrafficTypeDiagnostic: CO1NAM11HT133: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eFR2PgS6y7n4HfgDdMmfK7mI7/FlEr3WNaVOXft2metJt0ZsOGpIOXzOjvLbOve2jMI8/fYnnuADJ02eVSzL7FWwx2HV6JIc2AzvAreQyM9PdhPkRjznifvRH6CZh/wa9OHGyLBLOoOr3zguxNXk9hjys+bJ3W74B9SqupaoZ4NRdUMQ92sZY2YEWWB2ESxACQtjrQ32LKyg0k/plGUALg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: zIEFU3O3E1HYVHYqxzmkakHQ473vtdu5dRE80GDyPCGliiYvBof7vkfaqHKZviFEi0HChGZ/dCsW7+QQSkeiLuWk9ZJJGx52JboM586b2g3uvXeyHN0WRK8B5qDpTQchvyftM90eEuDX/81ECJ3tuAkRpWmifxlvLWkkyV96DePAjtaTvVrS8+2D6m8nYBzCHASjJHhW2wQi66crMn2Twg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fdd141b-1242-4ba5-efa9-08d834dc91d7 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:02:02.1020 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT133 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This is a no-op as it is never set and is a remnant from non-DT days that can be safely removed. Signed-off-by: Jonathan Bakker Reviewed-by: Tomasz Figa Reviewed-by: Sylwester Nawrocki --- Changes from v1: - Added R-b tags --- drivers/media/platform/exynos4-is/fimc-capture.c | 13 +------------ drivers/media/platform/exynos4-is/fimc-core.h | 3 --- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c index 82f051f6b816..e70785d8a809 100644 --- a/drivers/media/platform/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/exynos4-is/fimc-capture.c @@ -492,17 +492,6 @@ static int fimc_capture_open(struct file *file) ret = fimc_pipeline_call(ve, open, &ve->vdev.entity, true); - if (ret == 0 && vc->user_subdev_api && vc->inh_sensor_ctrls) { - /* - * Recreate controls of the the video node to drop - * any controls inherited from the sensor subdev. - */ - fimc_ctrls_delete(vc->ctx); - - ret = fimc_ctrls_create(vc->ctx); - if (ret == 0) - vc->inh_sensor_ctrls = false; - } if (ret == 0) ve->vdev.entity.use_count++; @@ -1408,7 +1397,7 @@ static int fimc_link_setup(struct media_entity *entity, vc->input = sd->grp_id; - if (vc->user_subdev_api || vc->inh_sensor_ctrls) + if (vc->user_subdev_api) return 0; /* Inherit V4L2 controls from the image sensor subdev. */ diff --git a/drivers/media/platform/exynos4-is/fimc-core.h b/drivers/media/platform/exynos4-is/fimc-core.h index d130f664a60b..31f81bcb8483 100644 --- a/drivers/media/platform/exynos4-is/fimc-core.h +++ b/drivers/media/platform/exynos4-is/fimc-core.h @@ -299,8 +299,6 @@ struct fimc_m2m_device { * @input_index: input (camera sensor) index * @input: capture input type, grp_id of the attached subdev * @user_subdev_api: true if subdevs are not configured by the host driver - * @inh_sensor_ctrls: a flag indicating v4l2 controls are inherited from - * an image sensor subdev */ struct fimc_vid_cap { struct fimc_ctx *ctx; @@ -322,7 +320,6 @@ struct fimc_vid_cap { int input_index; u32 input; bool user_subdev_api; - bool inh_sensor_ctrls; }; /** From patchwork Thu Jul 30 23:01:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693789 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3CF5138C for ; Thu, 30 Jul 2020 23:02:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C027C2250E for ; Thu, 30 Jul 2020 23:02:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730749AbgG3XCU (ORCPT ); Thu, 30 Jul 2020 19:02:20 -0400 Received: from mail-bn8nam11olkn2084.outbound.protection.outlook.com ([40.92.20.84]:47840 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730797AbgG3XCH (ORCPT ); Thu, 30 Jul 2020 19:02:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y4YGvroDTAT4al7kxZCoV5WNzn1ZM0QRDTnSL9U9xsciS6CZz4dYVQCzcp77AN2iDoUXVpl8LZ3TncGxUJYXItn6gOqaWGbKaYhjWb8MLGmiWNMEzgxiiruER0H2K+ItBHr4R6zvI4YOATy8wXKIB55csfIS35mmXqfDaZG/n4+Q5YZwbrxbza6P53bGekYafI8ikdydfUlFcPu0+xQOuq38E310pjCclRVrNkEvjx9WEwDkD/pCecm37XB4cYElgFKlLvup2nG39Gr0uGAk2cvsm5AJISlrC2hbDar9TytY4LbHF4PRoOP7qk1nogVaX/X/aRQk+r0e+O6voUHSjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jD8XzNyqpPreDE2Rfv3VNrWOVOYt8tVX3RZODYw1pBQ=; b=Ls9BuZjFabJBJzD/WtTy8Zw2Mi94+/moPzMo2HoEaQ+IhK6QyUstiU41qol7+eSFU096MajVq/2ZmENLaVR95WR8qpjod8IMk0LCIfXzrZqNmIYc4tMYzRiZYQdVbZdtMkA3WqT1NvGqahCjb+5Oqv0LFqOT/JNysTyW9/PfSTusRIY7xwKFMeiI0Ay3ICJNGt/fpwRxiNrrF6NujY870WnlcfWzs2/Sln5w0mnOe2pNrL2bv/pH4ShSCFe9hF6A1wt+g6xwfcXfT80vAvp1Lha7YcvfFZlGWFjAhKq/u+h1pAQYddNo4iSkk8hKrZvnhaks0jxQq9inxjgjzmRPhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::50) by CO1NAM11HT035.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::331) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20; Thu, 30 Jul 2020 23:02:04 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:02:04 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:883F420810CBB5E7843D5AA634682D78853077D4B51FA22BFD96F3EC8E3B8020;UpperCasedChecksum:2B0059B2CC71C105466FD921049AB1735E2C44167B5712A8E7F315CD2C9DBF9C;SizeAsReceived:7939;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:02:04 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Jonathan Bakker , Tomasz Figa Subject: [PATCH v2 09/11] media: exynos4-is: Remove unused struct member input_index Date: Thu, 30 Jul 2020 16:01:12 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-10-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:02:02 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-10-xc-racer2@live.ca> X-TMN: [GYHsq9+Losd5LolH1lyGbfaaG4GRUxdCFIHv/0f0Tf1wVPJbesAJEryPD5TktRMX] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: a9abaa17-c50a-453d-0a8e-08d834dc935b X-MS-TrafficTypeDiagnostic: CO1NAM11HT035: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IuyCEPITPm9L5UJpenW7Kcp8siLoSOBcyXTPkKs+H/2vpcBnZNZOav+NzCba4JHqEdaDhSqXQH/9ZuFRqR5t7/unWZbUnsO3eIPj70Gn7/fJBlLQ8KO0sXLMQbs+rPLlbRyMjgys0FFUWqewUyF1FZlJ6e7IZNIxm5+4Wqne+kKRPuXro3705N/23YzerxmBzm84xokm+yykosoSQwgkTA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: yGfqJ9d3HLX7DhJzCG3vmxX/BLlMZepPu1F96I/7YH9zHDjCxwOSFB32cfStH6z5+cIPFJHL27uzUBJpxxmHHkmNDbazGihM1ZruWqSCtYmlVNt60kd6/FPcTKymbnWg/yvoAjgOK/tqvHKvn8DTxKjeYkrUz8o454g2FmTP6iDLFLtS9WG9UdrvXK2+Q0fwPUHqLvGxse2zTv8BXKzFcA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9abaa17-c50a-453d-0a8e-08d834dc935b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:02:04.6570 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT035 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This is no longer used since the conversion to DT Signed-off-by: Jonathan Bakker Reviewed-by: Tomasz Figa Reviewed-by: Sylwester Nawrocki --- Changes from v1: - Added R-b tags --- drivers/media/platform/exynos4-is/fimc-core.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-core.h b/drivers/media/platform/exynos4-is/fimc-core.h index 31f81bcb8483..e4a56232907a 100644 --- a/drivers/media/platform/exynos4-is/fimc-core.h +++ b/drivers/media/platform/exynos4-is/fimc-core.h @@ -296,7 +296,6 @@ struct fimc_m2m_device { * @buf_index: index for managing the output DMA buffers * @frame_count: the frame counter for statistics * @reqbufs_count: the number of buffers requested in REQBUFS ioctl - * @input_index: input (camera sensor) index * @input: capture input type, grp_id of the attached subdev * @user_subdev_api: true if subdevs are not configured by the host driver */ @@ -317,7 +316,6 @@ struct fimc_vid_cap { unsigned int frame_count; unsigned int reqbufs_count; bool streaming; - int input_index; u32 input; bool user_subdev_api; }; From patchwork Thu Jul 30 23:01:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693769 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94F01722 for ; Thu, 30 Jul 2020 23:02:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 807232083E for ; Thu, 30 Jul 2020 23:02:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730810AbgG3XCK (ORCPT ); Thu, 30 Jul 2020 19:02:10 -0400 Received: from mail-co1nam11olkn2080.outbound.protection.outlook.com ([40.92.18.80]:59949 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730803AbgG3XCJ (ORCPT ); Thu, 30 Jul 2020 19:02:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aqfxwtKxTtRceuNSISz4pyxUoOQyQmojEq78+f9j7JmgcCaAn9QHS9JzkgYN4zM6JNBPwRsNvNUZmq7FyHa5YzHqaaZ/KfU6s1YCKnWyywbMASE6gyWUcCT8ajbLWaG9XSwoldUqIRQDd4VcpsyhaUeuduEGCCDIgebwnLyRVJtEJLGmzztk4MpOCQwUxvBS7YPnyF1TdoPmUQoZIeXgz3U1rlVs+6brSOS2X+Io2+4ikE9TYLinwUvcWWM6mcEISziED9jjFYK0fq0MnwnHU+Z3P8qCf9ZgWr7cn8/4zOmh5ufXiVJO/9M0Y4C7QH1j36oNGEJmSO0WYc6bROGTXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8KdOFWGq2tYRemSvmeE2n74vkpSZ4QQdHGcP2pMuyws=; b=S736WyY5YNjbK9CMV9VtTXSnO/BbjayrRclrw4BoMFsIrcYlnq5f/+unfOMME+Z7C+bYRsSRHyU+jJQ9p66Un+YxLc+UaihvYe9P38UUJZndurd/L5WnV5c9DY2T0jdSvXyUP+4Kbe40Ni/fW0dJxqlmWFmzAypEtYMeRGwI1cONcDnvgWZuTQscoRyGBFIH2gxUFZhn85o0+0AioqCPLrvv4qWTbcQ4CqjljTG9OjYb2HzeTm04+Cdakpd1e3jbR//o/sS8yXhq/EDmb/AX6dWTZF25lGWnzMipQNnAAzUWYs/SOzeDHJSWE9K/GWaVfSwxqvvxvcVHHvqlASR0YA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::4e) by CO1NAM11HT018.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20; Thu, 30 Jul 2020 23:02:07 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:02:07 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:1F475629DDB68A38DFC130CCB8F1FAE8943C57822EFEAA169B5DBFB56D0E5C8B;UpperCasedChecksum:FBE681A75446489C350865897E87537F9731FFF3392C6B7150C1AC289B7E5F0E;SizeAsReceived:7873;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:02:07 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Jonathan Bakker Subject: [PATCH v2 10/11] media: exynos4-is: Handle duplicate calls to vidioc_streamoff Date: Thu, 30 Jul 2020 16:01:13 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-11-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:02:04 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-11-xc-racer2@live.ca> X-TMN: [NVzrdjcbDFmjrKPwmClgs53y4e5yhvvtuJtIwpLttDdmQ4zC7eQVZCBy2GOMpqMx] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 3dd7da9f-7c1c-4eac-443f-08d834dc94d0 X-MS-TrafficTypeDiagnostic: CO1NAM11HT018: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 12XirX4/pP+7CFneqKLp/Sh3GB4hdD6DC02sAuR9TsRz+T1Rkx7315O38DTXxXaTDSicMoy9v31CTGXPz8NyqkoRP0U+pi+NANuwrsZvS0HYJo0/t40h/Wkz7wkSosqPJoI6CGs6m4FkyD6YATE2IS39zPKFSBssxaoP3koCbFjWDq/1K6p32iJIyIY4RtwDRLf8UVc+NRgoIFs7D9n1Iw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: W4whD87R1QqxYiP2vR0N6kdSkIFvPiVu+52/j1CdL3XOjqf9tNk6igGUUs1dstP5c54SMqihvF/0wn94dpn6fTZJieE53h3eiWNJZ2JTZhJjhgMwweBLmaMOctzW3bTY7cZ2OMHwUbYBzklWDS3I0t1iY4nyIN5fNrCza+BQIFCoWsB1rC+I4a8bcmlXpuj3gOXRu3fU+XRZ+t8F+1MO8g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3dd7da9f-7c1c-4eac-443f-08d834dc94d0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:02:07.1959 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT018 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org vidioc_streamoff can be called multiple times from userspace, but we should only call media_pipeline_stop when we're actually setup. This became more noticeable after commit 2a2599c66368 ("[media] media: entity: Catch unbalanced media_pipeline_stop calls") was merged as it added a WARN for unbalanced calls to media_pipeline_stop. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki --- Changes from v1: - re-worded commit message for a better description of the problem --- drivers/media/platform/exynos4-is/fimc-capture.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c index e70785d8a809..887a736b2e0e 100644 --- a/drivers/media/platform/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/exynos4-is/fimc-capture.c @@ -1232,8 +1232,11 @@ static int fimc_cap_streamoff(struct file *file, void *priv, if (ret < 0) return ret; - media_pipeline_stop(&vc->ve.vdev.entity); - vc->streaming = false; + if (vc->streaming) { + media_pipeline_stop(&vc->ve.vdev.entity); + vc->streaming = false; + } + return 0; } From patchwork Thu Jul 30 23:01:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11693777 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5CBCC1746 for ; Thu, 30 Jul 2020 23:02:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48B112250E for ; Thu, 30 Jul 2020 23:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730413AbgG3XCO (ORCPT ); Thu, 30 Jul 2020 19:02:14 -0400 Received: from mail-co1nam11olkn2054.outbound.protection.outlook.com ([40.92.18.54]:28769 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730816AbgG3XCL (ORCPT ); Thu, 30 Jul 2020 19:02:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MZqexn+qsxnTZvPoi94dGvycAVeQHCdVNaiklw39o22HdfDNicBrWt/yv2ldHABgW6QvLutPkUMueinpMLa/IugByZ3qjDg67+y1zXPn1oCfsbvmpZe7OXEfg4WDVRihDQJ9P1dEdhyjjA98EFQzPCSlkor6c+ylcS05wUod/obrETpJEQ88QR6iZhmnp0cOKkzCs0ZUjaOL3rYs85ip1y2pX7JTvnncxB2GwZsOvoDqc0WWVadmOumKFyR2Hyf6L/L/kfLn4pwRoLgEotJEggK7C2BryiNjSSYpudLO2D5pw5vzpiKEOjR6pwe0Bi8P9i3joJ3OW4IAPpc3QRUTGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=blb2TXRMp+yo/YM80XdL8XrZqtDJRYtixFtmZKoQWno=; b=h7dLPy20zV1fjbu2H+2CnNDbnCg120gmtFmXIKmFp4lgMeq7lyjYidnBrBU3fy7qfaC6uqfTK3sOiWVcSqgOuuItD3ObkBkhT8w16Li4u+MdcM5RgPfAjz+26nlScjeg3XNtY8xHzdtS9+fILwZmTtJj44NOL1nc6Rn5av8w97J85CqGahzqh2g1scRPuzBTul3EoComA47vb5psiUxwV+4hsPyqKApHC9Fv1PKPhdnsN1+q2NQFQnBsF1YoAVwDPfo8QLLI45qNdWWmRjaxAdwarjb3iFyt++f8iLPxHeSVA635PmjM+88bMmXt9PGMHmteYXBYsxmH3oS9qhGQMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1NAM11FT027.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::4b) by CO1NAM11HT057.eop-nam11.prod.protection.outlook.com (2a01:111:e400:3861::185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20; Thu, 30 Jul 2020 23:02:09 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:3861::4a) by CO1NAM11FT027.mail.protection.outlook.com (2a01:111:e400:3861::224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.20 via Frontend Transport; Thu, 30 Jul 2020 23:02:09 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:6596A80B681EE7BBE23592754212134BA198ACEE2B5D7CB2DB0EDE81235FC83E;UpperCasedChecksum:8F19E0DF905CC33C86E76E53392147AEA5680F956105E879707AC12DB6A82CD8;SizeAsReceived:7885;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3239.020; Thu, 30 Jul 2020 23:02:09 +0000 From: Jonathan Bakker To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@kernel.org, kgene@kernel.org, krzk@kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, Jonathan Bakker Subject: [PATCH v2 11/11] dt-bindings: media: Correct samsung-fimc parallel port numbering Date: Thu, 30 Jul 2020 16:01:14 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200730230114.8572-1-xc-racer2@live.ca> References: <20200730230114.8572-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200730230114.8572-12-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0002.namprd07.prod.outlook.com (2603:10b6:300:116::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Thu, 30 Jul 2020 23:02:07 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200730230114.8572-12-xc-racer2@live.ca> X-TMN: [4H0vmUXwVvtd+gYRvieb3VzExRmUgc9uRhumOxiyx0ARjfgIV6+/lmymWIVI9+Vv] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 45929ec7-0b00-434f-37d4-08d834dc965c X-MS-TrafficTypeDiagnostic: CO1NAM11HT057: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BHfC/ydrQF3oRUjURQOQUSYTv8k/BcbcG3az97rWdstQGzWd4TiaodOb62ErBBCX9j0r/Hiuy0HAv+ZGkKQp4v7bzqYZSxYalIybvs8oWhvNzkPIagSPqEtDuVVfc0FJkj5orWe41j5bL8j/FPPKJW8I/s2+Hem+VJvd1ER8QgmIxHWySdz1AFz0FJ+rUcfyNg1aJueKnCuhHbCo50/MYQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: Va8N7+GzrxSlCkFTcwGLUGCRaLywNzTlCqvgKzbSLG+LTKbyNP2FD5J7a5h2VEqNEsBlRZgOapGUEQETypC2IZreOWegXPTecPQUk6Jn4oAoMpsfgRGM2StW1zuKtFEs5hyOAiUUhY7YcaiOz07H2U/gYnGuSCqc7CaiKM+hpc0HgwyQ8u2M2mVVW/CZO+wk47wt1OQOferptIF7hevFOw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45929ec7-0b00-434f-37d4-08d834dc965c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2020 23:02:09.6779 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM11HT057 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The parallel port nodes should be numbered 1 and 2, not 0 and 1 for A and B respectively. The driver has always implemented 1 and 2 and the in-tree Goni DTS uses 1 as port A as well. Update the documentation to match this behaviour. Signed-off-by: Jonathan Bakker Reviewed-by: Sylwester Nawrocki Reviewed-by: Rob Herring --- Changes from v1: - New patch replacing patch modifying driver to match documentation --- Documentation/devicetree/bindings/media/samsung-fimc.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/media/samsung-fimc.txt b/Documentation/devicetree/bindings/media/samsung-fimc.txt index f91b9dc80eb3..20447529c985 100644 --- a/Documentation/devicetree/bindings/media/samsung-fimc.txt +++ b/Documentation/devicetree/bindings/media/samsung-fimc.txt @@ -95,7 +95,7 @@ Optional properties: This node should contain child 'port' nodes specifying active parallel video input ports. It includes camera A and camera B inputs. 'reg' property in the -port nodes specifies data input - 0, 1 indicates input A, B respectively. +port nodes specifies data input - 1, 2 indicates input A, B respectively. Optional properties @@ -172,8 +172,8 @@ Example: /* parallel camera ports */ parallel-ports { /* camera A input */ - port@0 { - reg = <0>; + port@1 { + reg = <1>; fimc0_ep: endpoint { remote-endpoint = <&s5k6aa_ep>; bus-width = <8>;