Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp85259lqg; Thu, 29 Feb 2024 21:28:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUHj4M27IMbj31oxnstnpeoXh7/X3YRhMIkucHHh43+WmgYa1s3meZVLEMlOs8YZEjMi/NUBQrRC52JHHHHB/hBtPZXLU6GtM+Mp/iCZw== X-Google-Smtp-Source: AGHT+IGefwdZ/o3vgPtFUY5OBhVm30erWgtVv7XHSvyPu4Bo+OTabEmVpssskC5/G2zOxTbO+Gar X-Received: by 2002:a05:6102:2826:b0:470:53d1:2900 with SMTP id ba6-20020a056102282600b0047053d12900mr405724vsb.30.1709270888645; Thu, 29 Feb 2024 21:28:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709270888; cv=pass; d=google.com; s=arc-20160816; b=kneEGh5MDVX0+J20Uw2Fv7Zq6gCoMyPx/U8WC59KcJA8cNARSZatQPeA9+Nk7Ck5ZA UE9p91alu+lNCDFSyV+91Mdfg0xvQq1NfQqRDZ3Irdu1kZzW0QCVzEbqNxgd0qLCYFF9 OnHgJ4IIuhRr0q8mxjnRh5sKlFCERaVUP6e3Ny21n5HfU3gsb+GYdtyS28reyWscokXm 8qFAEH6zMul3v0xAwhx9AcTXJylQgzgdZvHarkygZDx41uKcoWDZR2RseMrVTQfEz+3K N/6DcuHokiWeotYR6QydwvrtH+laPpq2DMy2eCphencneJ/oR6EkX8jfyro/xiVredoy HFRg== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=PrHjwX31oYDZkRY0bNGEp3hZtqhTsem5K1UU9tm7FGg=; fh=7zDsz27mBsgtoAIkbjOnm5GqQoRyvNqJW2tpYGq12lU=; b=FeRrsuuffm+VD6anW4kL48QiWgS7uX9vbz4XSSgTqjv/T4sfGF/AwZz5jl6ZVQUD9B K5nC8eKS7U//4FegcUgDddXQ+xtLQy3qMngK+f7knEHVhoV1aeyEeuG36EFikLc5A1Wi k0abMKo3pHNN8TMAnK87Oqp59nVlg49/JgR+eERrbYA3XpDsI5JFgKvk1kFHEijnhVgX xXV447TrZoyOQW64fuvtaPs6vCcsrJ4opYzk5mBdhRfKu/B9GlO/24PQOrQZ5/NMrzrt 6eRXg7Tf+Yit8d5ZDA/HVTs6xVcM7rFl6KvDarBrQjvh8Mb+Y4d5gOB8r1cEbUAdfTnf UkDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=QzbKi4Q0; 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-87923-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87923-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pa1-20020a056214480100b0068f34e76d4dsi2891313qvb.587.2024.02.29.21.28.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 21:28:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87923-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=QzbKi4Q0; 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-87923-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87923-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 53B441C229C0 for ; Fri, 1 Mar 2024 05:28:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0656E56752; Fri, 1 Mar 2024 05:27:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="QzbKi4Q0" 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 B76AF56756 for ; Fri, 1 Mar 2024 05:27:31 +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=1709270853; cv=none; b=qIUsrOrZH/UOGgDYSzfiKlhk40ZMuKVsyyYB+NWQFqCUyOeJYRa8Qsh0YtfZeU0p63IRYhduUQUu+7C3gamA/iwYxhy07eSdWUGaEiHBBTtRGCgjSGu5AiLBBXbCf79Ri3ak3t56YN/kb4RQtpbcPiWWztrOgJtleRgNVdAdrlQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709270853; c=relaxed/simple; bh=OKLm0TpKtjMzC5zoHct+zFILT4roGx2dwy6wf/eZcDs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qkkhW+gVS99e4FNf98oUgKrAELnDr2iwuQE5IGz9yzqS9Zn2cXIiMYTPFhCH+vqcv3Mo7Y2kCt8kEBMHoN7T+bQzB2Gz0QHfxmMmImo56quNf9xVsMJ/bY5rJWB3NElWwucHfiy/KdEKba88BuhHUfPv1xt1fj1TX6fkJlP4Q8g= 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=QzbKi4Q0; 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=1709270851; x=1740806851; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OKLm0TpKtjMzC5zoHct+zFILT4roGx2dwy6wf/eZcDs=; b=QzbKi4Q0s3whKc94/oG1GJqrHGjZ2L3gMh9LcvH25QzqpseiXbDlVDD9 Z+yFXmhEIC8azNM42dI5zSBMJi5jkNl3nFL8sEmPycf165evFACc2QlTS z4oHQvGTjUw1oPRPq1eIxTkkBz0/q58pHxkIVE6O/0R6fzZenKzvmlkaA 7ewfOdpp1AkTQ7r8jPwSGvpTFUjvgGMUsoyi/HZzp8CPUSCq/v4qrURnt ZGlDqAPSWfr0LY6+lJQVlTUwxk0a3CJw2YnJ5l675OdoAhrgmE+eaGBpT 6iFmCIHhOg0QGj2r7zjCwy//fb8uTSuZmPdA2A1ibnd0uspMXzt5OMkID A==; X-CSE-ConnectionGUID: RLX9j2keSXCRNMfMnLOX2w== X-CSE-MsgGUID: sgnPbwnPQxSwz4TRJalR/A== X-IronPort-AV: E=Sophos;i="6.06,195,1705388400"; d="scan'208";a="17055855" 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; 29 Feb 2024 22:27:30 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 29 Feb 2024 22:27:03 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 29 Feb 2024 22:26:55 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , CC: , , , , , , , , "Manikandan Muralidharan" Subject: [PATCH v9 8/8] drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 Date: Fri, 1 Mar 2024 10:55:34 +0530 Message-ID: <20240301052534.38651-9-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240301052534.38651-1-manikandan.m@microchip.com> References: <20240301052534.38651-1-manikandan.m@microchip.com> 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 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 | 100 +++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index b09df821cbc0..9ce429f889ca 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -467,6 +467,102 @@ static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sam9x60 = { .ops = &atmel_hlcdc_ops, }; +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, + .vxs_config = 30, + .hxs_config = 31, + }, + .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 = 0x3ff, + .max_vpw = 0x3ff, + .max_hpw = 0x3ff, + .fixed_clksrc = true, + .is_xlcdc = true, + .nlayers = ARRAY_SIZE(atmel_xlcdc_sam9x75_layers), + .layers = atmel_xlcdc_sam9x75_layers, + .ops = &atmel_xlcdc_ops, +}; + static const struct of_device_id atmel_hlcdc_of_match[] = { { .compatible = "atmel,at91sam9n12-hlcdc", @@ -492,6 +588,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