From patchwork Wed Feb 21 05:35:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikandan Muralidharan X-Patchwork-Id: 203930 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp847797dyc; Tue, 20 Feb 2024 21:37:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXkLeygTsb97tIfaD2o4H1cVI16nc8h4Ve8OS3IReiA60QNUy2eVeEHmgknlyZHu8X/jzf16NUlfI63Qa6Rx+csXY9Ndw== X-Google-Smtp-Source: AGHT+IEc4SrJn5tJeYFWeSEOLTTK2G0Wh3yhhhiIiA8A2mYtjWioN/cbVQv8irq6t3EWRyJEm//x X-Received: by 2002:a05:622a:1902:b0:42d:f362:8c9e with SMTP id w2-20020a05622a190200b0042df3628c9emr18262400qtc.23.1708493867129; Tue, 20 Feb 2024 21:37:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708493867; cv=pass; d=google.com; s=arc-20160816; b=SimUod366xQkxyBL8GbT15tWCVBlwoOOzYav/sxcJKdsXt523KbM+Cc2PHOoLef8wh ioudL/6/z8DJ4LVRpr2jO/uRjptPNtGoGMtcG/mSI7qm4d91DUjaysuUI46vVo/QwHTt LRpQLWPa/Vt1CcIB5V1mwaM2TtpZiiCN1LC0pxHkb5xrUQlp3hEJ5ataCdrTzAPMlR46 l/Xv6OdCTkLcqHsWJg3Wzckc9Qa19PzM0PuvEx6YP/slPOT4NQE4rWX3FvFEV3dN4ruO FJlMkrGiuDuPnC9lWtDGjEyB/4Z/ZrOlWjIJSD7NBAQAuXKg2hGhLoI2QOuIm9WGMaMr vk/A== 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=//lyb1B4WXm27K46Yk62fKPPcdLDFB+ov25M2zKw+Ok=; b=MkTtR2XfHmGXnIMOMg6Z/RORlXHM9uo5Cwcrmw+MJwrH9vyYfK5JQHzfihPtFB4uuO 9R9I2dkqILiZWrsj6r7HC9jsVdLKQhfauy7jQ8A8kT5mp4XHS7iSo2O+gdxOQyLV5wpx Au1RweOKAAqaOK4v1kmYt9Ed6HWVbAuLSEYdX4SU1yKcor8APvwO6DYMan4jO03WSZZ7 whv0c8G9UKfLmcmPk4FNMnOxCWEle7CyzViqar1SSB5SNIgeiy959uZ1aLqb3V6HUbvZ /rHmWKmODrXPT9lnV+nGgFL0YXKBMOy4e6sD93t5rTpXiVBjdUHWS55iEtydwRiNxWBL tqlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=WFZbvcrX; 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-74088-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74088-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bp16-20020a05622a1b9000b0042c4e74bd72si10659490qtb.462.2024.02.20.21.37.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 21:37:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74088-ouuuleilei=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=WFZbvcrX; 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-74088-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74088-ouuuleilei=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 D94B11C21760 for ; Wed, 21 Feb 2024 05:37:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A266D3AC1A; Wed, 21 Feb 2024 05:36:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="WFZbvcrX" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 1DD8F39FC6 for ; Wed, 21 Feb 2024 05:36:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708493811; cv=none; b=a5RlnCOufZxTSUo2evLC/lUXNlBfB+ioPLlfk1qV+acGx6wALDnq0NNmkHSYGe5j70NDV5v/arF0JtO9Kqu42vbzC7FkUGbbeGfBxsrZ/lWLAmcK0ylaoMeuUTZKQxbnew2xOKdwrZSIlcM3WhEWvO+fWNfytvfxBmnpVT7JMf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708493811; c=relaxed/simple; bh=OKLm0TpKtjMzC5zoHct+zFILT4roGx2dwy6wf/eZcDs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CJCHF4iahQufZT0KO9dVWppkhCoOi0JWN+oFC99Me2wdmOwu2+6dCsWRr2//6Ka5gVIc96m/Z9da21lV7MVruvDRzuz6X/f4h5bd7OfhYnzFCCT7s/QhheVcZ1G/VW+FErCgxQCL+cyOL7zJu4+EUCO7PKBZ2X5bM6xBUr3v5hs= 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=WFZbvcrX; arc=none smtp.client-ip=68.232.154.123 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=1708493809; x=1740029809; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OKLm0TpKtjMzC5zoHct+zFILT4roGx2dwy6wf/eZcDs=; b=WFZbvcrXn/0dug7cWWJZ6SvDet3JuekMunkQc/AC760SRtQmXZNGjakS t1z6NR8285wuuY4Br1+8SojOdSswgwXCIgoBXOslIScLFRZgHOFMEuhtA tRCb8Cqtz0vMBKxR6LkvKF0/GUPEuHeufpTaCLEPR0A8mQsth5EJT4ZNM hyyWAAoAWasQJwQmSJ55ep39Uc0k/JQqjsEl++g3BxDCEM0nVavDVeHUW fNQ1c8fxw2CcHyqZKbml15IUbruDd6xldzwI4nI0mRbsNL9ORIR46wzVR MVVw5gqMq/YSUh4wzcVydzdKCXITx9w8xChkL2AqphuEmfP3ib6SLDYvA g==; X-CSE-ConnectionGUID: uvmqqrvDTHSClXFWxIq5Hw== X-CSE-MsgGUID: 5l/51w8DQXOZuaIoCZ2aBg== X-IronPort-AV: E=Sophos;i="6.06,174,1705388400"; d="scan'208";a="183844466" 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; 20 Feb 2024 22:36:47 -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.35; Tue, 20 Feb 2024 22:36:43 -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.35 via Frontend Transport; Tue, 20 Feb 2024 22:36:35 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , CC: , , , , , , , , Subject: [PATCH v8 7/7] drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 Date: Wed, 21 Feb 2024 11:05:31 +0530 Message-ID: <20240221053531.12701-8-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240221053531.12701-1-manikandan.m@microchip.com> References: <20240221053531.12701-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791485665156617387 X-GMAIL-MSGID: 1791485665156617387 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);