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: 13400555 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58433E810B1 for ; Wed, 27 Sep 2023 09:48:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+F62zc3wPB2rkMvlbD1e8v451TIhYC0MO9p8CNp/KAk=; b=03TmK3cxMGxy6S F4p6mgXa3xaWT/yqN4QTHb5+sbAu4jK1v/KClmdTEb3QlFsewRU5KioSIFoyMtvp4Mp9eXqwO4eKr hv9fDg/lwmJp1KbYjhbnqIvQKQAggFcOBDYouUFQDLZk3gbSZGrjDG6mJ3i39dz1xgi5yPkjQXQob CT31QIR3paXe7V2pNw6XcM4OlPR5DBHFePZ0Md7CcXx/9TaBpER6UwYLF+4uP6vCb2i7kGdLJ/XlN qcl82pV8vzepsZkMpzaMM1JG31ilQ0xXdRu/RKBSKILPZJo62zBGCNUlTkXgvB+FMob495vfKuhYg AOAD5BeectfifxxweLIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlR9l-000WI6-07; Wed, 27 Sep 2023 09:48:33 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlR9h-000WH2-29 for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2023 09:48:31 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230927_024829_763329_F8528A05 X-CRM114-Status: GOOD ( 12.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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(-)