From patchwork Wed Sep 27 09:47:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikandan Muralidharan X-Patchwork-Id: 14590 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2686905vqu; Wed, 27 Sep 2023 07:58:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeAHbTAQYYd7ojXPV5eTlOfSnMvFTGerD/uy3QzKEHRWwb8kLaHPOHR37ayoC7Ggiur5EC X-Received: by 2002:a17:90b:3652:b0:273:83ac:5eb9 with SMTP id nh18-20020a17090b365200b0027383ac5eb9mr9255358pjb.4.1695826719305; Wed, 27 Sep 2023 07:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695826719; cv=none; d=google.com; s=arc-20160816; b=ZlGmaW2UBqvAnB0QrvBvv+ky7IJt1+emRRZ1trWZDjzdgdMs5wVbHCGf75YHex4kfQ MyyTjs6658JQqim8N93XlgnD5ZiWwt5Y7Chwuj730VFSUE7mULxV6QaHDnTQEFjt4NdO uB0tEFMBcavhUYX5YVX8FfV8Ak+zPUvZSkoc0vkDUvfqBdzetup3Z+1t6g3LkMdZMVXz juiN5SvQ272TkjNPg+zNRFBjNzH4IfxG580ovS6oYGwJVgCBM1jcaYrkJ2vnQCGdll/r 50vrMR/p/FUL1ooQC5xocGsZrAg4Vmth0+ckY2TbvLkce4H1uYi6XBb5rpN8KLr49pCi mirQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=M04ntsPs+GwcGrPDJT6BUjQnH6xlikWBow9qjLLJh2w=; fh=ComlYb+yrr7pTh3oI7q7RcW5EOVriLArPZlioEeQVts=; b=IQyfwJdqYT1cVkptN15UwI+yzY2/fBOUrn4E9Tk4e868kjEdJrHmdeTWbTwVLCy78d /3iS0P2+/yCj8U8L80sN966VeHAZJGd5/jf3Y3qaPPBsIIpAsPZiH40/BCaAI3Zgz/RT fn+FPZtcuFPVdXjcVfCWP/IKy9AYtczB7FqUY51/tfqChBLk/1EbcjSZrudykyqZm+KO VXulNWKGe2DazA92xgzRa/Mp5MevBb3JwjjR6COSwq1unGPYuEbnOxyOoR2O3B9Kdx20 eiRMXzOKqKnVliqFRc4rKpg78pbswXRYfYXJDVbr59Mduu7PbzwCPNbWYz+90xSQcWaF fB7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=GxYRuY3g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id c13-20020a6566cd000000b00578b6e2f462si15585269pgw.351.2023.09.27.07.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 07:58:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=GxYRuY3g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7AE7A820DA3C; Wed, 27 Sep 2023 02:48:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229650AbjI0Jsb (ORCPT + 22 others); Wed, 27 Sep 2023 05:48:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbjI0Jsa (ORCPT ); Wed, 27 Sep 2023 05:48:30 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A012C0 for ; Wed, 27 Sep 2023 02:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1695808109; x=1727344109; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OmsVSl574JGGbApt0QqEs3VMgLcfdILX5ckyFQOmWxE=; b=GxYRuY3gWCXoCxgsi+n6WsL0Zo1HeTfuFbdwpX6anB+2c5LOKQtnaLl8 OTLPWYZMCV4WIbgc66xDbdl+k3OQ4giFeiNW4ieLpw8CsTKbLaxS+FeIb kko7Cg4wnoaereFIanCE1jrCgVTbNDcxtjoRfmSNrqgDCGJpQ3dDP8Fc4 dEk7ZL8CqZtxwZc0J+bLJf0KmWDIvo5TnXfyCPBnv2/82/kW95Cb1+bRe q5p4au0uDdkaj+adge2C2oQ+92db4VLOfO5GZC94KIpU1js6uc53wcxK0 Yjq1mjravaQUuF0IjfRzA6wvPsLveXEkS+JLN9N/13P066x9LSdBnrm/l g==; X-CSE-ConnectionGUID: HUyDEQftQiqlXs675yxA9g== X-CSE-MsgGUID: psa4YXGuQES8LENUeN6xIA== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.03,179,1694761200"; d="scan'208";a="173846996" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Sep 2023 02:48:28 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 27 Sep 2023 02:47:49 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Wed, 27 Sep 2023 02:47:41 -0700 From: Manikandan Muralidharan To: , , , , , , , , , CC: , , , , , , , Manikandan Muralidharan Subject: [PATCH v6 0/7] Add support for XLCDC to sam9x7 SoC family. Date: Wed, 27 Sep 2023 15:17:25 +0530 Message-ID: <20230927094732.490228-1-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 27 Sep 2023 02:48:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778203198221689667 X-GMAIL-MSGID: 1778203198221689667 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 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 SAM9X7 SoC XLCDC specific registers Manikandan Muralidharan (6): drm: atmel-hlcdc: add flag and driver ops to differentiate XLCDC and HLCDC IP drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 drm: atmel_hlcdc: Add support for XLCDC in atmel LCD driver 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 .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 175 +++++++-- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 125 +++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 114 ++++++ .../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 342 +++++++++++++++--- include/linux/mfd/atmel-hlcdc.h | 10 + 5 files changed, 670 insertions(+), 96 deletions(-)