Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp347700rdb; Thu, 5 Oct 2023 07:42:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEx/Ry1u/2E16XD7n57agQckuKJM7stxEl13x7xOx7UgfA2omwhA9urql6pQNhX0G+mzv3e X-Received: by 2002:a05:6830:1bc7:b0:6bd:c8c2:b70f with SMTP id v7-20020a0568301bc700b006bdc8c2b70fmr5203682ota.34.1696516962929; Thu, 05 Oct 2023 07:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696516962; cv=none; d=google.com; s=arc-20160816; b=Pp6IsnHN6HEJIXbyEdyC3mlRC7Pn25ssIps1hMEqtsTnWqFCesJhIm1hcc+ZDvSBXz eTDGxPhdF81K2fUkG4Jh+ixTTF8HwA3x14sgrQnU1M9SIGsE0q8jDb1Oq4QdOjPf5D4Z 1zK0ZxBpAxqgfpLEiU2Z1ksjQv+OsWXbHUm+NcX4TDMVQ1wVxmmDgO41jDj+xMvEK0Lf NIm+BFhNKEYQbWhxrXWMrNHEwmy8LzxobEmtCV3qNdxWLfrCNYlRI5msc3JNvwEMQjXO FKxL5kn04jafYhGxoo4kkQ8huhhYuXW6GlWXpHMXN2p16AJ8E/JE5Edj22VTMLpC58i/ dgLg== 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=odiXPlPJ94OLt4VNSVsF5jRU+lM8ot4/XoBkS6zcEN0=; fh=ComlYb+yrr7pTh3oI7q7RcW5EOVriLArPZlioEeQVts=; b=yM3qBpn7YJgBAsv4/iH/AB98KnAWmTL2dee3sOhpUUaq/RHVm5Lz+5o73w0DcGo8D1 A/todnqtc720SAf5XBNA676l/3agCapdZbrnUYlX7mC5Tl4evY6+B6jF+mAbs6MisGB7 maBU+yWNACKX0D8AYczbkMdZMcLfdnBpbGhWB5IlUgZdCMqsJ4lZpt6TbNNOfFtzFJTa GHiWLlSS4McHRMmMuzjq77vjKhuHHLtcxXBHpWjHWAiQs0/JotzCAuNpi0YZoHyLrj4u nQBdGO3WLOdK76BmwH7CMBOfGj+N7su18R5iyWfeqeiV/dE8GdqMEFFtR2jhoNOOsCGL 7+jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=BoAwjYt9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id j191-20020a6380c8000000b00577f7b6e7b4si1617566pgd.624.2023.10.05.07.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 07:42:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=BoAwjYt9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 2759781D68EA; Thu, 5 Oct 2023 07:42:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237682AbjJEOja (ORCPT + 99 others); Thu, 5 Oct 2023 10:39:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236259AbjJEOgv (ORCPT ); Thu, 5 Oct 2023 10:36:51 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66FDE4F049 for ; Thu, 5 Oct 2023 07:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1696514563; x=1728050563; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ByGtKT4xiqrk6oC/wei3Iv5ZeyhBdUlilG4+Mwj4vfA=; b=BoAwjYt9sxDjj576hA5umK985PJ/7a/SR+9rAmsesrytvanA308X2GPK tAtinNade4vcSK9FQFt+fA3oKEvxUujKl7crO0QxsB6vxk/AsC2D+wUqp zSGxzy2J/myXveTM9ujIJ9FqMO5o0Jz9jwnKlBvNHmcqqKUzq4hcfYpQN AhSh+YLekNG1XsxnXEuhtERgNOt2nqfoSCk/Dm0a+R/36EpjK0oKpybWa 0Oq6w32LqWJ+e/SkHQBwdSEcGpZksdALXFBZFmRT247jKxd36zUrXEm3w 9WlrE9KtFDlhZENZF7pXJEYvW9G145e9XAvdVwK3DYKlCzgSu0b7U3wlT w==; X-CSE-ConnectionGUID: dG7k7NtLT1GmvBBB3yCAeg== X-CSE-MsgGUID: qpeBR9XTSiWx8zlcKNUmNA== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.03,202,1694761200"; d="scan'208";a="8504789" 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; 05 Oct 2023 02:30:43 -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; Thu, 5 Oct 2023 02:30:19 -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; Thu, 5 Oct 2023 02:30:13 -0700 From: Manikandan Muralidharan To: , , , , , , , , , CC: , , , , , , , Manikandan Muralidharan Subject: [PATCH v7 2/7] drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 Date: Thu, 5 Oct 2023 14:59:49 +0530 Message-ID: <20231005092954.881059-3-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231005092954.881059-1-manikandan.m@microchip.com> References: <20231005092954.881059-1-manikandan.m@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Thu, 05 Oct 2023 07:42:06 -0700 (PDT) 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); -- 2.25.1