Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp603291ima; Fri, 15 Mar 2019 09:46:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQ7ro4eF7x/QCnEahidkEuOEAiXI5vXH/FfBckKO+k9pIivCzrp9ViuWtHyjEJc4Ijfwhk X-Received: by 2002:a62:36c7:: with SMTP id d190mr4970696pfa.178.1552668379392; Fri, 15 Mar 2019 09:46:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552668379; cv=none; d=google.com; s=arc-20160816; b=FqcPJ20i5haQpSy1mjIlCxgEGICaruHuD1L1VwLs8JiYpw5Ha0x4tDKebxWK88p2cq 79Haeye1oHUmM6hUyTeZ8wRfrFkzdsW6bHq7TlRzs0xNxULymfiIh6+vBzBpAXPUl4Xy l9d2hNUp5UxQkB3ea5rsy3Pgf4FzzAneWkCgPKGhftq7zJKLySval3DDdXZ67yCJlKSm dnPNfCGGxsMecWFSb+3+KReFC3YbgzR+PHOo1U3qjBDkUFcWWPP491m9U6t4amn4ev1K pZVATbYjus/cDcEHFUeR5dfrPd2ZOT0vcj28sa9NUEfdHaeE4bIn4XCgri9CZBq7Qf5l RSUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pYSJ4KH5JjTBWf2K/4DwQRlHxLV5JE4UCBKxPkmwEXk=; b=gfYH+tmDLgMzC8B0zDPlUOwrF1sknCEc3cTf7SiqUPnEEkJUocapBp4XTNQK9M1HFh WJRogzV07TQ3agGAxa+Z6lJU34OPAEERIQbCNUhLQxjzCA0CPXKWyqKHH16TALU/57kp 8Ngl4u5f6SKWP0Vqp10CQd8u2WwurZqgEYnILESwfY1WKsad+TrQtEDGAONrG68k86hA wNQBk3+gqMCQBWxneSOVFSaoRslSrxc+Z635kj+3Lzg3SjqDMiCdLxnG/90+2Qb0TPC6 aJDxYelEDsQx4Bg75L88FbzM3CVqPL/bxEGP/QJyUgIRPuDdbR9xpi21noKxBuqeL4xw 4NzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si2099688pll.63.2019.03.15.09.46.04; Fri, 15 Mar 2019 09:46:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729729AbfCOQpP (ORCPT + 99 others); Fri, 15 Mar 2019 12:45:15 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:49004 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729702AbfCOQpP (ORCPT ); Fri, 15 Mar 2019 12:45:15 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 08107260215 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= To: linux-media@vger.kernel.org Cc: mchehab@kernel.org, hverkuil@xs4all.nl, helen.koike@collabora.com, lucmaga@gmail.com, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH 05/16] media: vimc: Create multiplanar parameter Date: Fri, 15 Mar 2019 13:43:48 -0300 Message-Id: <20190315164359.626-6-andrealmeid@collabora.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190315164359.626-1-andrealmeid@collabora.com> References: <20190315164359.626-1-andrealmeid@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Create multiplanar kernel module parameter to define if the driver is running in single planar or in multiplanar mode. Signed-off-by: André Almeida --- drivers/media/platform/vimc/vimc-common.h | 2 ++ drivers/media/platform/vimc/vimc-core.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/media/platform/vimc/vimc-common.h b/drivers/media/platform/vimc/vimc-common.h index 7ceb9ea937e2..25e47c8691dd 100644 --- a/drivers/media/platform/vimc/vimc-common.h +++ b/drivers/media/platform/vimc/vimc-common.h @@ -26,6 +26,8 @@ #define VIMC_PDEV_NAME "vimc" +extern unsigned int multiplanar; + /* VIMC-specific controls */ #define VIMC_CID_VIMC_BASE (0x00f00000 | 0xf000) #define VIMC_CID_VIMC_CLASS (0x00f00000 | 1) diff --git a/drivers/media/platform/vimc/vimc-core.c b/drivers/media/platform/vimc/vimc-core.c index 0fbb7914098f..34ca90fa6e79 100644 --- a/drivers/media/platform/vimc/vimc-core.c +++ b/drivers/media/platform/vimc/vimc-core.c @@ -26,6 +26,11 @@ #define VIMC_MDEV_MODEL_NAME "VIMC MDEV" +unsigned int multiplanar; +module_param(multiplanar, uint, 0000); +MODULE_PARM_DESC(sca_mult, "0 (default) creates a single planar device, 1 creates a multiplanar device."); + + #define VIMC_ENT_LINK(src, srcpad, sink, sinkpad, link_flags) { \ .src_ent = src, \ .src_pad = srcpad, \ @@ -388,6 +393,9 @@ static int __init vimc_init(void) return ret; } + dev_dbg(&vimc_dev.pdev.dev, "vimc: multiplanar mode is %s\n", + multiplanar ? "ON" : "OFF"); + return 0; } -- 2.21.0