From patchwork Fri Sep 15 10:48:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikandan Muralidharan X-Patchwork-Id: 140633 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1267971vqi; Fri, 15 Sep 2023 12:19:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEstLwlgd6Uw75Pr9WjKexVg7plexDnc+JZwTkQz4lugo89/YNuztG2qcX/ceVZDduYz9mu X-Received: by 2002:a17:902:ea09:b0:1c3:29c4:c4e4 with SMTP id s9-20020a170902ea0900b001c329c4c4e4mr3032588plg.36.1694805547938; Fri, 15 Sep 2023 12:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694805547; cv=none; d=google.com; s=arc-20160816; b=xW3qm2yYYNt0cThcptUHcMtGFz1oWND0xlsBDpSPFbPjVciq/rZgTvHhJCQgKEVVdq Cyc8nOAdkFCGYEen3MwscxeZPMUe8BJ1anREnOJdYkGm2U7AAX9w9O8UhqY2PTQPCctF sTD9mqzwAUpLkentlU3zq5lA/mX13kpPLtbzxAzHkNYHFso4Cl1fgd2sxnKpwG2u0xR4 AuF4NdtJUDE4i0ougySbyVixcrWXeYILnf2Q7wJEXguGrjar7ID5LmiDWLf349V2qIWa DCt0M2nJK16FL7680CubXBmbTonK4iQj7CzG4PbS5CfMjCc6NNRIFSvRcJurAmvzHu6j lixA== 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 :dkim-signature; bh=cwLm6LixB+/JX0Ok+1ygMeWVjZvCRleGjyj4mRzI/HM=; fh=ComlYb+yrr7pTh3oI7q7RcW5EOVriLArPZlioEeQVts=; b=Gl9M7r1W5GlhODCNSoUxwf1ln/p2lf6SvF6lRLOC+rLvvqCg/wtA0K9HJD0CRoAz3H KKd5oVovLi84goLh89jk4mFwSTfUTMpL1ojwcJo3IsjPuuAd2VT2o8Fk2PqwpZXdBONl I3SI9c8mSG0vQl6RfHVCHxO37GBBYykXclQWkgwB+vKAaUD4sR59YTwBMkQ3G7ED8TD0 8RCWupUsn9VRK8R7YmIoZx0ni+Q+0O77u8wJD3X39muq34GgkyDXezjc2CT2t6A7uvw8 Z7TwkYVZTm8zoC+w5kxPV9L9RkpYNLl8uttKIx86qfsx+Sz50k7J79JN3VmlXz9KcXIT 6UeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=joKlDGUX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j20-20020a170902759400b001b83767e879si3678978pll.266.2023.09.15.12.19.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 12:19:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=joKlDGUX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 17D2D858E906; Fri, 15 Sep 2023 03:49:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231671AbjIOKtc (ORCPT + 32 others); Fri, 15 Sep 2023 06:49:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233663AbjIOKt0 (ORCPT ); Fri, 15 Sep 2023 06:49:26 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BC14106 for ; Fri, 15 Sep 2023 03:49:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1694774961; x=1726310961; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7Vv10apy3dujTxAUU/bAcUdLl39yKDSm3soc5TeW2ww=; b=joKlDGUX7t7/HVn0kviclldaO/UCjA/iT9PUt8wcipOng1QwNDWIvISA WpHbmegfQ70o7vmCw6Bg+caLR/TTO9cVhwC+sZqMENndZ+awmGwntkW6/ 2Y7d2kwn1MpAM83t8K5A7JHl+EbBA7gvk1ZEKKU2M4iInKBOF/wEEj53q +jO6MLdIH1mbm4TNqXKp3qwhYnTCv3klEHTXjaefn2jhlqEqBLY8LbHzO ++m55fI7z7cNgZYjn9jFwQ+tt8buCtT9hLIvilE6GjOppEfFuPbAaJ8Ee vx36W0RM+ETCxzHbZOJMMHxyM9I0JvuWCYa1kBVrY7sIRftER/C8B/nr2 A==; X-CSE-ConnectionGUID: hk8tCQZzSVuMTtVQhU7nfA== X-CSE-MsgGUID: t49tHJxNQbmVit/s87sdOA== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.02,148,1688454000"; d="scan'208";a="4844792" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 15 Sep 2023 03:49:20 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 15 Sep 2023 03:49:12 -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.21 via Frontend Transport; Fri, 15 Sep 2023 03:49:06 -0700 From: Manikandan Muralidharan To: , , , , , , , , , CC: , , , , , , , Manikandan Muralidharan Subject: [PATCH v5 3/8] drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 Date: Fri, 15 Sep 2023 16:18:44 +0530 Message-ID: <20230915104849.187146-4-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230915104849.187146-1-manikandan.m@microchip.com> References: <20230915104849.187146-1-manikandan.m@microchip.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 (howler.vger.email [0.0.0.0]); Fri, 15 Sep 2023 03:49:41 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777132422092946187 X-GMAIL-MSGID: 1777132422092946187 Add the LCD controller layer definition and descriptor structure for sam9x75 for the following layers, - Base Layer - Overlay1 Layer - Overlay2 Layer - High End Overlay Signed-off-by: Manikandan Muralidharan --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 97 ++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index fa0f9a93d50d..d30aec174aa2 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -462,6 +462,99 @@ static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sam9x60 = { .layers = atmel_hlcdc_sam9x60_layers, }; +static const struct atmel_hlcdc_layer_desc atmel_xlcdc_sam9x75_layers[] = { + { + .name = "base", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x60, + .id = 0, + .type = ATMEL_HLCDC_BASE_LAYER, + .cfgs_offset = 0x1c, + .layout = { + .xstride = { 2 }, + .default_color = 3, + .general_config = 4, + .disc_pos = 5, + .disc_size = 6, + }, + .clut_offset = 0x700, + }, + { + .name = "overlay1", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x160, + .id = 1, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .cfgs_offset = 0x1c, + .layout = { + .pos = 2, + .size = 3, + .xstride = { 4 }, + .pstride = { 5 }, + .default_color = 6, + .chroma_key = 7, + .chroma_key_mask = 8, + .general_config = 9, + }, + .clut_offset = 0xb00, + }, + { + .name = "overlay2", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x260, + .id = 2, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .cfgs_offset = 0x1c, + .layout = { + .pos = 2, + .size = 3, + .xstride = { 4 }, + .pstride = { 5 }, + .default_color = 6, + .chroma_key = 7, + .chroma_key_mask = 8, + .general_config = 9, + }, + .clut_offset = 0xf00, + }, + { + .name = "high-end-overlay", + .formats = &atmel_hlcdc_plane_rgb_and_yuv_formats, + .regs_offset = 0x360, + .id = 3, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .cfgs_offset = 0x30, + .layout = { + .pos = 2, + .size = 3, + .memsize = 4, + .xstride = { 5, 7 }, + .pstride = { 6, 8 }, + .default_color = 9, + .chroma_key = 10, + .chroma_key_mask = 11, + .general_config = 12, + .csc = 16, + .scaler_config = 23, + }, + .clut_offset = 0x1300, + }, +}; + +static const struct atmel_hlcdc_dc_desc atmel_xlcdc_dc_sam9x75 = { + .min_width = 0, + .min_height = 0, + .max_width = 2048, + .max_height = 2048, + .max_spw = 0xff, + .max_vpw = 0xff, + .max_hpw = 0x3ff, + .fixed_clksrc = true, + .is_xlcdc = true, + .nlayers = ARRAY_SIZE(atmel_xlcdc_sam9x75_layers), + .layers = atmel_xlcdc_sam9x75_layers, +}; + static const struct of_device_id atmel_hlcdc_of_match[] = { { .compatible = "atmel,at91sam9n12-hlcdc", @@ -487,6 +580,10 @@ static const struct of_device_id atmel_hlcdc_of_match[] = { .compatible = "microchip,sam9x60-hlcdc", .data = &atmel_hlcdc_dc_sam9x60, }, + { + .compatible = "microchip,sam9x75-xlcdc", + .data = &atmel_xlcdc_dc_sam9x75, + }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, atmel_hlcdc_of_match);