Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp270227rdb; Mon, 29 Jan 2024 01:25:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfF5DZ6er8XgRyPTg97QVfPjTGUJxp7G4xUrOoHp9orUigSxgn6ZvLGjNfDgKPLocPkkdA X-Received: by 2002:a9d:6e0f:0:b0:6dd:e530:8c12 with SMTP id e15-20020a9d6e0f000000b006dde5308c12mr4528146otr.4.1706520354279; Mon, 29 Jan 2024 01:25:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706520354; cv=pass; d=google.com; s=arc-20160816; b=v762eIGQ7GmppYkfGrbd7euznyiTzsJGrgt/hfRqdQA01WwvlWBKeAy60kpb5J0Lat MznlXpdJEZmqvofUHJCo9tRyaF8jYKjRwN8Zn+vuF2tXEB+fCoiocJFZzK+D28pVEDuI TX5lZwUT7buu9dbVAl775GpU0AWhRrzUi0N2N5OJSGDfWpgRkIvAWbms7SFHYGgIIwS8 zvheivAsowzwq/yIw4XdcGHwfIMB3bZESnsFlXyphB6f/qJVn6qb1tUViybioyNl0gwv wzwZXD9rXnKsy/M5GFwwm5LEELCdiZiabJAD7P0qlf7hE/l0QpvtFNsu92XXw4BEDZgB m8Sg== 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=odiXPlPJ94OLt4VNSVsF5jRU+lM8ot4/XoBkS6zcEN0=; fh=j8BTi3bk6S9w7ne7NAX+MdwHaBs0T0Ouoo68uijiz9I=; b=kN2UKXFmrZM+wTcIFzN6tsrJpwp97kyR/O/b+++XdB6/2IcfYCGug3WbJqPIYdnMic FwX8g9p4OHfQ6ENBiQob6GpQ3cJGpm6azJZE3+s2OycFUbUbZCV5Gplul7HbYRXoIxqy x0d2MNfZ8gkkUtmHeibjD5emBJupkf5t2Kh17FVq7zoG7tZNpcBnPMKbs2IBuA/cfMfR Xgpt126inkfC2etOGsjpE9xyBmHKQk5LpHyDfBq+T7r9MApdCsX9/cVT+cCIUxwUOwco GBOIKWl6qExygmM6wQuAYgnYpZHWhQ8XuqYGlPV0DNczssvS0fDEgiILTSasdnOoiuFY wDtA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=MK7rJ41k; 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-42439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42439-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id o125-20020a62cd83000000b006dbdb7770bfsi5437573pfg.178.2024.01.29.01.25.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 01:25:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=MK7rJ41k; 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-42439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42439-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3641EB210B4 for ; Mon, 29 Jan 2024 09:25:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E05556B91; Mon, 29 Jan 2024 09:25:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="MK7rJ41k" 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 20AA85646F for ; Mon, 29 Jan 2024 09:25:00 +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=1706520301; cv=none; b=M8dK1eTXFajl/Wzby4XYgI9VBYqm0a39WYxa7+oYgOE5Z+nG9JTQanxRkUiyGwa6AoKJiSKJ9CmMuqzKGqN7dRG2cXjbnY82B6Es8sKNmumyvCvPgz0+WiqyUF9Do4houX1Y14Luk7gi0TtK/k/WU86grPyQaL0JERKfawmhuhU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706520301; c=relaxed/simple; bh=ByGtKT4xiqrk6oC/wei3Iv5ZeyhBdUlilG4+Mwj4vfA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YSPlTqdQ+fs7la1lzAvi1nH9P/e6X8RZvnStENZ0HVQ+UhJs24cP5A0K62GOIU06HcdojUEWW2VpprPZIjq9EHXjZ0epf0lX3UQZ2ADVUaUB3wvxShFB5Oiydso+e2ys4XNWAcdRmbL21ZptAa855shXPLJr4L0tHN5weo+NgeA= 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=MK7rJ41k; 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=1706520300; x=1738056300; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ByGtKT4xiqrk6oC/wei3Iv5ZeyhBdUlilG4+Mwj4vfA=; b=MK7rJ41kBKIIdv/JLCrcSxUFlMcEivYfzsJ+VbZiQKDn8aPmV0h3giJG tD92KYr/5ErbAXvg3y4oMOHwJ22x1TNEPGcGne0QnR6ZLiuUINr7dyv6C Rlnh1TPrAnrSBXTnNhMNXW68QP7R4NopzWhxmidV0Lt7/UDBuEWD0FBwm QmucGvAj7pjrfyyUHBQ7KHU5sAwuqyyeaLLY5JkM/HAFn9SuUEOFNb+XM reBKlNgH8W2/ob2pqj9PRyIuABUNLH/5uLq+ENTiM2dFJ17AgVlw9FlBm VVbqjOLGcmEPWYTPTrD6lEIWeWCw/Onq6YPMdXN+JeCJhcT0dkgW1Y0c6 w==; X-CSE-ConnectionGUID: 8voT20HCQaKMMfd/WNhz6Q== X-CSE-MsgGUID: vMJeDFCrQv2WMLCITOcG2g== X-IronPort-AV: E=Sophos;i="6.05,226,1701154800"; d="scan'208";a="16727013" 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; 29 Jan 2024 02:24:57 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) 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; Mon, 29 Jan 2024 02:24:38 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Mon, 29 Jan 2024 02:24:31 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , CC: , , , , , , , Manikandan Muralidharan Subject: [PATCH RESEND v7 2/7] drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 Date: Mon, 29 Jan 2024 14:53:14 +0530 Message-ID: <20240129092319.199365-3-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240129092319.199365-1-manikandan.m@microchip.com> References: <20240129092319.199365-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 | 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