From patchwork Tue Jun 20 14:10:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9800507 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3A6AB60329 for ; Wed, 21 Jun 2017 00:59:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F5DF26222 for ; Wed, 21 Jun 2017 00:59:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2291728506; Wed, 21 Jun 2017 00:59:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 75EBD26222 for ; Wed, 21 Jun 2017 00:59:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A4D566E40B; Wed, 21 Jun 2017 00:58:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 110499 seconds by postgrey-1.35 at gabe; Tue, 20 Jun 2017 14:25:29 UTC Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00118.outbound.protection.outlook.com [40.107.0.118]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9FF836E35F for ; Tue, 20 Jun 2017 14:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentiatech.onmicrosoft.com; s=selector1-axentia-se; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SPX0agFEZeuP/qW9EyV/uXapm+ys35ADW1z8xkpmeng=; b=t4qTyrHcjbUvXqVpLeUeoQ1EwsZypH1lZFYMIQ9e7rRHu25POHI02nhzrcv8JtmztYOaFnTAa4vyLmRA7ozxUZoXC1iWpEAmvT6XypQBfKaUAqPHxmOgCVGMzXHWy9JeLahSKLqxQP77mL7FloXU9qi7UhE/w659/calwAv+XUQ= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=axentia.se; Received: from orc.lan (81.224.171.159) by HE1PR0202MB2555.eurprd02.prod.outlook.com (2603:10a6:3:90::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Tue, 20 Jun 2017 14:10:25 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH v4 2/2] drm: atmel-hlcdc: add support for 8-bit color lookup table mode Date: Tue, 20 Jun 2017 16:10:52 +0200 Message-Id: <1497967852-5592-3-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1497967852-5592-1-git-send-email-peda@axentia.se> References: <1497967852-5592-1-git-send-email-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [81.224.171.159] X-ClientProxiedBy: AM5PR0102CA0007.eurprd01.prod.exchangelabs.com (2603:10a6:206::20) To HE1PR0202MB2555.eurprd02.prod.outlook.com (2603:10a6:3:90::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8a68a6b6-e12f-46a2-1387-08d4b7e6198e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075); SRVR:HE1PR0202MB2555; X-Microsoft-Ex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antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(2016111802025)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148)(6043046)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0202MB2555; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0202MB2555; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2555; 4:iiBTlC+FenuGZzr2D9rfWlRTEZvsiubq7EtSnhDv?= =?us-ascii?Q?lJ5DXMyy8tO1nE3xUJ0x7dyPIDHH4uYM+7hdO4TNhJgMQTC5ExJuJrIijd2B?= =?us-ascii?Q?JRnYNzd24CuC5spIhU8IyNNRXEysJ3Hp4lCsl6W2QlSxXVasQniC/i1A1vEZ?= =?us-ascii?Q?avCVPNIrBPYy7Peb5f1VD/mMORGdjPPfr85F/GnoOMnAWt2Yz+mHQ1GYAvwx?= =?us-ascii?Q?ghb+gr7GJJXUd74qwetA9zQdsCP8nIvCacnrAC/W7GVmS7S43em9dOy3t5Jf?= =?us-ascii?Q?otBW3JmfqCLclmAPiJjqtNFrz2Y+tsvTizCJr4KdX6sUIoOncdSCRxv5cZpY?= =?us-ascii?Q?RdFbiRsSzL3utXfMDFvzHh4d3I/c+UWIrXD5tJDMfTCWxhX02lemhR0kF6ZN?= =?us-ascii?Q?JaatTCS7uHxuPr1ZEKa7FHvHQoeHqtXyqL8ZfmUDsCltyw8sz+I4xghPukMb?= =?us-ascii?Q?nLKe3JGJO+pw+UNdyKGKkqF6NVaeUoVsCitiSi49unbVMBE3pywn9gRMo6Q2?= =?us-ascii?Q?SFss12y9POM/JWu+jy58/xp0pVagIxuhBvDSPAZEcaMXFrCqXt35oNHvWSya?= =?us-ascii?Q?oikot3pNrfN4V4fPmJcxRZv0c1HqFzASCNU4QldgLhtPKZ3ynORztn8t9r7L?= =?us-ascii?Q?1z9MnJUTBPqi07XoTK0YXQ3yWzfLDP/onV1HnR+zjicavpgL6wGHhS91R+jx?= =?us-ascii?Q?fWj15geCxHQfvvK3YMIATRU3B6F+Oo+QGLk2SVyBxTCaInWTV05rg1rqYH7u?= =?us-ascii?Q?dX3mkNV8v0kRQc6C/qO2ELoqsnJ56VNOhCQ3HztyhFceYAmnBBRv0GktZHbC?= =?us-ascii?Q?WzeGRlhyZ9Exyn6XgU7nmQCMLgekMBOJlZ2kKY4bb9dZOLb1YVdAQgNd7nzI?= =?us-ascii?Q?z9wmyUbP/zxH8QqnQDP4QupZ6AL+jeASdPAKRi4v4lD/DLFQNp5z+cQIVBaa?= =?us-ascii?Q?elokGb4YXsWrKUCA1bLMv6zkzN9JxsDB8ubTFCQZat1+yln2DGSaJs7FPlDQ?= =?us-ascii?Q?dA37Uxv4HMg5+54xqDN9mur2JCe3RWVTunITXL851kXhsOthWszP/xCfM/zT?= =?us-ascii?Q?2VNKSv16/R/fuPw8PMNrTdPoMP5CTUaCP7Co+TXhD/bw/7K6prH7Llg55TFN?= =?us-ascii?Q?54eSqwgoh9104RKhwHo3K/Hdb5queHJTlcWfyPDIKzl8y0FvQ6/HMEryX5Er?= =?us-ascii?Q?2JBIi9AFxX1/CccD+gIoohx0D+/usw6JkHWX?= X-Forefront-PRVS: 03449D5DD1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39450400003)(39410400002)(39400400002)(39830400002)(5003940100001)(8676002)(76176999)(50986999)(6512007)(53936002)(42186005)(25786009)(2361001)(189998001)(2351001)(33646002)(6486002)(50226002)(110136004)(81166006)(4326008)(38730400002)(6506006)(305945005)(478600001)(2906002)(66066001)(5660300001)(3846002)(6916009)(2950100002)(6116002)(48376002)(36756003)(50466002)(47776003)(54906002)(6666003)(74482002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0202MB2555; H:orc.lan; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2555; 23:UHk1ztwRUVUb1fjcfi+dlJUIgOntXP+jaK0/zcJ?= =?us-ascii?Q?vHTB83dlE+GOXj4LdiJ8GUAoPAoLou5hpTdZdqdv2LORK8sQRhMHrlzBQnrC?= =?us-ascii?Q?6fBujQQsWD9Aso9h8UvvRQV6lyjFkRBhg0f55PZJyFvhgcnRX5p96lM89Ffp?= =?us-ascii?Q?DZrBpZnCwuFfP5btp7if2VVG37TsGrqq1DD/2N7unojU2xsUg4Z3ZwPjKzFV?= =?us-ascii?Q?Ohhy/E8kheeolxkaB5UFN3ZN5PSDRl/9332thnR1Koz8xUr8L8qvFJSUFLNf?= =?us-ascii?Q?EB3SPSAr7Wg0HOKiSva5w7NB9x/qCBHuJyFPCee4uaduSEXnmHOBQrVdgC6X?= =?us-ascii?Q?Fm5OwX1Nri5WsrS2YuveZmX6F+sefWzj7MEUGn3ROCQ1vUbhus1aepAZWhyg?= =?us-ascii?Q?GLdt5yng+iUDTGYKjmyjd4yLOssnKACixJhGxkeMz8Wjzwf1R1d8YdsLTAkD?= =?us-ascii?Q?FNmtVxMv5gve+yH+fgQr44L+8EHGzMvBPTze+JaSbf/4gBxIkaj1Sihf4edp?= =?us-ascii?Q?LfYHg17A+TKJF6N71eLZJIEvhYsSIVvi80+DyU8EVq0LmEYCVwRRHA5NexzP?= =?us-ascii?Q?FgsEcVCOsEvfO+4HhCtAFlG/51toRczVPcp15GqQlJV8qFXz7olo/4cjtK6y?= =?us-ascii?Q?/KtG2Ib48QeIkqc6mZbHlKEpQRDs1blfnBUnlgoH7bPtm45wH8u5oxkApYMi?= =?us-ascii?Q?RWOj6ieV/vKuLsLaomVMmo54ATR/BXLsHShsvD7eG/K6mgO9zqy+nM2G3yDp?= =?us-ascii?Q?mKhL1UIhPtXKZB2X4wA+7+JGcnkrIQ22+87h46/I0ND5FdI1xbWjy/d52Zw0?= =?us-ascii?Q?lTZVf1bMosuEKwMBUWs9A8c0oMzycU0i5kXWpcyFFseLswVyTavipuL1IUea?= =?us-ascii?Q?08mN0kYWnznjRwnhW8jtDdOASdMpTX1l92XPChU959Qy3+iA2S6wCr0Ku+Fz?= =?us-ascii?Q?sh6UnKtHryvNA0NSqyEflolArpoPOX82QCtc+QnAzF57dfxVvtmCUYtaYx9y?= =?us-ascii?Q?nX4mgkDCbvDACMeBJzbvNEYGVGnFftmlXeARjZhcNh/9JSgEwlFxUGzw6e6m?= =?us-ascii?Q?lZjCltcg=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2555; 6:bjy75Bd6cZvhtznotP0B886IXb2LWqmiNTSs50VM?= =?us-ascii?Q?fVZDHckp9TRG8vx4FRom4YwrA0q3+m+rHlCQjB09gpqzNR5FkYzS2x/e1bVa?= =?us-ascii?Q?jJQZoo+zmY5sS8H3TbL2Mkx3dPBQ0dHNVtQRj2Z9GSJTodALwfjztEEDcn0U?= =?us-ascii?Q?9FfoeIak2HeVpOBD2iqfDxTRTQ1EkSRB2GAR4SOV4BvPgvlSZVMIokGXeLWA?= =?us-ascii?Q?vUIe+q47vG3ZKz/og18J5c8Sm9wvFYQqUBK/hjokf+oIdEobSn7CLauVnuMu?= =?us-ascii?Q?hez1oqoHmjG8WPix2qmVWrTqOqi+TovV9L+y6TbtJHhtlB3DYd8fPoDJ5nV8?= =?us-ascii?Q?a/hAquPUonagcf2d4D4uQ+vmS1jhcJJhPHwYLI5GtHZ4wmiyBnltf7kBZ791?= =?us-ascii?Q?vW8MetjU3s0h7cArzqDQijS3t271sBXj3Lo3H84yz8fN4NW9Gl2vVpskUSHY?= =?us-ascii?Q?vyR3wznEGCIzUgcjXvvaw6Wb/FoZ0IQAB8GmaNJ0Y/I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hhufgL/Ixwby8Cn8M0lJ7xWemS8G20Y0Y= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 14:10:25.2060 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0202MB2555 X-Mailman-Approved-At: Wed, 21 Jun 2017 00:58:52 +0000 Cc: Nicolas Ferre , dri-devel@lists.freedesktop.org, Alexandre Belloni , Daniel Vetter , Peter Rosin X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP All layers of all supported chips support this, the only variable is the base address of the lookup table in the register map. Signed-off-by: Peter Rosin --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 4 ++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 13 +++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 16 ++++++++++++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 29 +++++++++++++++++++++++++ 4 files changed, 62 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c index cc00ce3..694adcc 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c @@ -430,6 +430,7 @@ static const struct drm_crtc_funcs atmel_hlcdc_crtc_funcs = { .enable_vblank = atmel_hlcdc_crtc_enable_vblank, .disable_vblank = atmel_hlcdc_crtc_disable_vblank, .set_property = drm_atomic_helper_crtc_set_property, + .gamma_set = drm_atomic_helper_legacy_gamma_set, }; int atmel_hlcdc_crtc_create(struct drm_device *dev) @@ -485,6 +486,9 @@ int atmel_hlcdc_crtc_create(struct drm_device *dev) drm_crtc_helper_add(&crtc->base, &lcdc_crtc_helper_funcs); drm_crtc_vblank_reset(&crtc->base); + drm_mode_crtc_set_gamma_size(&crtc->base, ATMEL_HLCDC_CLUT_SIZE); + drm_crtc_enable_color_mgmt(&crtc->base, 0, false, ATMEL_HLCDC_CLUT_SIZE); + dc->crtc = &crtc->base; return 0; diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index 30dbffd..4f6ef07 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -42,6 +42,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_at91sam9n12_layers[] = { .default_color = 3, .general_config = 4, }, + .clut_offset = 0x400, }, }; @@ -73,6 +74,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_at91sam9x5_layers[] = { .disc_pos = 5, .disc_size = 6, }, + .clut_offset = 0x400, }, { .name = "overlay1", @@ -91,6 +93,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_at91sam9x5_layers[] = { .chroma_key_mask = 8, .general_config = 9, }, + .clut_offset = 0x800, }, { .name = "high-end-overlay", @@ -112,6 +115,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_at91sam9x5_layers[] = { .scaler_config = 13, .csc = 14, }, + .clut_offset = 0x1000, }, { .name = "cursor", @@ -131,6 +135,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_at91sam9x5_layers[] = { .chroma_key_mask = 8, .general_config = 9, }, + .clut_offset = 0x1400, }, }; @@ -162,6 +167,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sama5d3_layers[] = { .disc_pos = 5, .disc_size = 6, }, + .clut_offset = 0x600, }, { .name = "overlay1", @@ -180,6 +186,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sama5d3_layers[] = { .chroma_key_mask = 8, .general_config = 9, }, + .clut_offset = 0xa00, }, { .name = "overlay2", @@ -198,6 +205,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sama5d3_layers[] = { .chroma_key_mask = 8, .general_config = 9, }, + .clut_offset = 0xe00, }, { .name = "high-end-overlay", @@ -223,6 +231,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sama5d3_layers[] = { }, .csc = 14, }, + .clut_offset = 0x1200, }, { .name = "cursor", @@ -244,6 +253,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sama5d3_layers[] = { .general_config = 9, .scaler_config = 13, }, + .clut_offset = 0x1600, }, }; @@ -275,6 +285,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sama5d4_layers[] = { .disc_pos = 5, .disc_size = 6, }, + .clut_offset = 0x600, }, { .name = "overlay1", @@ -293,6 +304,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sama5d4_layers[] = { .chroma_key_mask = 8, .general_config = 9, }, + .clut_offset = 0xa00, }, { .name = "overlay2", @@ -336,6 +348,7 @@ static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sama5d4_layers[] = { }, .csc = 14, }, + .clut_offset = 0x1200, }, }; diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h index b0596a8..4237b04 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h @@ -88,6 +88,11 @@ #define ATMEL_HLCDC_YUV422SWP BIT(17) #define ATMEL_HLCDC_DSCALEOPT BIT(20) +#define ATMEL_HLCDC_C1_MODE ATMEL_HLCDC_CLUT_MODE(0) +#define ATMEL_HLCDC_C2_MODE ATMEL_HLCDC_CLUT_MODE(1) +#define ATMEL_HLCDC_C4_MODE ATMEL_HLCDC_CLUT_MODE(2) +#define ATMEL_HLCDC_C8_MODE ATMEL_HLCDC_CLUT_MODE(3) + #define ATMEL_HLCDC_XRGB4444_MODE ATMEL_HLCDC_RGB_MODE(0) #define ATMEL_HLCDC_ARGB4444_MODE ATMEL_HLCDC_RGB_MODE(1) #define ATMEL_HLCDC_RGBA4444_MODE ATMEL_HLCDC_RGB_MODE(2) @@ -142,6 +147,8 @@ #define ATMEL_HLCDC_DMA_CHANNEL_DSCR_DONE BIT(2) #define ATMEL_HLCDC_DMA_CHANNEL_DSCR_OVERRUN BIT(3) +#define ATMEL_HLCDC_CLUT_SIZE 256 + #define ATMEL_HLCDC_MAX_LAYERS 6 /** @@ -259,6 +266,7 @@ struct atmel_hlcdc_layer_desc { int id; int regs_offset; int cfgs_offset; + int clut_offset; struct atmel_hlcdc_formats *formats; struct atmel_hlcdc_layer_cfg_layout layout; int max_width; @@ -414,6 +422,14 @@ static inline u32 atmel_hlcdc_layer_read_cfg(struct atmel_hlcdc_layer *layer, (cfgid * sizeof(u32))); } +static inline void atmel_hlcdc_layer_write_clut(struct atmel_hlcdc_layer *layer, + unsigned int c, u32 val) +{ + regmap_write(layer->regmap, + layer->desc->clut_offset + c * sizeof(u32), + val); +} + static inline void atmel_hlcdc_layer_init(struct atmel_hlcdc_layer *layer, const struct atmel_hlcdc_layer_desc *desc, struct regmap *regmap) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c index 1124200..b5bd9b0 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c @@ -83,6 +83,7 @@ drm_plane_state_to_atmel_hlcdc_plane_state(struct drm_plane_state *s) #define SUBPIXEL_MASK 0xffff static uint32_t rgb_formats[] = { + DRM_FORMAT_C8, DRM_FORMAT_XRGB4444, DRM_FORMAT_ARGB4444, DRM_FORMAT_RGBA4444, @@ -100,6 +101,7 @@ struct atmel_hlcdc_formats atmel_hlcdc_plane_rgb_formats = { }; static uint32_t rgb_and_yuv_formats[] = { + DRM_FORMAT_C8, DRM_FORMAT_XRGB4444, DRM_FORMAT_ARGB4444, DRM_FORMAT_RGBA4444, @@ -128,6 +130,9 @@ struct atmel_hlcdc_formats atmel_hlcdc_plane_rgb_and_yuv_formats = { static int atmel_hlcdc_format_to_plane_mode(u32 format, u32 *mode) { switch (format) { + case DRM_FORMAT_C8: + *mode = ATMEL_HLCDC_C8_MODE; + break; case DRM_FORMAT_XRGB4444: *mode = ATMEL_HLCDC_XRGB4444_MODE; break; @@ -424,6 +429,29 @@ static void atmel_hlcdc_plane_update_format(struct atmel_hlcdc_plane *plane, ATMEL_HLCDC_LAYER_FORMAT_CFG, cfg); } +static void atmel_hlcdc_plane_update_clut(struct atmel_hlcdc_plane *plane) +{ + struct drm_crtc *crtc = plane->base.crtc; + struct drm_color_lut *lut; + int idx; + + if (!crtc || !crtc->state) + return; + + if (!crtc->state->color_mgmt_changed || !crtc->state->gamma_lut) + return; + + lut = (struct drm_color_lut *)crtc->state->gamma_lut->data; + + for (idx = 0; idx < ATMEL_HLCDC_CLUT_SIZE; idx++, lut++) { + u32 val = ((lut->red << 8) & 0xff0000) | + (lut->green & 0xff00) | + (lut->blue >> 8); + + atmel_hlcdc_layer_write_clut(&plane->layer, idx, val); + } +} + static void atmel_hlcdc_plane_update_buffers(struct atmel_hlcdc_plane *plane, struct atmel_hlcdc_plane_state *state) { @@ -768,6 +796,7 @@ static void atmel_hlcdc_plane_atomic_update(struct drm_plane *p, atmel_hlcdc_plane_update_pos_and_size(plane, state); atmel_hlcdc_plane_update_general_settings(plane, state); atmel_hlcdc_plane_update_format(plane, state); + atmel_hlcdc_plane_update_clut(plane); atmel_hlcdc_plane_update_buffers(plane, state); atmel_hlcdc_plane_update_disc_area(plane, state);