Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp208848lqd; Tue, 23 Apr 2024 22:36:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9JPwAVMwEgFBLQvMQ+TEdcqstbiCMw7brLd9OO981+paQjRc9VTuIS08MZ5zeQ5IAM+mWVY0UlIcpkDGkfN/6d6uSjihymPn+A8v6Vg== X-Google-Smtp-Source: AGHT+IHl3BoefW3BwV4eYgj1JpaN9fD7cofZVR2XBPsZPhMPTRPgaQEZO6DVKRuRBbG+84St5ZPi X-Received: by 2002:a05:6122:2025:b0:4d4:2398:51a2 with SMTP id l37-20020a056122202500b004d4239851a2mr1602706vkd.8.1713936996180; Tue, 23 Apr 2024 22:36:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713936996; cv=pass; d=google.com; s=arc-20160816; b=PwOk1bzY1eFNbajFDurCMTYNoAGeTKkfbhMEUvzIYG9yQMswi8lu6kXg2KbCiBw2/h 1BYE7YNH6dztBbdPVCUwZ8OBdCiOl3hC0PFjOkAuHdPE5nkbTJ365tW04hGd8/Q6I3zy q4V0bXTDE6ZjcKa9Lu571N7GdbdIWQgyjUQJMri4nuY7vbd50DvvGM0y9NLGh4AKTAQI Eq68rdY6xuSGAwjFp9+Ge3fPE07D7Qz7BdXzGfse34P6n+8u64GgibKyEYIGXU28SgN1 uyRyuRm3MCVF7Ot7xqr2YlwpaPeQGbvbdeh8k3O3uOQcCYMCUzt2xsP3cAjMSr4na4YV q8hQ== 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=4+DQd1kfAnr88vIF32HKSX0e323w1G45W31Ut5+UHtQ=; fh=7zDsz27mBsgtoAIkbjOnm5GqQoRyvNqJW2tpYGq12lU=; b=pCkJvnDoi6WKswWwPnTftIjsBdikGFcbwSpDD1wu6NurCdkXAA6/OUKQKw3fFLmS1I BBwKPwEqPcBaJTzdnwQaBzawTZbuHhSW0yjAO5MCtZrTUze8d2scZTUJPWpYXoDu39Un LPpyoWv5TGvJJL1+GH2svGPSeRwp1OoYtQXweLSSJPfT5xJc/lQC+OUMXfZkPKdvXYv0 BSQ5q17LE3YRX/r2NompC1J7UPLr365CKh26PBcoybeSoc+NeYXM9gZDBhg9ALBNZDQn 6LL2WxqtuD4W4Iutg5f3+GND8w8zAeUcnqalUwzrvSHL+m84YGNaw+WcB0SilPblfYEC Zcmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=cVF7xHPm; 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-156317-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156317-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT 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 bp34-20020a05620a45a200b0078ef8a52fdbsi16358117qkb.723.2024.04.23.22.36.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 22:36:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156317-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=cVF7xHPm; 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-156317-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156317-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT 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 8A9DF1C22786 for ; Wed, 24 Apr 2024 05:36:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E999E156961; Wed, 24 Apr 2024 05:35:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="cVF7xHPm" 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 AA2FB156876 for ; Wed, 24 Apr 2024 05:35:55 +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=1713936957; cv=none; b=Ix0hZXj5HLHmMM0WEcCnuIfLP6WKekHgskSwim/G5CoV7H89YxrcBjsoulyDFO9l5vIrboNLXw3j2TJ/GGhzaG+2nRjf9+F7scDV/+XeFdf8O0+N/fsaYxBrFhTo7txWkGyfA7ri+IVIe12ID4f8tt8IjcClf+Lyqv3vbnN17wg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713936957; c=relaxed/simple; bh=ossuaQDe3AwZrzHLymVt2BTtRBDDMiPXTOLKWKHbS58=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cmpQ6O+JZ7m/6flnP/CRgGLs++ZEif7th72meZdbVyiGySUX5iC+jGGXIGXsWSW8MKQAIVKXRaWvU8gBtE/mVX/uHwuY/XcpA1jxrIQgKXTmhGbmJEkqV+kvh2ZzKXiUw0mQ2nBFBu5ux+hQjRQn9wjQHmVPInzd9a6BK3p8r2g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject 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=cVF7xHPm; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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=1713936955; x=1745472955; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ossuaQDe3AwZrzHLymVt2BTtRBDDMiPXTOLKWKHbS58=; b=cVF7xHPm34JP6Uug4e4T8wAoBm+P/gjoawPd7dIE9FagvL89GJDLX19z zaxvt+763XHHxcIu3hYP4oUdvkJwbMJBuK9EIqiunC5MYv0XooxNZCrLp tRKGvBrDJ9MefQkV23bUDzOMOwo9ATLyc7ORdJrUYebnkGcG5s3WoGE0R wDH4BP3mQWINOZAuLEhlUPny5hCKOVm+jT+YoxfivyxGQzqZIQ6K8hkOJ 7vz+3qh6oSydNqPnmuAq9h1wxHWSOkzT1eNpJGN1kmSDm35UEFcEQOyWA nGYFEZGo7NDIZdqtgf9yKor3+rGAfM1MDmjpbP3efQYwU1bvJhWWzrh2L Q==; X-CSE-ConnectionGUID: XEmm68rJSp2bFUw1qrzV5g== X-CSE-MsgGUID: xoW1CWxPS6iSDddadPIKlQ== X-IronPort-AV: E=Sophos;i="6.07,225,1708412400"; d="scan'208";a="189716704" 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; 23 Apr 2024 22:35:54 -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; Tue, 23 Apr 2024 22:35:39 -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; Tue, 23 Apr 2024 22:35:30 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , CC: , , , , , , , , "Manikandan Muralidharan" Subject: [PATCH RESEND v9 8/8] drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 Date: Wed, 24 Apr 2024 11:03:51 +0530 Message-ID: <20240424053351.589830-9-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240424053351.589830-1-manikandan.m@microchip.com> References: <20240424053351.589830-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 Acked-by: Sam Ravnborg --- 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