From patchwork Tue Jun 20 19:25:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9800513 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 5C8D660329 for ; Wed, 21 Jun 2017 01:00:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5392A2624A for ; Wed, 21 Jun 2017 01:00:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4856C28500; Wed, 21 Jun 2017 01:00:09 +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 8BCA2284B2 for ; Wed, 21 Jun 2017 01:00:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 86F7D6E415; Wed, 21 Jun 2017 00:59:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 83130 seconds by postgrey-1.35 at gabe; Tue, 20 Jun 2017 19:25:33 UTC Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0108.outbound.protection.outlook.com [104.47.0.108]) by gabe.freedesktop.org (Postfix) with ESMTPS id E176689186 for ; Tue, 20 Jun 2017 19:25:33 +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=YBdr49TYSl5BtKvn3XGYYPrddhDndxxR9D2Scb0navc=; b=uBbvEIBrFC+0K6BtYRS3ob41FiFFQiyWa6L/wRLgRUFZiYvClQfdD0gVTLwuBZ9QA0ni+tvvJmbEMCXnyLTN9mG3R4fZv8HBIZoGbGAwIwZzos7XXHTi8WuI+GAJ00pcrWAmYehg84J3WOxA0X+xgJQHa+vkTq/Z4oIgdukQzHQ= 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:23 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH 08/11] drm: nouveau: remove dead code and pointless local lut storage Date: Tue, 20 Jun 2017 21:25:32 +0200 Message-Id: <1497986735-14418-9-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: 499cba91-56a2-45aa-9df8-08d4b8121ae9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075); SRVR:HE1PR0202MB2556; X-Microsoft-Exchange-Di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zI1+OhEdW016xzkry01T6IpnKpK16NaQVVCI0weQ0jYSEjPSOH1GBDlOr5gOc4/NBujvtIHiOZMQ= 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:uvVpepFfE3zhoSIFytyM83yGR2Au8zClQNcTNZi/?= =?us-ascii?Q?5IkovEamSbtOikeG0FrhOooRtvnfJctHJcUhX2Ck3T0La+/bn8QMVKGPxPPx?= =?us-ascii?Q?zUR3zYook3lXifBkLoXrA/93GIZqrdRTWebhgV1nVSwuJII2JDIVLqVfuJAZ?= =?us-ascii?Q?6MhbzoHxaTYsSCV0ru1WxiwsP8vpeQJf9llqYt7Hf9JDhYQGgvIyRjPObYoQ?= =?us-ascii?Q?rxGOroZdR83zMcbcJLeJlJEq419BT44MPKTlBDvqG67w6WH9jphtXW7sh072?= =?us-ascii?Q?ByWUDtj0Gg9xs1MyTnTheFZnY8YtXT0Mfe/7iNa1Nf5zqj2qTrobv0XvMbZS?= =?us-ascii?Q?CzxKoPEE2A7WJ6UPUG22sT50n1gk5nnZS9E8gqty+aL2ZKrS51nk9nyXTMhK?= =?us-ascii?Q?OLQQepd5PRtbZjPZbWO05aj2xVZ0jLFgf+waZxXW1+nJimF+t7OETOQlmYxS?= =?us-ascii?Q?d6XfaAsid1c2PihUN+iGBA84s+evFlMubY32vaPtY4lx9Dt3eoFgbXCUIL1y?= =?us-ascii?Q?DfcIMDo46pMfQD/xK4LjGw+7dKXpXucaA7sNHwcgZgSC7RWmdd1wdD8K70BZ?= =?us-ascii?Q?nMWsbdwJ7CWpx0KHZ0CfyDiDECrhr9+JRl1RW7PjvkNz1xQUu51nKSSfXyyh?= =?us-ascii?Q?NfcH0VvzRPRPxljcj9F8h5Ib164L8FerPyVDLggZzf8RdFpQcSssM040Zrxn?= =?us-ascii?Q?aKDFU7I5pFgo7kTxVrRNePmZDY+VuV3GnCwEHHHMuE31OHRzs3eaz45oGimo?= =?us-ascii?Q?bAVMDd/lE3In9SiEB6M34PPdGExqpzPxV4p1C6XpXyFvwicoKDhrvkfXh+Ro?= =?us-ascii?Q?blFsMsYGHb6Xkip7TgVQPtAji2BehlZxF7nv/t2V1lqwbe2RhtkvE+ewvXem?= =?us-ascii?Q?/l2cMixmHbuhxBqQc7R3Bd/bBdGORxnuDZc5umxyxOghI8mHOII1Ds4WSJCj?= =?us-ascii?Q?Q1NkdVF7usdbp6o9+rdye6I0SNO8gFwm0Qo0mL5h0SQYDs7XWYqnhyHeYg+F?= =?us-ascii?Q?p89iHGef7qLyOLEY57evvWri5PIkg+DmyPQ+dz/mDGs7Gi3bEQ+wkSQoS7vD?= =?us-ascii?Q?qu6ablOc/WdiQBOYoRHnaEXpn2AS0lHS323L+TwoeQoHLgj4JtPPIBnViZaA?= =?us-ascii?Q?JMID+T4hbtxekdLd8s3VHraFEWVDJ5RwjpIck7BD69gBC7kz9jBOmnNVnvAf?= =?us-ascii?Q?DfaGhbtIiHfsOVB9iOF3AJLHgT9Ewes0tki/?= X-Forefront-PRVS: 03449D5DD1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39410400002)(39400400002)(39450400003)(39840400002)(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:JSwWz6gtACIYNhKObxXvE/q8RTXlZqrcu1m1u0g?= =?us-ascii?Q?Xmne8Hc1UftSTQ2+htWo1BNxD8ATcR1UgqkJvME1ORxB7kc9hqaFmS3O8Abt?= =?us-ascii?Q?+Exg5/d7gRxNz03A4L1BT3xtqIaHlvw885+haz/pqTcZ/rJo+lIiqBFGberG?= =?us-ascii?Q?BD8c954bJ9pKh8sSBOiFyN69+WTnXoHDJV7dpYDMldWUlaldVp/1VeJOdDrl?= =?us-ascii?Q?uz/cFPAH8fTI954ov9dbs4ugGk23CM3uJaD7R87Sgmlwvk2zHLViHV4f8jsf?= =?us-ascii?Q?QMZgc+YWLOaGAXvvpRtoQssgX1ZenpRqJW0ay1oVzCYAgfOBjVH5AKYJPoWm?= =?us-ascii?Q?zdfmo70jJhbvza8L92i42mAbpNltl4aTM9duqypk54g/JuyeoqOxSekg2ogl?= =?us-ascii?Q?imfWsKMEaRV+PO/Bs2eQIZx0NlJ81JHhxyeyRhkWKw0ukfKMvLwzuib0PDuk?= =?us-ascii?Q?zR0IriMChGMAhLeVZS0ivhP+Ul6FunepT2z+XnlM7MEi/BjBP6FP/u5kZ1b+?= =?us-ascii?Q?Yk+Ka9cCrGwnqYpGTN82b1bwX0q0BueFu2NOnYdijRUbBlKCM7jKuoTtX+7S?= =?us-ascii?Q?F58UVMxOnB1f0a+GRp4BjXbjgOVZxu6lw+NWAJ6s8NCDNnC8UauW8r/WRfN+?= =?us-ascii?Q?v6ceZOOA1qV6YqTkhuuzYRcgKZxf15g65Nnzh9YGbAFY46dvSGhzYYTFg82T?= =?us-ascii?Q?2e0va4RFl/bXu9lw/F/VFurIDapPm0EzfqIt0Js42VQQL1TgVbCw7DH81D0O?= =?us-ascii?Q?skynMEPpLhlWS2ha2Qb4hZ9iS2pAFPRjm94pq9YQ7O7BHIbS9ZrVnk1Cyo/V?= =?us-ascii?Q?as7H3+Zet94uiVlckhy5JOEG8+OajSmIPv8PcGtym2QV9J7S0KNN8XxCa39h?= =?us-ascii?Q?xhC5I2Ui15iz5UGzEap+hvRNzJq6rbe6EOVqtbOW9hroTDq2r/o7XWsgieCe?= =?us-ascii?Q?awvdSy5PLU/4v1L360WZqy8DaKlhLqytAZwmmPYlfw5dEqPgRkPi5S//fdVU?= =?us-ascii?Q?Jy9XdBxV1Y3ox6EoprNlXIEoywZGmyjMt920hzJz7eyIKvoHIkRUrTwAUPw2?= =?us-ascii?Q?1kNGU3M9NJ6+cb7cEm8TFsbelMWhGzudpo2XKPzR5I42l21s7qgQxOwstbiY?= =?us-ascii?Q?9IIU8X9yewq7GKaZpI4slh5m9OPUqbBZEWcC+wIXeYrfyxZyxYwgaTw=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2556; 6:eCJ7hdKRRV6ywa8hazXH63dUufNz2JbnNuYX5ick?= =?us-ascii?Q?DZ83N+NGakTUzuZzDBkrQGh44HIm0rvj7CA/5deLjYOwUn2V3G8WeIz86GPF?= =?us-ascii?Q?KzvLoDRjh8MSpEX1guRD7nzWCjwTGCS/Ojp5+4pxZiSxOEPa0y2g2c9G9zy6?= =?us-ascii?Q?MSHM39wkDHBrvhJ/6SXlqlgvxBK/HDEta/vTWK8HHkS+rN8hADd7FhgFRMjx?= =?us-ascii?Q?YgDw5sODZPQn0alv74iswvli0NHLuhp0r0hNFR2xsMLyED0rjg+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BPEO1wfaDzylvAi77d5XCHxLrkwOjUUZJl5I/5rwpc6dGJ8pY8GYngbyik+2v961NxEN6qPF2lAad07ktjBjBsuoAYeUUoRTBPu7oquV9DVL7CCscw/X7Stt+YUm4yKInindKRHC56vJFWB9Ukl4yvFZF6I6rwHYp+BEfF7uzT01r08iY+EofiKEFCbdaPZ1fEMqnKSDELhVG0pOZ6odmfbNEWUNergRGATpmxPTuyFmWNYGybyLmXlhciQ2xATCoBtWfBbf+ZBcKVEvPjTl7wJzOYWSTyfwIzwqkZCj2T1HVpIBRLs2Sc= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 19:25:23.2615 (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/nouveau/dispnv04/crtc.c | 26 ++++++++-------------- drivers/gpu/drm/nouveau/nouveau_crtc.h | 3 --- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 22 ------------------- drivers/gpu/drm/nouveau/nv50_display.c | 39 ++++++++++----------------------- 4 files changed, 21 insertions(+), 69 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index 4b4b0b4..8f689f1 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -764,13 +764,18 @@ nv_crtc_gamma_load(struct drm_crtc *crtc) struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); struct drm_device *dev = nv_crtc->base.dev; struct rgb { uint8_t r, g, b; } __attribute__((packed)) *rgbs; + u16 *r, *g, *b; int i; rgbs = (struct rgb *)nv04_display(dev)->mode_reg.crtc_reg[nv_crtc->index].DAC; + r = crtc->gamma_store; + g = r + crtc->gamma_size; + b = g + crtc->gamma_size; + for (i = 0; i < 256; i++) { - rgbs[i].r = nv_crtc->lut.r[i] >> 8; - rgbs[i].g = nv_crtc->lut.g[i] >> 8; - rgbs[i].b = nv_crtc->lut.b[i] >> 8; + rgbs[i].r = *r++ >> 8; + rgbs[i].g = *g++ >> 8; + rgbs[i].b = *b++ >> 8; } nouveau_hw_load_state_palette(dev, nv_crtc->index, &nv04_display(dev)->mode_reg); @@ -792,13 +797,6 @@ nv_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, struct drm_modeset_acquire_ctx *ctx) { struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); - int i; - - for (i = 0; i < size; i++) { - nv_crtc->lut.r[i] = r[i]; - nv_crtc->lut.g[i] = g[i]; - nv_crtc->lut.b[i] = b[i]; - } /* We need to know the depth before we upload, but it's possible to * get called before a framebuffer is bound. If this is the case, @@ -1095,7 +1093,6 @@ static const struct drm_crtc_helper_funcs nv04_crtc_helper_funcs = { .mode_set = nv_crtc_mode_set, .mode_set_base = nv04_crtc_mode_set_base, .mode_set_base_atomic = nv04_crtc_mode_set_base_atomic, - .load_lut = nv_crtc_gamma_load, .disable = nv_crtc_disable, }; @@ -1103,17 +1100,12 @@ int nv04_crtc_create(struct drm_device *dev, int crtc_num) { struct nouveau_crtc *nv_crtc; - int ret, i; + int ret; nv_crtc = kzalloc(sizeof(*nv_crtc), GFP_KERNEL); if (!nv_crtc) return -ENOMEM; - for (i = 0; i < 256; i++) { - nv_crtc->lut.r[i] = i << 8; - nv_crtc->lut.g[i] = i << 8; - nv_crtc->lut.b[i] = i << 8; - } nv_crtc->lut.depth = 0; nv_crtc->index = crtc_num; diff --git a/drivers/gpu/drm/nouveau/nouveau_crtc.h b/drivers/gpu/drm/nouveau/nouveau_crtc.h index 050fcf3..b7a18fb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_crtc.h +++ b/drivers/gpu/drm/nouveau/nouveau_crtc.h @@ -61,9 +61,6 @@ struct nouveau_crtc { struct { struct nouveau_bo *nvbo; - uint16_t r[256]; - uint16_t g[256]; - uint16_t b[256]; int depth; } lut; diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 2665a07..f770784 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -278,26 +278,6 @@ nouveau_fbcon_accel_init(struct drm_device *dev) info->fbops = &nouveau_fbcon_ops; } -static void nouveau_fbcon_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, - u16 blue, int regno) -{ - struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); - - nv_crtc->lut.r[regno] = red; - nv_crtc->lut.g[regno] = green; - nv_crtc->lut.b[regno] = blue; -} - -static void nouveau_fbcon_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, - u16 *blue, int regno) -{ - struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); - - *red = nv_crtc->lut.r[regno]; - *green = nv_crtc->lut.g[regno]; - *blue = nv_crtc->lut.b[regno]; -} - static void nouveau_fbcon_zfill(struct drm_device *dev, struct nouveau_fbdev *fbcon) { @@ -467,8 +447,6 @@ void nouveau_fbcon_gpu_lockup(struct fb_info *info) } static const struct drm_fb_helper_funcs nouveau_fbcon_helper_funcs = { - .gamma_set = nouveau_fbcon_gamma_set, - .gamma_get = nouveau_fbcon_gamma_get, .fb_probe = nouveau_fbcon_create, }; diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 775c100..3686f5b 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -2193,28 +2193,28 @@ nv50_head_lut_load(struct drm_crtc *crtc) struct nv50_disp *disp = nv50_disp(crtc->dev); struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); void __iomem *lut = nvbo_kmap_obj_iovirtual(nv_crtc->lut.nvbo); + u16 *r, *g, *b; int i; - for (i = 0; i < 256; i++) { - u16 r = nv_crtc->lut.r[i] >> 2; - u16 g = nv_crtc->lut.g[i] >> 2; - u16 b = nv_crtc->lut.b[i] >> 2; + r = crtc->gamma_store; + g = r + crtc->gamma_size; + b = g + crtc->gamma_size; + for (i = 0; i < 256; i++) { if (disp->disp->oclass < GF110_DISP) { - writew(r + 0x0000, lut + (i * 0x08) + 0); - writew(g + 0x0000, lut + (i * 0x08) + 2); - writew(b + 0x0000, lut + (i * 0x08) + 4); + writew((*r++ >> 2) + 0x0000, lut + (i * 0x08) + 0); + writew((*g++ >> 2) + 0x0000, lut + (i * 0x08) + 2); + writew((*b++ >> 2) + 0x0000, lut + (i * 0x08) + 4); } else { - writew(r + 0x6000, lut + (i * 0x20) + 0); - writew(g + 0x6000, lut + (i * 0x20) + 2); - writew(b + 0x6000, lut + (i * 0x20) + 4); + writew((*r++ >> 2) + 0x6000, lut + (i * 0x20) + 0); + writew((*g++ >> 2) + 0x6000, lut + (i * 0x20) + 2); + writew((*b++ >> 2) + 0x6000, lut + (i * 0x20) + 4); } } } static const struct drm_crtc_helper_funcs nv50_head_help = { - .load_lut = nv50_head_lut_load, .atomic_check = nv50_head_atomic_check, }; @@ -2223,15 +2223,6 @@ nv50_head_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, uint32_t size, struct drm_modeset_acquire_ctx *ctx) { - struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); - u32 i; - - for (i = 0; i < size; i++) { - nv_crtc->lut.r[i] = r[i]; - nv_crtc->lut.g[i] = g[i]; - nv_crtc->lut.b[i] = b[i]; - } - nv50_head_lut_load(crtc); return 0; } @@ -2329,19 +2320,13 @@ nv50_head_create(struct drm_device *dev, int index) struct nv50_base *base; struct nv50_curs *curs; struct drm_crtc *crtc; - int ret, i; + int ret; head = kzalloc(sizeof(*head), GFP_KERNEL); if (!head) return -ENOMEM; head->base.index = index; - for (i = 0; i < 256; i++) { - head->base.lut.r[i] = i << 8; - head->base.lut.g[i] = i << 8; - head->base.lut.b[i] = i << 8; - } - ret = nv50_base_new(drm, head, &base); if (ret == 0) ret = nv50_curs_new(drm, head, &curs);