Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2166146rdb; Tue, 20 Feb 2024 21:36:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVnYQr5ZDtWdO8JUKaXunsw+RhGeRhKhFGek272x2ENNtY6N+NkMgK3GXIuhRrAtHggQCeB1Ny6U+cLSx2UEGDP0FYx4WtiXHYb9lVURQ== X-Google-Smtp-Source: AGHT+IF4LI2mT+HpkCQw4K2LiQF4MTrWETUp/uUinpZK0UwRzaiSdBj4EZO+oQs27jLCBDQhWTXa X-Received: by 2002:a17:906:278c:b0:a3e:5993:96e9 with SMTP id j12-20020a170906278c00b00a3e599396e9mr5928989ejc.42.1708493766649; Tue, 20 Feb 2024 21:36:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708493766; cv=pass; d=google.com; s=arc-20160816; b=IEmxL3pE3rrGhl4wkeGo8NF8nVWPP9Ee6B3/srs8fWGar2l+0wAPWjmAV4aDXujdeA IAS0aM9af+h/OfR0mRiZ/ZY6T/2rDxntz3g13pxBeYKwbbwE3juF/+hnfsuchB9M6owI KZdqkYULhpRj0lyZW84SKaEBJi2F6bF6OQTPZTReWY8x10pMTCqkZfb337550lf3bMwM RWTYugADYBEPGyhIfXfc1E5/Xglp1QYfjmxAJBGSWqTmd9WVqPjzOCgFDKyBY1PMNFER XFJ16UjKuElb0+G++7+ZcA1buTN+WOjyLpBQz6YkRTAnRP3rMDnft/j5AMeSu+n8lZmd iuiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=AKOWC96xtQfLwW+hKzsC4KRwDb/jI4Kd+ipkI5nNcoA=; fh=//lyb1B4WXm27K46Yk62fKPPcdLDFB+ov25M2zKw+Ok=; b=pFqbHnqNc5ZEZmHHTj9sVs7+GOETWdpXay+zFUgLcCPgbie6ZuAEei1cQtGQrmuaqF wX8nYxlapZQeogc85i3GbJT2JR8NqnHuNATYIbChf87LyQL4NzZRUN9g4XMsfOzYE6A7 CeKLXNWKb5/U+xHb/GE+Ze0+AyzSe0nZQ0ONcOQdrFb7dYGguWU97Ls5hxKcICMrfdb6 40PHopDWKvEd+hJz5mOn2VbIFfWBy2XFVua6BO+/pGHQYLS2QRR9acnEnNf4UrTomIn2 zG8WrdrgZD1SvO0FVOYky+IWMG4RyspCJeOu/L+xpINt3w6YYhYjFHM3A9NSyEP7rFOV tcmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=mnKkfnMJ; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-74080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hq20-20020a1709073f1400b00a3ecc03d40csi2029084ejc.503.2024.02.20.21.36.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 21:36:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=mnKkfnMJ; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-74080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 56E6A1F22364 for ; Wed, 21 Feb 2024 05:36:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 414A339FC6; Wed, 21 Feb 2024 05:36:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="mnKkfnMJ" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C88A639AF1 for ; Wed, 21 Feb 2024 05:35:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708493761; cv=none; b=AmeAVfgXYnmipcj3eF3LBu9KUDWWVuJheDcAsPUo5DQHzIlc6+R5x4FZjOjsAP44rk3iveJBtPlLy7ZZW7m4KNj1t5reER9NgdrGWFePhOFjqXHxxRAsRxX8FJHrsHds1RYmYrTgatF1gMqKUl03EhARodgLVqi6ZtvDa9XFNoY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708493761; c=relaxed/simple; bh=i2g2RwYvdYzisFpUrzxjvDgtwPvv5krapAooAMh2eb8=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=C9OtYt2lAGzOC6IGIPZNEfTnzRkGAezV3l7YeggrcLYdb6k7AX6GkTdBxeTkk8mpMRTpKa5Ff3B51lqX8xtQfQKnTUGbSUXrhBuykEBnxLz4HgNay+6JfI0MOWcAJFT1hG2w63co5yY7YwSwUa+ALgoIatbVKtAfuma6BAkuWhA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=mnKkfnMJ; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1708493759; x=1740029759; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=i2g2RwYvdYzisFpUrzxjvDgtwPvv5krapAooAMh2eb8=; b=mnKkfnMJGWBRDqkgWiAJ834HGarffXANdGEaRdg3eZce5CGMCcx1d15p xQpAag1dS4sBI2RyNxwnhv+nJ7zzKWLO5e0Stn3ewTEicZAvmJeF1zmDx RTZmfS7bUQYbjjScbKvu2AG5wnSiy/vrex+fJIDj9rLDJXwKu6RszHup+ R6gLTgQUwafXH2OkfnaUhUSotugkcBE9n1HFkLTUKaCgeI7HeohKI8iuO WCezQZwn++LIbItuC3nPqE2DQmj76Un8X9birPUgZ96RKADt2x1BBeFup 3Wb7fJ5s1bxzLWDlfklYJ0nIq3hKzZt9sxkOavV2bv1/pUS/RjaTlqsgG A==; X-CSE-ConnectionGUID: GBi6ox9HSPqBW3WJPlVwRw== X-CSE-MsgGUID: nPi8X/1qQQquDj7LyoXFMg== X-IronPort-AV: E=Sophos;i="6.06,174,1705388400"; d="scan'208";a="18086630" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 20 Feb 2024 22:35:52 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 20 Feb 2024 22:35:42 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 20 Feb 2024 22:35:35 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , CC: , , , , , , , , Subject: [PATCH v8 0/7] Add support for XLCDC to sam9x7 SoC family. Date: Wed, 21 Feb 2024 11:05:24 +0530 Message-ID: <20240221053531.12701-1-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain This patch series aims to add support for XLCDC IP of sam9x7 SoC family to the DRM subsystem.XLCDC IP has additional registers and new configuration bits compared to the existing register set of HLCDC IP. The new compatible string "microchip,sam9x75-xlcdc" is defined for sam9x75 variant of the sam9x7 SoC family.The is_xlcdc flag under driver data and IP specific driver ops helps to differentiate the XLCDC and existing HLCDC code within the same driver. changes in v8: * Re-arrange the patch set to prepare and update the current HLCDC code base with the new LCDC IP based driver ops and then add support for XLCDC code changes. * Fix Cosmetic issues. changes in v7: * LCDC IP driver ops functions are declared static and its declaration are removed. changes in v6: * Fixed Cosmetic defects. * Added comments for readability. changes in v5: * return value of regmap_read_poll_timeout is checked in failure case. * HLCDC and XLCDC specific driver functions are now invoked using its IP specific driver ops w/o the need of checking is_xlcdc flag. * Removed empty spaces and blank lines. changes in v4: * fixed kernel warnings reported by kernel test robot. changes in v3: * Removed de-referencing the value of is_xlcdc flag multiple times in a single function. * Removed cpu_relax() call when using regmap_read_poll_timeout. * Updated xfactor and yfactor equations using shift operators * Defined CSC co-efficients in an array for code readability. changes in v2: * Change the driver compatible name from "microchip,sam9x7-xlcdc" to "microchip,sam9x75-xlcdc". * Move is_xlcdc flag to driver data. * Remove unsed Macro definitions. * Add co-developed-bys tags * Replace regmap_read() with regmap_read_poll_timeout() call * Split code into two helpers for code readablitity. --- Durai Manickam KR (1): drm: atmel-hlcdc: Define XLCDC specific registers Manikandan Muralidharan (6): drm: atmel-hlcdc: add driver ops to differentiate HLCDC and XLCDC IP drm: atmel_hlcdc: Add support for XLCDC using IP specific driver ops drm: atmel-hlcdc: add DPI mode support for XLCDC drm: atmel-hlcdc: add vertical and horizontal scaling support for XLCDC drm: atmel-hlcdc: add support for DSI output formats drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 176 +++++++-- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 105 +++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 133 +++++-- .../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 369 +++++++++++++++--- include/linux/mfd/atmel-hlcdc.h | 10 + 5 files changed, 678 insertions(+), 115 deletions(-) -- 2.25.1