Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2762701pxb; Tue, 13 Apr 2021 09:33:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuv+CIMth11cUsX3VPTlNs6V9K2mKxiRktpNy+YPSx0k8Ne+5jj/w5YjVcdFygGmn79qnv X-Received: by 2002:a17:906:8a6e:: with SMTP id hy14mr33518201ejc.356.1618331623285; Tue, 13 Apr 2021 09:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618331623; cv=none; d=google.com; s=arc-20160816; b=ASbqH0IDuvodJgpk8zjqlkuhAkz9s5PcqZblWWPjXd/7gGXO4pUT0nR3Knlzqi9Vr7 Gk3arc/1pCExzea/ZW//3mIIZQOYh7FldceL0IM4eFhSCCFRYaFqwAkO9V1vAUn9aQPp t2Ht9YwQ0MClichDxqHMvcWZUsmYxhO3Rwu77VRrSQddTbDG/+wG+NLJlVBDQfbNzbOT vfr7t+cBBBSIhxeESDzv0PQWsv6l4iMIyrI84iMYsow6RmRhxGowmNk67lRBDHF3ZUS9 TtMSqRkvJzDrDh6juHUQ52O3qmmfbQXmTn6MT3qw7V5Qmx0Zdwxq5u7WB+kxxAL8HrS4 jYaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:dkim-signature; bh=3ifJWKXdxK89W+foz7W7fUzESwLK+9w3ggyizls/P3M=; b=CbO1jEs5uU5w0RrsMGq2DF9vL1OhoogWkoGJnm+Pxz9xvDXcRAQtN36n6qcGPI/VUn YIn0CK5zjxUMpVZIEhCwpKH5sSwK9wKtYNJmJO+INQ4eL5X86rBjPu2obeXMEiNh3+ax FbC26vWRyxlJzvdDwVebbKX5xFEuP1KN6BV2aWP0yaWBdgUjwBDD5pUyScmrPt6wEqgn KSrMkmPPgGGyF4yhweQdF49qBMHr+3PjOL/plZCo2vas3JVDMa0KsFFr8h9lcG6HsAuh gQKJpeGmqfQTxpARH4PjzvL/ULh3vzK/BG7WowV/6ICPyeca+eX4zt1rcwuRbHTDsQW4 jzIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=08lNA4bM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yj16si10914223ejb.413.2021.04.13.09.33.19; Tue, 13 Apr 2021 09:33:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=08lNA4bM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345155AbhDMLDo (ORCPT + 99 others); Tue, 13 Apr 2021 07:03:44 -0400 Received: from esa.microchip.iphmx.com ([68.232.154.123]:60503 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344922AbhDMLDc (ORCPT ); Tue, 13 Apr 2021 07:03:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1618311793; x=1649847793; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iy2lKlBNlg+FxIrewyxh6CPIqYGEo2+dw32oKnP15lI=; b=08lNA4bMBKzGNtwHoBO47eldYxAQl+TAcruzgSKD2e7so1ZdFbR28qda HUXwwrVZzwohHWWAElQRun0f3BtyIJhxtsQQCkau7Miasy+kVYKu7+Kud 5NekDhcHsZtaWn2maupHqAWBgXtWMORjxBO8xrBZY0/f1Ci2L8vnCQpYj nkQLuYLncLFhsx8/buRf34Q5ieepw3Xp7b6GN7q9GqM9meIwvsCJXxmYU qM/PVHJEVMhiThDZUipz7kx8FDlTROTYrLR0qRPAPfMCGmf19gRdLLl/m FQnk8haq8EIh/jRlOORvdI1UONyTfFYZnob8V856t7lHbTvwQqOK3rFfz g==; IronPort-SDR: S4YS92YX01JeyqNEW8ImQXIqPz5YmqOaRaWxd4mtSTRY2cxWkIsXc6bkPrnhqffChWau5VK+A/ WuKmTJuh2bz5rbFtgIo9jiMm06tyH5bEuJNJzPf0Z+BQ4+R3w1X34M3/462TXVbOTl/HlH0TAy n87eHGRKFc0bGrl0rWiKAJg1R70wNi5KNzw7jCUxCRDQQYrQVOOM147zhODRg3UHj3nH1Vz51J EqHYTGD+vGJdCSquVGp/Ekz0h8gzGBlqmEITZxx33NPC3rObHsd9nLC3WBumEydr9jBe1FsFvs JdI= X-IronPort-AV: E=Sophos;i="5.82,219,1613458800"; d="scan'208";a="113386326" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Apr 2021 04:03:12 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 13 Apr 2021 04:03:05 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Tue, 13 Apr 2021 04:02:58 -0700 From: Eugen Hristev To: , , , CC: , , Eugen Hristev Subject: [PATCH v3 22/33] media: atmel: atmel-isc: create callback for GAM submodule product specific Date: Tue, 13 Apr 2021 13:57:20 +0300 Message-ID: <20210413105731.610028-23-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210413105731.610028-1-eugen.hristev@microchip.com> References: <20210413105731.610028-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The GAM submodule is a part of the atmel-isc pipeline, and stands for Gamma Correction. It is used to apply the gamma curve to the incoming pixels. Create a product specific callback for initializing the GAM submodule of the pipeline. For sama5d2 product, there is no special configuration at this moment, thus this function is a noop. Signed-off-by: Eugen Hristev --- Changes in v3: - added module description in commit message Changes in v2: - addded function prototype to avoid warning with W=1 drivers/media/platform/atmel/atmel-isc-base.c | 1 + drivers/media/platform/atmel/atmel-isc.h | 3 +++ drivers/media/platform/atmel/atmel-sama5d2-isc.c | 7 +++++++ 3 files changed, 11 insertions(+) diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c index 1f7116abc61a..bd24e0c99613 100644 --- a/drivers/media/platform/atmel/atmel-isc-base.c +++ b/drivers/media/platform/atmel/atmel-isc-base.c @@ -655,6 +655,7 @@ static void isc_set_pipeline(struct isc_device *isc, u32 pipeline) isc->config_csc(isc); isc->config_cbc(isc); isc->config_cc(isc); + isc->config_gam(isc); } static int isc_update_profile(struct isc_device *isc) diff --git a/drivers/media/platform/atmel/atmel-isc.h b/drivers/media/platform/atmel/atmel-isc.h index d6cd85a4c3e9..1e6988f1876e 100644 --- a/drivers/media/platform/atmel/atmel-isc.h +++ b/drivers/media/platform/atmel/atmel-isc.h @@ -229,6 +229,8 @@ struct isc_reg_offsets { * specific CBC module * @config_cc: pointer to a function that initializes product * specific CC module + * @config_gam: pointer to a function that initializes product + * specific GAMMA module * @config_ctrls: pointer to a functoin that initializes product * specific v4l2 controls. * @@ -306,6 +308,7 @@ struct isc_device { void (*config_csc)(struct isc_device *isc); void (*config_cbc)(struct isc_device *isc); void (*config_cc)(struct isc_device *isc); + void (*config_gam)(struct isc_device *isc); void (*config_ctrls)(struct isc_device *isc, const struct v4l2_ctrl_ops *ops); diff --git a/drivers/media/platform/atmel/atmel-sama5d2-isc.c b/drivers/media/platform/atmel/atmel-sama5d2-isc.c index 2b53e9427353..df26941af64b 100644 --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c @@ -58,6 +58,7 @@ void isc_sama5d2_config_csc(struct isc_device *isc); void isc_sama5d2_config_cbc(struct isc_device *isc); void isc_sama5d2_config_cc(struct isc_device *isc); void isc_sama5d2_config_dpc(struct isc_device *isc); +void isc_sama5d2_config_gam(struct isc_device *isc); void isc_sama5d2_config_ctrls(struct isc_device *isc, const struct v4l2_ctrl_ops *ops); @@ -120,6 +121,11 @@ void isc_sama5d2_config_dpc(struct isc_device *isc) /* This module is not present on sama5d2 pipeline */ } +void isc_sama5d2_config_gam(struct isc_device *isc) +{ + /* No specific gamma configuration */ +} + /* Gamma table with gamma 1/2.2 */ const u32 isc_sama5d2_gamma_table[][GAMMA_ENTRIES] = { /* 0 --> gamma 1/1.8 */ @@ -269,6 +275,7 @@ static int atmel_isc_probe(struct platform_device *pdev) isc->config_csc = isc_sama5d2_config_csc; isc->config_cbc = isc_sama5d2_config_cbc; isc->config_cc = isc_sama5d2_config_cc; + isc->config_gam = isc_sama5d2_config_gam; isc->config_ctrls = isc_sama5d2_config_ctrls; isc->offsets.csc = ISC_SAMA5D2_CSC_OFFSET; -- 2.25.1