Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37743831rwd; Tue, 11 Jul 2023 19:55:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlEJlmer1yaJYB8YWbmxYfhf3midbPsIm7rzQ2QlUp/oDNnE/aVAIi4sK3RcZNbiNcTvbiyp X-Received: by 2002:a05:6a20:3d90:b0:126:9f02:da6f with SMTP id s16-20020a056a203d9000b001269f02da6fmr16376177pzi.14.1689130540452; Tue, 11 Jul 2023 19:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689130540; cv=none; d=google.com; s=arc-20160816; b=HehkmuB63hYlY6BRQfWkWvEVh2SBEIU3xURN6Kn/Yi1LT9H9JNJCvmlYaw+qdSzy3f ahjxUDmXKmL3mWJSazJ6pnosdI5ozU17gMDkJ2eqXTRHpmlpQjXNwcmcdL9aiW92QOSR XjgxO/pU33gT3y1sayAs1yFH0P1Vux8/dCuaoP22NhozONq/R8YQa/puynF7Uf5xfCML SQsp4GzGDH/qpdQV5dhLwjnIJAxO9C4uQYU0Ul9VcvQnLZPFSmZEa7F6sdx7d3fgNUUY dlPb2dR8HoskzWo2uOk7d5KChtrgYj7JrvoyA7PKc/Uypv2GqtapKxpsATOPqL/FMeOL /vhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cwLm6LixB+/JX0Ok+1ygMeWVjZvCRleGjyj4mRzI/HM=; fh=hqXxddZ8DLUwbnM3H43PrOHn+E+g1mOk3ANyl5S2DLo=; b=WnybIpB3UgrdLqDycxkbD/I0R8THrayBSuLzB7AkX25gmfE9oJ6EMXcWOGi3e/ZyZ4 qCP3zdpvoweKCgBwxwOv8/xtPQbM3LYnfNbdqHlHvL9Q10Xd7vdgI6bLVOB248FA/dLJ RNRhCWmXFqgJAy5z7HSbaAfQWn1CbBQ70wGpUv5eWWE9C3reUYSY3mXGyCH42T28McFA ZUIUodiorlNsYSrXntm7UvwaZaLxb5/aMdM5GHmMTtLfzNslIPyZxQJbmRhyjQF1HQfv 4ejPg+98NomwAIYOiTKq94ATEFcEERGSiUZSY9d2AoSkh1fsaAH4Uf2emFA7ZJQ3+6Jw ltdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="v4oExi/p"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l8-20020a170903244800b001b9e21bc14dsi2547597pls.652.2023.07.11.19.55.28; Tue, 11 Jul 2023 19:55:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="v4oExi/p"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231145AbjGLCln (ORCPT + 99 others); Tue, 11 Jul 2023 22:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbjGLCle (ORCPT ); Tue, 11 Jul 2023 22:41:34 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 949E31991; Tue, 11 Jul 2023 19:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1689129689; x=1720665689; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7Vv10apy3dujTxAUU/bAcUdLl39yKDSm3soc5TeW2ww=; b=v4oExi/pV/bUhexR0dJSnJk8ERQaOS1CmKfQWYPB3vc4NsPZnGBHq+pa 5nTjd+9PCzejIlxEQOvbnT5LAbIRl284hVj+2bxJk6mF7/30ddiLQX4xJ QT0UM/YdwuAGiH9Kp1WBRRTGdxj1o8GLOEraGam1qKY6BzAM/th2rgD9g 2vccsMJhsIamprCDNFRnIG/Q8x/xuA8G+Tf2ufZdItYSMtZTn2QAPiYjk ENc/JEhmyof6I7y+iOLnUOiRN05z/QEVzxPQ9GUB1tYGwrMif3qzONp23 A1080O3Y2zZNuktLrI4nutjVI0L32SglYdLtcfny6mh5mi4qwPbyFKPaH g==; X-IronPort-AV: E=Sophos;i="6.01,198,1684825200"; d="scan'208";a="219936142" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Jul 2023 19:41:28 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 11 Jul 2023 19:41:17 -0700 Received: from che-lt-i67131.amer.actel.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Tue, 11 Jul 2023 19:41:10 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , , CC: , , , , , , , Manikandan Muralidharan Subject: [PATCH v2 4/9] drm: atmel-hlcdc: add LCD controller layer definition for sam9x75 Date: Wed, 12 Jul 2023 08:10:12 +0530 Message-ID: <20230712024017.218921-5-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230712024017.218921-1-manikandan.m@microchip.com> References: <20230712024017.218921-1-manikandan.m@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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