From patchwork Thu Jun 15 23:01:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9790415 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 CC950602CB for ; Fri, 16 Jun 2017 00:53:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB0AA283AD for ; Fri, 16 Jun 2017 00:53:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B014428648; Fri, 16 Jun 2017 00:53:25 +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=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 42C542846A for ; Fri, 16 Jun 2017 00:53:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 720AB6E83D; Fri, 16 Jun 2017 00:53:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0113.outbound.protection.outlook.com [104.47.2.113]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1A3DC6E82D for ; Thu, 15 Jun 2017 23:02:05 +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=zc4/yHN4AMVvp4Qeiz/Q0P57HP+IJIHf9VM+/9mJKGw=; b=LPlf2g4nsx7ajN2aq3VyyQ0Ro9IWYyfkXeK9Yq3lU0NJiQIPKG+VQiIZEptWgyji9QdGm7n1fGPSQnG5m3/LTsxbRWgHvRHJoZeQ2jHIbDEaF+3lvIEnpTq6HPe8vU+wBXXotc/PFfMGO4osgimbPkehC+2aDPfPpvDkgewuaYY= Authentication-Results: lists.freedesktop.org; dkim=none (message not signed) header.d=none; lists.freedesktop.org; dmarc=none action=none header.from=axentia.se; Received: from [192.168.0.125] (81.224.171.159) by AM5PR0202MB2546.eurprd02.prod.outlook.com (2603:10a6:203:6d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Thu, 15 Jun 2017 23:02:02 +0000 Subject: Re: Color lookup support for the atmel-hlcdc driver To: Boris Brezillon References: <9b09c7fe-cf5c-fe48-2bdf-d7ac692da2e1@axentia.se> <20170613173030.4c846d2e@bbrezillon> <20170615121558.13fd212d@bbrezillon> <30b52b65-bad9-d51e-d09e-52695b0ed859@axentia.se> <20170615135430.5067af84@bbrezillon> From: Peter Rosin Organization: Axentia Technologies AB Message-ID: <077c7d8f-991d-017a-a310-f7f8eeee86f5@axentia.se> Date: Fri, 16 Jun 2017 01:01:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170615135430.5067af84@bbrezillon> Content-Language: en-US X-Originating-IP: [81.224.171.159] X-ClientProxiedBy: DB6PR07CA0080.eurprd07.prod.outlook.com (2603:10a6:6:2b::18) To AM5PR0202MB2546.eurprd02.prod.outlook.com (2603:10a6:203:6d::7) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM5PR0202MB2546: X-MS-Office365-Filtering-Correlation-Id: 09c69fca-26c4-416b-f55b-08d4b4428907 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075); SRVR:AM5PR0202MB2546; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0202MB2546; 3:qaEy9LMifSPa32c0hRxU7PFJt33exBR26ABJgUMvDvbEpEWXG+M9ezcHe0lj+nOAgZpJaPSP6d/u+kvIRwvJg4J0tcIecLXTdyxC4fYJpaTeAFu2XebsNS4y1Q+zQXzjtPUqrj6crHAlzUCHW9F7NlCEE5+z4qB9CSLzDTDT4Jj7IkztdDdr8n1Kj5ymHRWAbjhPe6vpApb2nZf1auVNLThvlVvupd2kHJPcIRK682jb5piBfWFBO8bd/jXDy9CaoDbpe8rGp9RCyDqxkZhUBIPHFh3Jxx1jKR20hOwMEZbHr1x3/usTDclq7W4ioclt; 25:oDVMcub3LG1tSQQlTPB8Us45mURe0aMhx4BL2lNGxVfpCrS2avOt+7euarcSjJA0ZrLkBkoyqZKmR1g+Pf69oXAJYOtty1rf+VS3wtanE5j/Njw7Nkr5QsGCd8PtLVVCBhitUpYXH4eCZCQ3SbZHcaXkXixNvPW3ef9R8Ln/o3hWa6hAGiNnXxoJO97qgbeD2RqSR20IRRvftWqh404AG59WddRDUyBjNR7A5CYITxWmiWlnf6q7n7BWlDLn7eOJ5XB5ORPCmBlYFFGMNBT6Fp0wyT3puZ1ApGekRvoXL87LZmkyk9hKbwrEiElCrez5tX21whJxYOh9q0bnF1TC9Qf1kxPnGxyhXdC4Kbp7UbaG/L1PlpttTLMPAzyC61395A0lQywYRJMEbFX2GzVnbAP9yd4WMhEbZTfjN40An4WbBSSaT/ZmBWbZtTkV6BHKZRofs1Q20SUCdONoocPwx5JqV09xvheNsUXMrTWK58c= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0202MB2546; 31:3p3bIyrjAf1BBkZInCPr/qcVLwTJfqgFMuhL7gVdyrSS11qY2r1cKAuzOOtdDrkYHUfBbcnOjP4l3vQHy5KX/Nljg21a3ZFTNMLb9E0JYShEBoKJg6+ORFU3aFT1FtRgLemTp33rufYrYrFIR8upKS71cX7lQvyh74fGlIuBJdmHHl9MiLe353zKm2VMxYBLP2nlfgkzbQP0XS2aMV52PlDW9fKVg5A7UTW3LoyfcL3ybbpOP47Dxlat8T94qI9ABUv6uK9C47atpwBOccwpMw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(58145275503218); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123564025)(20161123555025)(20161123562025)(20161123560025)(20161123558100)(2016111802025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(6043046)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0202MB2546; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0202MB2546; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjAyMDJNQjI1NDY7NDptZzlaM2VGZEM5T0EzYTMwWU15UVVJdGhB?= =?utf-8?B?WGNuYmNycE1QMXBTRWQzUU0wY2puV0g0azFyekJKT0xKRFpxY3FINEVaOStS?= =?utf-8?B?NnZFeFB6UERZTDltQzZxZGN6UHNCaThtRC9EaW5wTzkreEUxeEtKaXdaRHJs?= =?utf-8?B?WEExQ0MvQk5oQ0lUUCtMeVhTSXpnQVB2TzI5U09hSmdVMVpEdWNFb1NGUnlE?= =?utf-8?B?SlpOcXIyREp0N2hqRTl6QWIwUmV6dmE0bUt6V1NZcWk2R0p3eUdHTW5sVWtv?= =?utf-8?B?L2VBSkNrUkNWdWtEUWJPZ3pxbUdVVVl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4Y3ZvM2lMNFdFblVVMTYra01wMm9QVFkxN1FhTldZMnYvNUFkaXR3bWY4?= =?utf-8?B?SGsxeldSV2REMS8rZkZXUURHbGlXcEpRaWJLUWFPQzhnd2I0M09HYXYzQWxX?= =?utf-8?B?R2hTTFg0amJlamhXek45RnpSeFlHS0RMVmJ3TXQxSWl6eVdrbkZoRnNqN3l3?= =?utf-8?B?Ym9vQ1QrYUZSdEhaZ0NtUmRJTlZ3eTNDZyt3N0JSclBPeVVGWGxtY081SFIz?= =?utf-8?B?UW5WTmF6TTVWYnhEMklvMkY3VGdVTWttYm55YzlZN2xvOVpzZEZkUUVpWEQ5?= =?utf-8?B?NHo0REhGRTBwSENSZ1p6MFFGVFZ3c0xhNC9iVW55eFRibE0wWHVMRHRPMUJh?= =?utf-8?B?d2FpRnc4amVvaExtYjI1TEx2QytyVDFEbHRIalZodDVSbVBLaEVwQXdLUGt6?= =?utf-8?B?Z09qWjFrNmdkeTAzbGxJSDJQRTVzNkhnQSsvM3ExQ1cySkFVY2V2QW9IR21w?= =?utf-8?Q?+bndEzdCF5qh6YDvUGY1AzJCHXJYXtOnhLwAeJNb?= X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6049001)(6009001)(39830400002)(39410400002)(39450400003)(39400400002)(377424004)(24454002)(6666003)(2950100002)(6306002)(74482002)(77096006)(8676002)(6916009)(6486002)(93886004)(81166006)(229853002)(53936002)(25786009)(3260700006)(42186005)(66066001)(31696002)(50466002)(64126003)(83506001)(189998001)(4001350100001)(23676002)(117156002)(110136004)(65826007)(38730400002)(54356999)(230700001)(76176999)(86362001)(5660300001)(33646002)(2906002)(6116002)(305945005)(3846002)(7736002)(478600001)(4326008)(31686004)(36756003)(53546009)(50986999)(47776003)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0202MB2546; H:[192.168.0.125]; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?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GGSNn/1p5olcoqJmz3qs7PFDoZIeNqj/w1nMkZD9Na6y+4oCvFUy3cvn6MOZGgzxIkmQkBfktK6NSsVNoQfBo7CN5tqxheYVaqTOPgvtSTveYtqmLZGBqJQOKB/X3bgEXt8hul; 24:FBZV8VwQGiLjsAu+DMbzxEXakm0qfkSzOn+s7bUdLf8o48Hp/eNQPa1OM2tkO/HekwxPQHy6f+QNdvAay+fbkYLtrEcGTFoluQMSKQ0DapE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0202MB2546; 7:ezagWxrYYhBAEMn/R+gIQLLkkaNG5DgGEI+DuRySQlct09+AV7apl/cfX5gKjvrpwLQDqmfxkNo8JOoqjQdSinnbaNTBpfkdKpTXj6L3RhHvqIyrJvgR9APEyk4tk+prssWcWM8EZ1HjDffjQPgbVjm/izbTgy0lYa1K5WmMKRQ+IflMdeMT+huJ44TXgW+BYXwFfh6NLuUjV4Y2KVkq4z6BSRtLjEJINmVOja/luzu+7PEBOyN+wl7vEs+oCPDmEle/CspqMMq8lIwwlqJxU+O6kGd1VATxiM/jG2TUrzh7TmaXuJWsIFmuwh0JNx7a4g0MXBPd0OIDy4iEyJdrkQ== X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2017 23:02:02.1236 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0202MB2546 X-Mailman-Approved-At: Fri, 16 Jun 2017 00:53:09 +0000 Cc: dri-devel@lists.freedesktop.org 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 On 2017-06-15 13:54, Boris Brezillon wrote: > On Thu, 15 Jun 2017 13:47:35 +0200 > Peter Rosin wrote: > >> On 2017-06-15 12:15, Boris Brezillon wrote: >>> On Thu, 15 Jun 2017 11:54:29 +0200 >>> Peter Rosin wrote: >>> >>>> On 2017-06-13 17:30, Boris Brezillon wrote: >>>>> Hi Peter, >>>>> >>>>> On Tue, 13 Jun 2017 16:34:25 +0200 >>>>> Peter Rosin wrote: >>>>> >>>>>> Hi! >>>>>> >>>>>> I need color lookup support for the atmel-hlcdc driver, and had a peek >>>>>> at the code. I also looked at the drivers/gpu/drm/stm driver and came >>>>>> up with the below diff. It compiles, but I have not booted it for the >>>>>> simple reason that I can't imagine it will work. >>>>>> >>>>>> Sure, the code fills the clut registers in the .load_lut helper function >>>>>> and I think it might even do the right thing when setting up the mode. >>>>>> I'm less sure DMA will work correctly? It might, but I haven't looked at >>>>>> it for many seconds... >>>>>> >>>>>> The big question is how the color info gets into the new clut array >>>>>> I created in atmel_hlcdc_crtc? When I look at the stm driver, which does >>>>>> it just like this AFAICT I just don't see it. So, what I'm I missing? >>>>> >>>>> You should look at drm_atomic_helper_legacy_gamma_set() and its users. >>>> >>>> Ok, thanks. I had a long look and could not get it to work at all. >>> >>> Probably because you're trying to set this up through the emulated >>> fbdev interface. The solution I proposed is supposed to be accessed >>> through DRM ioctls. >> >> Yes, that seems like the root cause of most of my troubles. But, the apps >> I have seem to use the fbdev interface, and if the emulation is poorly >> done, they won't work right... >> >>>> So, >>>> I did as below instead. However, there are a few glaring problems... >>> >>> Well, I doubt this will be accepted. The fbdev emulation layer is >>> supposed to be rather dumb, partly because DRM people want developers >>> to switch to the DRM interface. >> >> Sigh. >> >>> Also note that I won't accept a solution that supports setting the LUT >>> table only through the fbdev interface, so please try to make it work >>> the DRM way before you even consider modifying the fbdev emulation >>> layer. >> >> Ok, I'll have another look. But to me, it's a maze... >> >>>> >>>> Something, somewhere, sets up default entries for the 16 first entries >>>> of the palette and seem to expect them to stay as some kind of safe >>>> basic palette, and my applications don't handle it too well. When they >>>> want to draw black, they get a poisonous cyan/green instead etc. But >>>> it's pretty close. Can anyone provide some clue as to how that is >>>> supposed to be handled? >>>> >>>> Also, I had to change the second argument of the drm_fbdev_cma_init... >>>> call at the end of atmel_hlcdc_dc.c:atmel_hlcdc_dc_load() from 24 to 8 >>>> to make it possible to set 8-modes. However, doing so fucks up 24-bit >>>> modes. Which made me suspect that no non-24-bit mode work w/o my patch. >>>> And I could indeed only get 24-bit modes to work, unless I changed this >>>> value to 16. Then RGB565 works like a charm, but RGB888 don't. What's >>>> up with that? Seems like a rather silly limitation, but it's perhaps >>>> just a bug? >>> >>> I'm pretty sure this is not a bug. AFAIR, prefered_bpp is used when you >>> don't explicitly specify the video mode you want to use on the cmdline >>> [1]. >>> >>> [1]http://elixir.free-electrons.com/linux/v3.11/source/Documentation/fb/modedb.txt >>> >> >> (Why refer to v3.11 docs?) >> >> Let's start with some basics, I tried to add >> >> video=atmel-hclcd-dc:1024x768-16 >> >> and >> >> video=atmel_hclcd_dc:1024x768-16 >> >> to the kernel cmdline of an unpatched linux-next kernel. No dice, I can >> still only access RBG888. I'm obviously in need of some hand-holding... >> >> How am I supposed to get a 16-bit mode? > > You should have a look at [1]. > > [1]https://www.at91.com/linux4sam/bin/view/Linux4SAM/UsingAtmelDRMDriver#Choose_supported_modes > Ahh, it works with video=Unknown-1:1024x768-16 Thanks! So, is this below better? I'll follow-up with a patch I need for the fbdev emulation to work. I can't easily test this newfangled drm stuff, my userspace is oldish, so I don't know if atmel_hlcdc_crtc_atomic_flush() is the correct place to call atmel_hlcdc_crtc_flush_lut and have the palette loaded? What I'm saying is that I have only tested the fbdev emulation, and I still have trouble with the palette colors (poisonous green/cyan instead of black etc). But that may only be an issue with fbdev? Cheers, peda diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c index 5348985..68f5e66 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c @@ -61,6 +61,7 @@ struct atmel_hlcdc_crtc { struct atmel_hlcdc_dc *dc; struct drm_pending_vblank_event *event; int id; + u32 clut[256]; }; static inline struct atmel_hlcdc_crtc * @@ -140,6 +141,46 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c) cfg); } +static void +atmel_hlcdc_crtc_load_lut(struct drm_crtc *c) +{ + struct atmel_hlcdc_crtc *crtc = drm_crtc_to_atmel_hlcdc_crtc(c); + struct atmel_hlcdc_dc *dc = crtc->dc; + int layer; + int idx; + + for (layer = 0; layer < ATMEL_HLCDC_MAX_LAYERS; layer++) { + if (!dc->layers[layer]) + continue; + for (idx = 0; idx < 256; idx++) + atmel_hlcdc_layer_write_clut(dc->layers[layer], + idx, crtc->clut[idx]); + } +} + +static void +atmel_hlcdc_crtc_flush_lut(struct drm_crtc *c) +{ + struct atmel_hlcdc_crtc *crtc = drm_crtc_to_atmel_hlcdc_crtc(c); + struct drm_crtc_state *state = c->state; + struct drm_color_lut *lut; + int idx; + + if (!state->gamma_lut) + return; + + lut = (struct drm_color_lut *)state->gamma_lut->data; + + for (idx = 0; idx < 256; idx++) { + crtc->clut[idx] = + ((lut[idx].red << 8) & 0xff0000) | + (lut[idx].green & 0xff00) | + (lut[idx].blue >> 8); + } + + atmel_hlcdc_crtc_load_lut(c); +} + static enum drm_mode_status atmel_hlcdc_crtc_mode_valid(struct drm_crtc *c, const struct drm_display_mode *mode) @@ -312,6 +353,9 @@ static void atmel_hlcdc_crtc_atomic_flush(struct drm_crtc *crtc, struct drm_crtc_state *old_s) { /* TODO: write common plane control register if available */ + + if (crtc->state->color_mgmt_changed) + atmel_hlcdc_crtc_flush_lut(crtc); } static const struct drm_crtc_helper_funcs lcdc_crtc_helper_funcs = { @@ -429,6 +473,7 @@ static const struct drm_crtc_funcs atmel_hlcdc_crtc_funcs = { .atomic_destroy_state = atmel_hlcdc_crtc_destroy_state, .enable_vblank = atmel_hlcdc_crtc_enable_vblank, .disable_vblank = atmel_hlcdc_crtc_disable_vblank, + .set_property = drm_atomic_helper_crtc_set_property, }; int atmel_hlcdc_crtc_create(struct drm_device *dev) @@ -484,6 +529,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, 256); + drm_crtc_enable_color_mgmt(&crtc->base, 0, false, 256); + 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..a2cc2ab 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) @@ -259,6 +264,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 +420,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) +{ + atmel_hlcdc_layer_write_reg(layer, + 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..5537843 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;