Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2166536rdb; Tue, 20 Feb 2024 21:37:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWd3fy/efQ1nI3UCBjbakzjFGp5GRiTjvLVCkIfUCCdUpxrYC++y6hFFdv4dItn0PuelJVAfC8obrfBYii0jL5cQ02VFz5uL1Hq/iDksg== X-Google-Smtp-Source: AGHT+IHsWwOdAyRlw7X93LlTYebNA+rCn76HLgiBMtqFlm7b0X8n6cMjvUGHglLKU21gc8eVpkyT X-Received: by 2002:a17:902:ce81:b0:1db:e244:78 with SMTP id f1-20020a170902ce8100b001dbe2440078mr13399247plg.20.1708493847448; Tue, 20 Feb 2024 21:37:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708493847; cv=pass; d=google.com; s=arc-20160816; b=tLntNFsQYj1o+zSD6LRZzXfHSm6SkgfOTiAtxonjPFO5f4V4Da4LbOLEpU719LG3pU tRYGgC4zzOmzDe5vHOHWis7HSSKxoC8t3F3HnWnRupzsyJNOptfntbF3joPea2uG0k7e hycVV4rPmHjRVsoGwbUonOwLMr4E7TXAbm3O1s42ih2UP9RBAaBsG/A697YtRc634HG2 WGdeV5OFZPzKHUJzqj1vJs+IUFJ4m8zUU/7vTIaYIx0j74SFZCssrDCRhjG/uWn90ojo NvCNh6bBAtZMUnA+pyI5KUAs0Sr3K/BhN4OMamVip4FkkGnqLwkO/7i9gkVbbVpsQDRX M0hg== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74088-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h13-20020a170902f7cd00b001d5e9f77cf3si7461117plw.79.2024.02.20.21.37.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 21:37:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74088-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74088-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 27D36283470 for ; Wed, 21 Feb 2024 05:37:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D9733A8D8; Wed, 21 Feb 2024 05:36:52 +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 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