From patchwork Tue Jun 20 19:25:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9800521 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 ECE986038C for ; Wed, 21 Jun 2017 01:00:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0C9024603 for ; Wed, 21 Jun 2017 01:00:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D41812624A; Wed, 21 Jun 2017 01:00:37 +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 412DD24603 for ; Wed, 21 Jun 2017 01:00:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9CEAD6E422; Wed, 21 Jun 2017 00:59:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0090.outbound.protection.outlook.com [104.47.1.90]) by gabe.freedesktop.org (Postfix) with ESMTPS id 197936E3C4 for ; Tue, 20 Jun 2017 20:57:08 +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=hI1QywDyCUifZfWKTyvA1bNicP4t9BAuPMKMNqfmNRE=; b=PVn8Y4+vUpsk+lJ7sPnk5P8tnHM3g4hBmrqLTKj+1mJY8R76TVEG61uwy7IKnSxWDiJ3gAORWPVS1olWD8EoLCly6joL/d1pvQj3UiQw4tDeMEUQaDBB8A3iEyY/rH1vmdS8NBEGWLOSzkY2KGQI/NDFjW4d7s3hw9SLmV9Uvak= 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 HE1PR0202MB2556.eurprd02.prod.outlook.com (2603:10a6:3:90::9) 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 19:25:08 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH 04/11] drm: cirrus: remove dead code and pointless local lut storage Date: Tue, 20 Jun 2017 21:25:28 +0200 Message-Id: <1497986735-14418-5-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1497986735-14418-1-git-send-email-peda@axentia.se> References: <1497986735-14418-1-git-send-email-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [81.224.171.159] X-ClientProxiedBy: DB6PR07CA0081.eurprd07.prod.outlook.com (2603:10a6:6:2b::19) To HE1PR0202MB2556.eurprd02.prod.outlook.com (2603:10a6:3:90::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 36ed7e63-9c85-46de-ec5f-08d4b81211e0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075); SRVR:HE1PR0202MB2556; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0202MB2556; 3:cLdPWKzZRgv+08syCGFSkZWeSxpdMoYC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riJPVUbVtaU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(2016111802025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6043046)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0202MB2556; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0202MB2556; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2556; 4:NYFfROHx6SQ8ZxH3WVNybQzVX2txmagK1+Gx1fA1?= =?us-ascii?Q?PA3HZF2TUipQ79bsLzpWJPdnqkXtCQB0PmHnmNaKIZeqr8erTK0XBPYWS4Pz?= =?us-ascii?Q?TKt0EwPMZ8pTuT5wTsYZNcx+MfSEzhb6FlLKgcOqmRLT8r7Dcc8s6bBt+TOF?= =?us-ascii?Q?elbCnL090ciBKBmRyfBJ2bj0YSvhzoPdvadBavC7ovQRhwI7W3A3uLsQE58G?= =?us-ascii?Q?Sf9vGxhkNJYfya8YrLRTwlLUeZB3EwR3UTMs1O/zyf6xbqLKiXsvm2t8R80y?= =?us-ascii?Q?1irJd3P7+N1sbzeTrBOpQPITziFK3XrbSKS352r9bHbB0nS2+biCQjsjuylT?= =?us-ascii?Q?GUQsMeT6Js9mopTqHvzfLKLWdabhgBj5cSJgv1IMYcQn9IymDYtxRDkYj59J?= =?us-ascii?Q?EIyr4WKdAhFR2R3lv1jtyDkwREnNPscSj/u20rNewWj1koVeZqVIG8VIu2HH?= =?us-ascii?Q?/dYa/1v6zMsXUwfZz1BIMjWdkxmCZKpC6JUBxehDD2Z7rQyQ0KtZ+elxyEbD?= =?us-ascii?Q?YqVAuR54UYkrSgCclKtu+WJ5lNF3+jFWbGVGRlLTPOT9NWDsTuB6M/1ct6lQ?= =?us-ascii?Q?NU2cqKZXTkfYWCv/a26UWpyq1OyAVZceiavKEnwXuWBYJ8jE4wsTadz3ljR6?= =?us-ascii?Q?FnM3qbnbr/hRc05kYMD6ta6enOnz+Nm1zNcstnx5Y1p573TCPSy2Sy5NFyJB?= =?us-ascii?Q?VApCXlnOXKj2gJIXmUifhiUlad4NXuP/vgx4IVdRlAbtHuqftkdDzzBa8xnd?= =?us-ascii?Q?U+CjyrgODAEnqGQzFovZ2zwmI9OpUrYytfMhWqepB4qn8SJ+TqAqD6uh5hip?= =?us-ascii?Q?PLqWPjUWrjJBUCzMpwk3O3hEUdrl/wAhAsavK2w9uMg6FmbYJHy88379iawI?= =?us-ascii?Q?9pe/mlhMaHYYu/g9h7Ori0OJ+GfR0i0cG9hiXEowA7iYZtnMb0L2U2rRyUyZ?= =?us-ascii?Q?9u+sNSxKNMkyY+FaqY23XKInlDcC5HlEPR79aRSNq9+6yvT4ol1m0iGGMxT+?= =?us-ascii?Q?EXmXtw9r4w1LZj8szeDOBM80mGi/zzKTf4yTGL0p2KurUlOL9OI/VhnruFNY?= =?us-ascii?Q?gDIUholIOQXgHSwsL5drunqOUF3Nmtegqd06z3z3YPy+Hb1lUdcYvRX2vy54?= =?us-ascii?Q?03i4SVf1l183wT9oqmNkRUIwIpeeJ9ft9poh7I7Q0KYZLeAiGA0k4QQ0IoP3?= =?us-ascii?Q?xo0tvcCNKYYJ2OMUy7AUbuq1ayNlAhcYVn8/?= X-Forefront-PRVS: 03449D5DD1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39410400002)(39400400002)(39450400003)(39830400002)(478600001)(6506006)(8666007)(53936002)(2906002)(8676002)(7736002)(38730400002)(110136004)(6916009)(2950100002)(6666003)(5003940100001)(74482002)(305945005)(81166006)(50226002)(42186005)(76176999)(6116002)(50466002)(50986999)(4326008)(7416002)(25786009)(3846002)(2351001)(2361001)(48376002)(575784001)(86362001)(54906002)(189998001)(6512007)(5660300001)(6486002)(33646002)(66066001)(36756003)(47776003)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0202MB2556; H:orc.lan; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2556; 23:liuYAJ2g4BD7Toy0ue2sGKscbCzMefCXClMGVVB?= =?us-ascii?Q?t+orycf5F2ubPLwgqS4HgtmP/Ax+EpjDlHULZGSqDFliiT/Q0cJcnR6bogNR?= =?us-ascii?Q?HuCan5eXpTev2FA48dCQ4kv3tQ92kl3sqT0pX4DoOZIRrI4y4oSQXw+M6Y10?= =?us-ascii?Q?5cNAfE4QY8aiUDkiwmPTvjM3se0Uq3WrI6XnNBZc35APQIRMAycbvZbmjLLF?= =?us-ascii?Q?iEQR1hX1xIUe+MEe7iIyjfNQOIbq9bkCTQm4S3+FsKkUiWieq/8Pj1eaEo9q?= =?us-ascii?Q?tZwXgHt2wZ7MKPt4RC6WZI2XPgdgD2y5dGuMlS7lt7qomLagKcHMC9e7+gyO?= =?us-ascii?Q?WX25KVN9e94SvUdq9ioTq1+veGQValpMt6LmU8jEUkmjUM6rIb5xUMnntS9N?= =?us-ascii?Q?oUrgsh15vHbCVCcW122zWY5SqCRYKeZILc9Yy2su0m/BaqUn+L1V4+AclO0P?= =?us-ascii?Q?6AfSVgIKlDTnwG4d/Ed19Gj43pJQmABeqcxftqqB0C0yTX32DXfQiMoqkWOv?= =?us-ascii?Q?m+6nz3/k9wcE6FT73ZbGDcsKjeTYLaEV+CwS7u0Vix2JCkoCE8MYW2d4z5Iw?= =?us-ascii?Q?sarqScXyIK+P4TDBMejcvQ47DMCTWncyP6gRKsamMLL5Smw9apnHHZwTbNJb?= =?us-ascii?Q?JsYC9GauVEeM1U6taj1pgRmt/NLQ9k+YmjV5rQh1q+rtvnfHUqESib5JsKcL?= =?us-ascii?Q?SWcCPaceecK6c96t3f1L2dTBQom99cYQHN/hKOu0YptmYWz5s47CVgcjAuNO?= =?us-ascii?Q?9MBf/lRpfzYJ4h9rHFWbt1QXp4onHYTzcCtOPVctUrOa05IBPS4Yd+sQJs8s?= =?us-ascii?Q?P8sUbKTnvZb+2ZDFAhPOR7ztFM8GGcSuaD8QLythtqE1uK++O8ax9go+Yy7r?= =?us-ascii?Q?zx3VWi/lkS5ikc5hEyrSrszb7pejtqi96YZENQKsrWknUeCdYKvf7LmI5rAi?= =?us-ascii?Q?b2PTRctdwqytJbwebjX7ndOioUcFf9brPrcjqZ7R2RYBzQDdH2OBnaTnwK62?= =?us-ascii?Q?RZMHgtvegk7feZLkALc4Mql98o+9VcdXvUkXitI2beKSTaZU1ifLrEXca18C?= =?us-ascii?Q?xvE4uuvRtjmXNoCcJ83v3WjszNb0rXYTSyOs5LAv8Wdm2PCLtAUXrp8rUQSb?= =?us-ascii?Q?zRNWFQLngBWiwMiLft5XvvzqJMM0dEDicCu4JVzYUSL453YGAlx3HEw=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2556; 6:VhdoKYslemr3mtwiJbUqQ8/JkdcnIH5K3QkH/Plt?= =?us-ascii?Q?Qx6Yaqa3QPe2J7PGXzKYh5jx0vaSgoKGxo26WB/Q78z5P+mtCQUryB+WcQuw?= =?us-ascii?Q?1PjT2t/mw+EB0mky23OWhL0zyWwzquxFMtw/q2d8gcR8V1BuDFLwgJKnoYPn?= =?us-ascii?Q?q4ZeT45ZnMdYYwotuk/Mjy3VEAFVJW0Dr3HSE4xDO4CKNrLvby/cwTT6Zvvp?= =?us-ascii?Q?H8e6AFo3M3ueARGgOqpxLHN9FGILrZzrR41jMX9v+e2RRR1bcp0U3Tf4VaQz?= =?us-ascii?Q?F+Yv9TESeoFFzmmT7x0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SqiRtaci7KJWBAP0Aeqe2MfOyqfLnp8pQBIC3XkXVJmRiUiA6SUTKa80hoP9GdTNdwfS6LhwWf9DjFe9OlnKMVXdaL5p3ymna1VefXa6jD8RnIhWFKYUsK6c3npfNJZbYjv11cqvuW904Mw4wedZq0AUakUUBRNCXpyYsfsvtndBUA+x2iYwVysBmLc3khxgvp83pQ9JvjzgWqjaVUYYaE+qXqfuAYiNwRecVxVZHW/do8L1llCptx/0wRvkqTu7BJ9VK3MYqF1uVq9l7GaIBi7LoqFSBcxUxLRnNvPyjySzztg98VPKFwG3PHZF5BP3BS9XWLasryQqbz/vYZI2Dv53KrcNoGLQGb; 24:d4YuKZI2tpM3GTyPsKaZ8rIqED863nQlZREduMBhkIs+bhjhx1dcXKifCCWdSojFCfkqXwylTvqhC/wcKx/48vvzuUsoIb6Ng/xquk2pyjQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0202MB2556; 7:wQKdB1Dj7samaslGxL9SVwXsqn0m8BQj0SG/HyfPK9dSlomlu2bMgSHeMuKGHG0HDAgkLpri5GqAR/LThAmptv8JDU0WNi2dBw9s/C7yRkZsyoipKqmImy1vkgbP1hzvmBBmSVvzGX3/QkOzHd3LzavpBTFo7Ijnq2/xt4rtN6dL6B5Lz881EPvS3k5uBCt2FlggQswZkvinHKMjUKa77pmxXi171C7XAONa/naSKlrMKlUhwqTumJQb56TFRnSP10DCBWH+wxtGE1rlR/S4jF6drQpjMn92eMRgNo4eRHGFig4V679IV8/MvXA0YzWphYzdF1FS8u1sux2TpgaG8w/MQt4KzzQPcOlW1g8wJf42FRLuYAl/tSHtwucW2toPdsL5V2g4LopmMzJxcRE5Cud36grAMRqSD21G6z9kuDxoQjUQdDRucWgxzgFzOM6h3bO5Kds6kI6mNtwirjw4nMWc6e9LL5VHkEjf4L0SFPUQ/ku9QJlL26cl8vL5Y6zgPPtq372BiW6enr4CY5QlIj+PSPnKeE32Y6j1t5Hw87cY51FUfN3YYYVuTFCXmBJahLTw7r+sajS1jiXWjGqL1HoFzN1ne8h279lCRCgpDkOn9+R4hVM0Yx+dO1apcMQXLtWVIjee9b3TOtfgYwEwa8ZoYdRnK/oKix2Xk+V0z9NifbpXBoYdg81MNZ+ufL2WVomUp1sx91x3kdP5GmH8vrU2jBggZkoROc0Vj4TjwTmLfXi3UtTs04MvDf/UNrFf7E3UkFm4jsx5APaJo/wCZJsNvMZJ/sQqxshZ7nX7f1s= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 19:25:08.3707 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0202MB2556 X-Mailman-Approved-At: Wed, 21 Jun 2017 00:58:52 +0000 Cc: amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Philippe Cornu , =?UTF-8?q?Christian=20K=C3=B6nig?= , Yannick Fertre , Gerd Hoffmann , Daniel Vetter , Alex Deucher , Dave Airlie , virtualization@lists.linux-foundation.org, Vincent Abriou , Peter Rosin , Ben Skeggs 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 The redundant fb helpers .load_lut, .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Signed-off-by: Peter Rosin --- drivers/gpu/drm/cirrus/cirrus_drv.h | 8 ---- drivers/gpu/drm/cirrus/cirrus_fbdev.c | 2 - drivers/gpu/drm/cirrus/cirrus_mode.c | 71 ++++++++--------------------------- 3 files changed, 16 insertions(+), 65 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.h b/drivers/gpu/drm/cirrus/cirrus_drv.h index 8690352..be2d7e48 100644 --- a/drivers/gpu/drm/cirrus/cirrus_drv.h +++ b/drivers/gpu/drm/cirrus/cirrus_drv.h @@ -96,7 +96,6 @@ struct cirrus_crtc { struct drm_crtc base; - u8 lut_r[256], lut_g[256], lut_b[256]; int last_dpms; bool enabled; }; @@ -180,13 +179,6 @@ cirrus_bo(struct ttm_buffer_object *bo) #define to_cirrus_obj(x) container_of(x, struct cirrus_gem_object, base) #define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT) - /* cirrus_mode.c */ -void cirrus_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, - u16 blue, int regno); -void cirrus_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, - u16 *blue, int regno); - - /* cirrus_main.c */ int cirrus_device_init(struct cirrus_device *cdev, struct drm_device *ddev, diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c index 7fa58ee..1fedab0 100644 --- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c +++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c @@ -265,8 +265,6 @@ static int cirrus_fbdev_destroy(struct drm_device *dev, } static const struct drm_fb_helper_funcs cirrus_fb_helper_funcs = { - .gamma_set = cirrus_crtc_fb_gamma_set, - .gamma_get = cirrus_crtc_fb_gamma_get, .fb_probe = cirrusfb_create, }; diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index 53f6f0f..a4c4a46 100644 --- a/drivers/gpu/drm/cirrus/cirrus_mode.c +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c @@ -31,25 +31,6 @@ * This file contains setup code for the CRTC. */ -static void cirrus_crtc_load_lut(struct drm_crtc *crtc) -{ - struct cirrus_crtc *cirrus_crtc = to_cirrus_crtc(crtc); - struct drm_device *dev = crtc->dev; - struct cirrus_device *cdev = dev->dev_private; - int i; - - if (!crtc->enabled) - return; - - for (i = 0; i < CIRRUS_LUT_SIZE; i++) { - /* VGA registers */ - WREG8(PALETTE_INDEX, i); - WREG8(PALETTE_DATA, cirrus_crtc->lut_r[i]); - WREG8(PALETTE_DATA, cirrus_crtc->lut_g[i]); - WREG8(PALETTE_DATA, cirrus_crtc->lut_b[i]); - } -} - /* * The DRM core requires DPMS functions, but they make little sense in our * case and so are just stubs @@ -330,15 +311,25 @@ static int cirrus_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, struct drm_modeset_acquire_ctx *ctx) { - struct cirrus_crtc *cirrus_crtc = to_cirrus_crtc(crtc); + struct drm_device *dev = crtc->dev; + struct cirrus_device *cdev = dev->dev_private; + u16 *r, *g, *b; int i; - for (i = 0; i < size; i++) { - cirrus_crtc->lut_r[i] = red[i]; - cirrus_crtc->lut_g[i] = green[i]; - cirrus_crtc->lut_b[i] = blue[i]; + if (!crtc->enabled) + return 0; + + r = crtc->gamma_store; + g = r + crtc->gamma_size; + b = g + crtc->gamma_size; + + for (i = 0; i < CIRRUS_LUT_SIZE; i++) { + /* VGA registers */ + WREG8(PALETTE_INDEX, i); + WREG8(PALETTE_DATA, *r++ >> 8); + WREG8(PALETTE_DATA, *g++ >> 8); + WREG8(PALETTE_DATA, *b++ >> 8); } - cirrus_crtc_load_lut(crtc); return 0; } @@ -365,7 +356,6 @@ static const struct drm_crtc_helper_funcs cirrus_helper_funcs = { .mode_set_base = cirrus_crtc_mode_set_base, .prepare = cirrus_crtc_prepare, .commit = cirrus_crtc_commit, - .load_lut = cirrus_crtc_load_lut, }; /* CRTC setup */ @@ -373,7 +363,6 @@ static void cirrus_crtc_init(struct drm_device *dev) { struct cirrus_device *cdev = dev->dev_private; struct cirrus_crtc *cirrus_crtc; - int i; cirrus_crtc = kzalloc(sizeof(struct cirrus_crtc) + (CIRRUSFB_CONN_LIMIT * sizeof(struct drm_connector *)), @@ -387,37 +376,9 @@ static void cirrus_crtc_init(struct drm_device *dev) drm_mode_crtc_set_gamma_size(&cirrus_crtc->base, CIRRUS_LUT_SIZE); cdev->mode_info.crtc = cirrus_crtc; - for (i = 0; i < CIRRUS_LUT_SIZE; i++) { - cirrus_crtc->lut_r[i] = i; - cirrus_crtc->lut_g[i] = i; - cirrus_crtc->lut_b[i] = i; - } - drm_crtc_helper_add(&cirrus_crtc->base, &cirrus_helper_funcs); } -/** Sets the color ramps on behalf of fbcon */ -void cirrus_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, - u16 blue, int regno) -{ - struct cirrus_crtc *cirrus_crtc = to_cirrus_crtc(crtc); - - cirrus_crtc->lut_r[regno] = red; - cirrus_crtc->lut_g[regno] = green; - cirrus_crtc->lut_b[regno] = blue; -} - -/** Gets the color ramps on behalf of fbcon */ -void cirrus_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, - u16 *blue, int regno) -{ - struct cirrus_crtc *cirrus_crtc = to_cirrus_crtc(crtc); - - *red = cirrus_crtc->lut_r[regno]; - *green = cirrus_crtc->lut_g[regno]; - *blue = cirrus_crtc->lut_b[regno]; -} - static void cirrus_encoder_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)