From patchwork Mon Feb 15 04:26:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12087599 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2057C433E6 for ; Mon, 15 Feb 2021 04:29:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5668064E8E for ; Mon, 15 Feb 2021 04:29:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229927AbhBOE25 (ORCPT ); Sun, 14 Feb 2021 23:28:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229895AbhBOE24 (ORCPT ); Sun, 14 Feb 2021 23:28:56 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C55BEC061756 for ; Sun, 14 Feb 2021 20:28:15 -0800 (PST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DE6E3A25; Mon, 15 Feb 2021 05:28:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613363292; bh=5qkcyL8CSVzlCODprLbiuhGMSr8z/oVh88RsRGcwnRw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G3uCj+nos+mAlPvcXfUgDlAbEERhr20wvtFBje5zFlOLRwceb4/+phyreM/2GKh9m Aybr0lYLBTQdSBHvRuO5+XHu1creYuUf3JabC9Udf+MhwKoOOzizIjbciZwpeMaAOL axcWyWjjtsRhPU2jNRAH17qDV7XcXDocFaVfLack= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Rui Miguel Silva , Steve Longerbeam , Philipp Zabel , Ezequiel Garcia , Fabio Estevam Subject: [PATCH v2 01/77] media: imx: Drop dependency on I2C Date: Mon, 15 Feb 2021 06:26:25 +0200 Message-Id: <20210215042741.28850-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210215042741.28850-1-laurent.pinchart@ideasonboard.com> References: <20210215042741.28850-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The i.MX staging media drivers don't depend on I2C. Drop the dependency from Kconfig. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel --- drivers/staging/media/imx/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/imx/Kconfig b/drivers/staging/media/imx/Kconfig index 15322dc3124a..743e43742211 100644 --- a/drivers/staging/media/imx/Kconfig +++ b/drivers/staging/media/imx/Kconfig @@ -18,7 +18,7 @@ menu "i.MX5/6/7/8 Media Sub devices" config VIDEO_IMX_CSI tristate "i.MX5/6 Camera Sensor Interface driver" - depends on VIDEO_IMX_MEDIA && VIDEO_DEV && I2C + depends on VIDEO_IMX_MEDIA && VIDEO_DEV depends on IMX_IPUV3_CORE default y help @@ -26,7 +26,7 @@ config VIDEO_IMX_CSI config VIDEO_IMX7_CSI tristate "i.MX6UL/L / i.MX7 / i.MX8M Camera Sensor Interface driver" - depends on VIDEO_IMX_MEDIA && VIDEO_DEV && I2C + depends on VIDEO_IMX_MEDIA && VIDEO_DEV default y help Enable support for video4linux camera sensor interface driver for From patchwork Mon Feb 15 04:26:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12087601 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD5DAC43381 for ; Mon, 15 Feb 2021 04:29:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7DA3C64E9A for ; Mon, 15 Feb 2021 04:29:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229928AbhBOE26 (ORCPT ); Sun, 14 Feb 2021 23:28:58 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:45318 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229917AbhBOE25 (ORCPT ); Sun, 14 Feb 2021 23:28:57 -0500 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 96C15B23; Mon, 15 Feb 2021 05:28:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613363293; bh=lz5+luCqSOqGMQjHDZW6HFX0ZIdiflJo3OC0wAx2Nkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=atuFDEmfCUsiOBbZ4K1FUEabeBAt/6HkzGACrb1po5gXYRRg02x0M0ctfy1+L3Jb8 IzUp9XKD+IWNxqX1TXfMMP6Nn9m+OGHumN/McqXjxi65p59z1+cCy1fsJ5/WvF2s4P uz7eTnwTVmbcKUOw6tYF0SvUNK7mwUkoqJVBucWo= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Rui Miguel Silva , Steve Longerbeam , Philipp Zabel , Ezequiel Garcia , Fabio Estevam Subject: [PATCH v2 02/77] media: imx: Move dependency on VIDEO_DEV to common Kconfig symbol Date: Mon, 15 Feb 2021 06:26:26 +0200 Message-Id: <20210215042741.28850-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210215042741.28850-1-laurent.pinchart@ideasonboard.com> References: <20210215042741.28850-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org All the i.MX staging media drivers depend on VIDEO_DEV. Move the dependency to the common VIDEO_IMX_MEDIA symbol to avoid repeating it. While at it, sort the dependencies and selections alphabetically. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel --- drivers/staging/media/imx/Kconfig | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/imx/Kconfig b/drivers/staging/media/imx/Kconfig index 743e43742211..e3ca3c9d5d22 100644 --- a/drivers/staging/media/imx/Kconfig +++ b/drivers/staging/media/imx/Kconfig @@ -2,13 +2,14 @@ config VIDEO_IMX_MEDIA tristate "i.MX5/6 V4L2 media core driver" depends on ARCH_MXC || COMPILE_TEST + depends on HAS_DMA + depends on VIDEO_DEV depends on VIDEO_V4L2 select MEDIA_CONTROLLER - select VIDEO_V4L2_SUBDEV_API - depends on HAS_DMA - select VIDEOBUF2_DMA_CONTIG select V4L2_FWNODE select V4L2_MEM2MEM_DEV + select VIDEOBUF2_DMA_CONTIG + select VIDEO_V4L2_SUBDEV_API help Say yes here to enable support for video4linux media controller driver for the i.MX5/6 SOC. @@ -18,7 +19,7 @@ menu "i.MX5/6/7/8 Media Sub devices" config VIDEO_IMX_CSI tristate "i.MX5/6 Camera Sensor Interface driver" - depends on VIDEO_IMX_MEDIA && VIDEO_DEV + depends on VIDEO_IMX_MEDIA depends on IMX_IPUV3_CORE default y help @@ -26,7 +27,7 @@ config VIDEO_IMX_CSI config VIDEO_IMX7_CSI tristate "i.MX6UL/L / i.MX7 / i.MX8M Camera Sensor Interface driver" - depends on VIDEO_IMX_MEDIA && VIDEO_DEV + depends on VIDEO_IMX_MEDIA default y help Enable support for video4linux camera sensor interface driver for From patchwork Mon Feb 15 04:26:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12087605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58716C433E0 for ; Mon, 15 Feb 2021 04:29:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 181FB64EC7 for ; Mon, 15 Feb 2021 04:29:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbhBOE3n (ORCPT ); Sun, 14 Feb 2021 23:29:43 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:45636 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbhBOE3i (ORCPT ); Sun, 14 Feb 2021 23:29:38 -0500 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3E5601234; Mon, 15 Feb 2021 05:28:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613363293; bh=Of/R/H4WYAe6GNLEwQDQFH84urvLQTB+ymshOsngUu8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pchly6zkwlAIGs3XkIOP/Isjyo/bFBz2d0edqnvAd8wCDMH/gEYoNPpZfBrGYXV3E 2wJNz4WAzhxV3BmNEQDwc7axQY9Ax2lcd01UVN9Q5L2NK4qFMRhwqLlxvuCkPsmujO NlMF9VXwKLJgcKi7Wx9+Vz729kVpGk6zGv7ZApUQ= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Rui Miguel Silva , Steve Longerbeam , Philipp Zabel , Ezequiel Garcia , Fabio Estevam Subject: [PATCH v2 03/77] media: imx: Drop manual dependency on VIDEO_IMX_MEDIA Date: Mon, 15 Feb 2021 06:26:27 +0200 Message-Id: <20210215042741.28850-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210215042741.28850-1-laurent.pinchart@ideasonboard.com> References: <20210215042741.28850-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The VIDEO_IMX_CSI and VIDEO_IMX7_CSI symbols are defined in a section guarded by VIDEO_IMX_MEDIA. There's no need to duplicate that with a "depends on" statement. Drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel --- drivers/staging/media/imx/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/media/imx/Kconfig b/drivers/staging/media/imx/Kconfig index e3ca3c9d5d22..c3bf433ba3e3 100644 --- a/drivers/staging/media/imx/Kconfig +++ b/drivers/staging/media/imx/Kconfig @@ -19,7 +19,6 @@ menu "i.MX5/6/7/8 Media Sub devices" config VIDEO_IMX_CSI tristate "i.MX5/6 Camera Sensor Interface driver" - depends on VIDEO_IMX_MEDIA depends on IMX_IPUV3_CORE default y help @@ -27,7 +26,6 @@ config VIDEO_IMX_CSI config VIDEO_IMX7_CSI tristate "i.MX6UL/L / i.MX7 / i.MX8M Camera Sensor Interface driver" - depends on VIDEO_IMX_MEDIA default y help Enable support for video4linux camera sensor interface driver for From patchwork Mon Feb 15 04:26:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12087603 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 669F6C433DB for ; Mon, 15 Feb 2021 04:29:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A5D264EB6 for ; Mon, 15 Feb 2021 04:29:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229930AbhBOE3U (ORCPT ); Sun, 14 Feb 2021 23:29:20 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:45318 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbhBOE3O (ORCPT ); Sun, 14 Feb 2021 23:29:14 -0500 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 08D0014C0; Mon, 15 Feb 2021 05:28:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613363294; bh=I8Svdrs+I5w29jhEhcMwEr7dqJKME+cuH1UYtODc+nc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rYvZca5T0U6w7hrUNj2FRwI5svdCWkMYrq/c0ABNq2pj0MAWm/uQn9xquhs/TF60w sr3EiMLAGjpAk8Y7dI3QuE2rNdYq6nolQI9eCmx7iHJDwqf2HTmpbiA1BqsIdOC5GJ ZvAI++vrnIU3aU8rKdZi4M4m0UmstnD8ETtanxMM= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Rui Miguel Silva , Steve Longerbeam , Philipp Zabel , Ezequiel Garcia , Fabio Estevam Subject: [PATCH v2 04/77] media: imx: Compile imx6-media-objs only for CONFIG_VIDEO_IMX_CSI Date: Mon, 15 Feb 2021 06:26:28 +0200 Message-Id: <20210215042741.28850-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210215042741.28850-1-laurent.pinchart@ideasonboard.com> References: <20210215042741.28850-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org imx6-media-objs contains a set of objects that are specific to the i.MX6 IPU-based media subsystem. They're not needed for the i.MX7 CSI. Only compile them if CONFIG_VIDEO_IMX_CSI is selected. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Ezequiel Garcia --- drivers/staging/media/imx/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/imx/Makefile b/drivers/staging/media/imx/Makefile index 69cc5da04a2e..6ac33275cc97 100644 --- a/drivers/staging/media/imx/Makefile +++ b/drivers/staging/media/imx/Makefile @@ -1,11 +1,11 @@ # SPDX-License-Identifier: GPL-2.0 +imx-media-common-objs := imx-media-capture.o imx-media-dev-common.o \ + imx-media-of.o imx-media-utils.o + imx6-media-objs := imx-media-dev.o imx-media-internal-sd.o \ imx-ic-common.o imx-ic-prp.o imx-ic-prpencvf.o imx-media-vdic.o \ imx-media-csc-scaler.o -imx-media-common-objs := imx-media-capture.o imx-media-dev-common.o \ - imx-media-of.o imx-media-utils.o - imx6-media-csi-objs := imx-media-csi.o imx-media-fim.o obj-$(CONFIG_VIDEO_IMX_MEDIA) += imx-media-common.o From patchwork Mon Feb 15 04:26:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12087607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29724C433DB for ; Mon, 15 Feb 2021 04:29:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F384564EC4 for ; Mon, 15 Feb 2021 04:29:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbhBOE3g (ORCPT ); Sun, 14 Feb 2021 23:29:36 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:45318 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbhBOE3f (ORCPT ); Sun, 14 Feb 2021 23:29:35 -0500 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A39901644; Mon, 15 Feb 2021 05:28:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613363295; bh=6clLBIoDYl0GcZbPxrdwEhAxt07A3I/8d8DktzqaR5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tpe5IC3VW0MbzYM+YssdH7GRzOIm8m8tE4BTvSiCIeqnQLvCBW3qPEoqCvgiTX1z0 EbWMPLFUmIz1fxHoKlVDAGjdiXv29amwQE/YEdErq4tRP+RJJae8r0uODG0oZC9d8k seb+dTEx0qwsLgpgLzYRxnqzUM4tHKOUUshLjDkM= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Rui Miguel Silva , Steve Longerbeam , Philipp Zabel , Ezequiel Garcia , Fabio Estevam Subject: [PATCH v2 05/77] media: imx: Set default sizes through macros in all drivers Date: Mon, 15 Feb 2021 06:26:29 +0200 Message-Id: <20210215042741.28850-6-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210215042741.28850-1-laurent.pinchart@ideasonboard.com> References: <20210215042741.28850-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org All drivers use 640x480 as the default size, but they all hardcode those values. Create two global macros named IMX_MEDIA_DEF_PIX_WIDTH and IMX_MEDIA_DEF_PIX_HEIGHT to store the default size, and use them through the code. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva --- drivers/staging/media/imx/imx-ic-prp.c | 4 +++- drivers/staging/media/imx/imx-ic-prpencvf.c | 5 +++-- drivers/staging/media/imx/imx-media-csi.c | 13 +++++++------ drivers/staging/media/imx/imx-media-vdic.c | 5 +++-- drivers/staging/media/imx/imx-media.h | 3 +++ drivers/staging/media/imx/imx6-mipi-csi2.c | 4 +++- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/imx/imx-ic-prp.c b/drivers/staging/media/imx/imx-ic-prp.c index 5b09e11b1a0e..f21ed881295f 100644 --- a/drivers/staging/media/imx/imx-ic-prp.c +++ b/drivers/staging/media/imx/imx-ic-prp.c @@ -442,7 +442,9 @@ static int prp_registered(struct v4l2_subdev *sd) /* set a default mbus format */ imx_media_enum_ipu_formats(&code, 0, PIXFMT_SEL_YUV); - return imx_media_init_mbus_fmt(&priv->format_mbus, 640, 480, code, + return imx_media_init_mbus_fmt(&priv->format_mbus, + IMX_MEDIA_DEF_PIX_WIDTH, + IMX_MEDIA_DEF_PIX_HEIGHT, code, V4L2_FIELD_NONE, NULL); } diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index 74f5de466d5d..47df1a5a1ae8 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c @@ -1255,8 +1255,9 @@ static int prp_registered(struct v4l2_subdev *sd) for (i = 0; i < PRPENCVF_NUM_PADS; i++) { ret = imx_media_init_mbus_fmt(&priv->format_mbus[i], - 640, 480, code, V4L2_FIELD_NONE, - &priv->cc[i]); + IMX_MEDIA_DEF_PIX_WIDTH, + IMX_MEDIA_DEF_PIX_HEIGHT, code, + V4L2_FIELD_NONE, &priv->cc[i]); if (ret) return ret; } diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index ef5add079774..b9d3f98a2c8f 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -1758,8 +1758,9 @@ static int csi_registered(struct v4l2_subdev *sd) /* set a default mbus format */ ret = imx_media_init_mbus_fmt(&priv->format_mbus[i], - 640, 480, code, V4L2_FIELD_NONE, - &priv->cc[i]); + IMX_MEDIA_DEF_PIX_WIDTH, + IMX_MEDIA_DEF_PIX_HEIGHT, code, + V4L2_FIELD_NONE, &priv->cc[i]); if (ret) goto put_csi; @@ -1772,10 +1773,10 @@ static int csi_registered(struct v4l2_subdev *sd) priv->skip = &csi_skip[0]; /* init default crop and compose rectangle sizes */ - priv->crop.width = 640; - priv->crop.height = 480; - priv->compose.width = 640; - priv->compose.height = 480; + priv->crop.width = IMX_MEDIA_DEF_PIX_WIDTH; + priv->crop.height = IMX_MEDIA_DEF_PIX_HEIGHT; + priv->compose.width = IMX_MEDIA_DEF_PIX_WIDTH; + priv->compose.height = IMX_MEDIA_DEF_PIX_HEIGHT; priv->fim = imx_media_fim_init(&priv->sd); if (IS_ERR(priv->fim)) { diff --git a/drivers/staging/media/imx/imx-media-vdic.c b/drivers/staging/media/imx/imx-media-vdic.c index 879329f81f79..395b850736fa 100644 --- a/drivers/staging/media/imx/imx-media-vdic.c +++ b/drivers/staging/media/imx/imx-media-vdic.c @@ -856,8 +856,9 @@ static int vdic_registered(struct v4l2_subdev *sd) /* set a default mbus format */ ret = imx_media_init_mbus_fmt(&priv->format_mbus[i], - 640, 480, code, V4L2_FIELD_NONE, - &priv->cc[i]); + IMX_MEDIA_DEF_PIX_WIDTH, + IMX_MEDIA_DEF_PIX_HEIGHT, code, + V4L2_FIELD_NONE, &priv->cc[i]); if (ret) return ret; diff --git a/drivers/staging/media/imx/imx-media.h b/drivers/staging/media/imx/imx-media.h index c8b6a43d0d7c..1abb9bb88c12 100644 --- a/drivers/staging/media/imx/imx-media.h +++ b/drivers/staging/media/imx/imx-media.h @@ -15,6 +15,9 @@ #include #include