From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=68.232.154.123 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796195775; b=DATO7O57HTv6YBPqq7fXtgVWScU5aqFFzigehMT/0edjDjO3ZDCPLP4xDhtJMvBgKE4u zk/ZT22nRE3S2FBnCuAk3RqyT9LvFDC2z+j8azRsBa01iKjmXK+JsBJjoDrFixYPAUMh1 Q/J8q3hcdTDJ3dLobf0fU6T0UBWC3o/ra9cRf36ke2MQvt+XBkK07u6Uw0SdlFWQueab2 ZERNLeGm6UXzj8/BhQdGreRfp5QLEo61V/jTXuE9HIEbgYBXBiPnfNonHyMN0wFSc1Obt adK6bfCgGZkYB2/9I1EM6cw1ZxnchpADwk1+9SgP2tV2KmuqovMVv0otac6C9XHj9Ng== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796195775; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-Amp-Result:Received:Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-ID:References:In-Reply-To:To:CC:X-Mailer; bh=vH7twM76/iQCTq1CS88Z1ptTkJkji8LZyIMM4aXLzmU=; b=AgpYgpJFG/m8DueaqSwSEBuCLkHMYvWRod38+vuXsToJ8XFLFxUs0LLuMGTLsudEo3yB TRDADUl0lmDWUEym44W6tsY1K38hxzWiJlhrWwu///KXqaxJRNgP+CGG9wSrYbrxQJNI/ D+bGZGYuTXXuWiXzwSd7PAgN/o0Ehk0qS1WqMkcgbTe1XEfKzdtgC/lfhM/MyEZcHk42p hM6dn6T0wsWG1GSK/NenZ/yPI+tjhvLYiOA1W630Md28j+jnsvmpyzAMIHEs23iY6HbU5 vl+/jb1Mym/dl1mGUyI+9tV7KRShpYncNXo8MsOq/DI4ysmy7ebYgBXf1cMPlunAPhA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=UTC6isrW; arc=none smtp.remote-ip=68.232.154.123 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48566606A684 for ; Wed, 2 Dec 2026 07:16:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 48566606A684 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=UTC6isrW DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1796195775; x=1827731775; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=I1paIQLnvdoyy0vnsbsxhBC2S2czZGUUVO+lmhN7+aU=; b=UTC6isrW5y5GbUnNSuhsPM/T4TqffHxypjcVOyTfhLSxLsH3BoAhXDmi KlFVWJZRABlV3P3q8BNEbtTmgodpC2did17rNDyNPD9ixLiwmReo0c5/1 VTTASZmD/dtZ4Kwv2FIp0jM9NbI2gHxRTyFE/s15k6U0W4r8F6rIVhR3z nwGzdUJe+RQSPjEiewNTkrS9VcTUlqu7MEaU+LzyXNgaWpQyLDUtH+RGc RAslpW7QuyHFsqqsyn4/X2OWk+o1O1eMM7e//ejhST4I03dFQFg0aO+Tw 3J8SXMNwe6h/SSy0xVxvomB2chsp71uCY0soVpsBvdVJ86deD6aavodOh A==; X-CSE-ConnectionGUID: tl5dvayiQWyqE0EwEdnkWA== X-CSE-MsgGUID: mJ8SjbbSRseG7GMuxO7GMQ== X-IronPort-AV: E=Sophos;i="6.27,246,1787036400"; d="scan'208";a="66350998" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 00:16:14 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.87.71) by chn-vm-ex3.mchp-main.com (10.10.87.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.57; Wed, 2 Dec 2026 00:16:14 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Wed, 2 Dec 2026 00:16:12 -0700 From: Balakrishnan Sambath Date: Wed, 2 Dec 2026 12:46:08 +0530 Subject: [PATCH 02/15] media: microchip-isc: set SAM9X7 maximum resolution per SoC X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20261202-isc-series-v1-v1-2-4e2f17c0271c@microchip.com> References: <20261202-isc-series-v1-v1-0-4e2f17c0271c@microchip.com> In-Reply-To: <20261202-isc-series-v1-v1-0-4e2f17c0271c@microchip.com> To: CC: , Balamanikandan Gunasundar , Balakrishnan Sambath X-Mailer: b4 0.14.3 SAM9X7 shares the XISC with SAMA7G5 but supports at most 2560x1920 (DS60001813C, section 50.2), where SAMA7G5 allows 3264x2464. Take the limits from the matched compatible with of_device_get_match_data() instead of of_machine_is_compatible(), which only looks at the root node and is not how the device is identified. Co-developed-by: Balamanikandan Gunasundar Signed-off-by: Balamanikandan Gunasundar Signed-off-by: Balakrishnan Sambath --- .../platform/microchip/microchip-sama7g5-isc.c | 29 ++++++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/microchip/microchip-sama7g5-isc.c b/drivers/media/platform/microchip/microchip-sama7g5-isc.c index f5968e3b388d..6403d2d43864 100644 --- a/drivers/media/platform/microchip/microchip-sama7g5-isc.c +++ b/drivers/media/platform/microchip/microchip-sama7g5-isc.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -53,8 +54,20 @@ #include "microchip-isc-regs.h" #include "microchip-isc.h" -#define ISC_SAMA7G5_MAX_SUPPORT_WIDTH 3264 -#define ISC_SAMA7G5_MAX_SUPPORT_HEIGHT 2464 +struct isc_xisc_data { + u32 max_width; + u32 max_height; +}; + +static const struct isc_xisc_data isc_sama7g5_data = { + .max_width = 3264, + .max_height = 2464, +}; + +static const struct isc_xisc_data isc_sam9x7_data = { + .max_width = 2560, + .max_height = 1920, +}; #define ISC_SAMA7G5_PIPELINE \ (WB_ENABLE | CFA_ENABLE | CC_ENABLE | GAM_ENABLES | CSC_ENABLE | \ @@ -403,6 +416,7 @@ static int microchip_xisc_probe(struct platform_device *pdev) struct isc_device *isc; void __iomem *io_base; struct isc_subdev_entity *subdev_entity; + const struct isc_xisc_data *data; int irq; int ret; u32 ver; @@ -450,8 +464,12 @@ static int microchip_xisc_probe(struct platform_device *pdev) isc->gamma_table = isc_sama7g5_gamma_table; isc->gamma_max = 0; - isc->max_width = ISC_SAMA7G5_MAX_SUPPORT_WIDTH; - isc->max_height = ISC_SAMA7G5_MAX_SUPPORT_HEIGHT; + data = of_device_get_match_data(dev); + if (!data) + return dev_err_probe(dev, -ENODEV, "no match data\n"); + + isc->max_width = data->max_width; + isc->max_height = data->max_height; isc->config_dpc = isc_sama7g5_config_dpc; isc->config_csc = isc_sama7g5_config_csc; @@ -626,7 +644,8 @@ static const struct dev_pm_ops microchip_xisc_dev_pm_ops = { #if IS_ENABLED(CONFIG_OF) static const struct of_device_id microchip_xisc_of_match[] = { - { .compatible = "microchip,sama7g5-isc" }, + { .compatible = "microchip,sama7g5-isc", .data = &isc_sama7g5_data }, + { .compatible = "microchip,sam9x7-isc", .data = &isc_sam9x7_data }, { } }; MODULE_DEVICE_TABLE(of, microchip_xisc_of_match); -- 2.34.1