From patchwork Tue Jun 20 19:25:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9800491 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 2EC3B60329 for ; Wed, 21 Jun 2017 00:59:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27045200F5 for ; Wed, 21 Jun 2017 00:59:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B5A126222; Wed, 21 Jun 2017 00:59:01 +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 7BE3E24603 for ; Wed, 21 Jun 2017 00:59:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA98C89D49; Wed, 21 Jun 2017 00:58:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 86951 seconds by postgrey-1.35 at gabe; Tue, 20 Jun 2017 19:25:12 UTC Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0124.outbound.protection.outlook.com [104.47.0.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1D33A89491 for ; Tue, 20 Jun 2017 19:25:12 +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=c2+c/dCz8X5o2Q08ZTEKcDSvSyLCeto5v1UF8s71JHs=; b=EIrZn5L1mnK3wlpi3tU0HrQvUXgCLzuTgsOMYFI2db4q3rbB2C7HeN8cmPyob84RvV+l4OdUWelx6C9q5XqDmVeAW7DsKp9YmKNdYtZcT5O7f46fKZS+49u+rf0Sjt6T7cwzugfLCVQt9GQO9YjZ8bRzjo4A3wNAnZCrTCrNUOQ= 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:04 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH 03/11] drm: ast: remove dead code and pointless local lut storage Date: Tue, 20 Jun 2017 21:25:27 +0200 Message-Id: <1497986735-14418-4-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: 0ada4a2d-6100-4693-efd5-08d4b8120fbe X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075); SRVR:HE1PR0202MB2556; X-Microsoft-Exch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E+7tlDrMLcmD9wLWk0CdVG5spQ2cGrQUIAM8p7r+Pt6B+eY+H4zmGYoLr/yJlUM2SjoJDDI= 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:LmzH5SqX+e1Z382rerMYq1gqKN9hRC2h/H2qx627?= =?us-ascii?Q?rU9TkXG7doULbkHoCbeks6XsiRVpBBX57XCOuWRiZnWYBaeaG24zMPMURs5n?= =?us-ascii?Q?i2DJxV8nQuYGy0hfnxeUYGB2w2vdBnv/NyhewOQtrFgkWUvBUaUG9xxALvE8?= =?us-ascii?Q?n6zdTOE7qpKfSdU5MBVAxuRO60EXgmjcdUlDAxmFtvSqf+pHwpi4TuxqaVWd?= =?us-ascii?Q?quVh7JDCW8sfIhu8A0e+S9vrxF7W3dlyoKoS7HjCYDLJcWqORTP1AZ4STYFq?= =?us-ascii?Q?ZYMhPJv0G6anlhNGJ7FXpg2N+HqzGexOycSzSNEZpl8OtVfNs9wD+W4Ylp69?= =?us-ascii?Q?w2PfThnEm/9yuN0sgSc/oH279ESmNOqqdFt34XdRcJXSMdTmULFsfhfkw4WF?= =?us-ascii?Q?pLhjmKmdH7QUMYPA/9lX9Mu87zBnMZja1N5frcWMA0NWXmCHnDdZa1yDBkdf?= =?us-ascii?Q?zRvs2OVwlopA+jskLXhy77Km8R+s7d7kk572VCjVapZE/noGGXOlEyM24tId?= =?us-ascii?Q?4d0BUwGHeliyQ2x1B5aAuXq/+tVzkv6jZwClgSghu+taMQvY+2oI25+kuhU9?= =?us-ascii?Q?SDkYhWhO1uhC9tE5KGqlmMy689EMtqjvZN8C44JOWgKsUvm3CCWohwyrLm1E?= =?us-ascii?Q?NiIZxWWRVUJe1hY0+bDU1o4p66bAkADs/oSOtWo0SRS86vZzAEkDc9XPb4hv?= =?us-ascii?Q?ACDWGzBapukdnIW1p+/hbXrgivziWLdPP1wdKEZCtJQK5YXMX+7MMtwCXn6I?= =?us-ascii?Q?+JfEZpDbuBnbXqJbIJLUAgZ8pzVOKL3D9x0RW5G1W0BuaLi0Xj5GywmSKT+3?= =?us-ascii?Q?zisXgFx0oYhdg06xOhWjH27pA5HdLsFH/Z+F61j0zWgRgoO1WY3hZVEJXsNA?= =?us-ascii?Q?RIfObLEfB5mLcQoYXl860qUzujJVhQjF63hxNbHQ251OT6YS9PbrYR0Gv8lP?= =?us-ascii?Q?FFwIpujoFZh/V/IL9e1VJbNAWyuKD21wfSauq6Mbs6PeoUAK8K1dTa/3zB7J?= =?us-ascii?Q?KbeZxYcr7z66ovjX4751um7SMoHoJSvthjiFPMzkqmSe49EflPrczxHF7VLC?= =?us-ascii?Q?QiCEEiEQGzRhwZ9up3uSwhQ4gyJOZw+wVmqG2L3CF4aV8joJR9RGMGdYElPn?= =?us-ascii?Q?Vm4tdROLnZzttwQcLLGpALnBntm1BGoiDBbryTEixzTUJfIlObvG1ObQeZqE?= =?us-ascii?Q?uvEEFP7bQb3bLZAeprjjCsUYpD3u01BkfIX4?= 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:HhAogogCXX33A1mx2Fjt+1tCZNPqBiCOz2V4DyJ?= =?us-ascii?Q?XBPzObb1uJi3MkbzmuIn1llYO3dTG3GSxPE12JZg4H/cn8kd1XncLI5fWTRD?= =?us-ascii?Q?ZgYluNxyAqj5GLRMyYdY3foP07dsHa+9lP0o3o+T+AO7Elj5rIJYpB+qbU36?= =?us-ascii?Q?sIUC0bfWn01CL4+Q+w/I9UT1HjqzTlwlMO01owLT2YET8gYsSYS1S2lsU0UH?= =?us-ascii?Q?o9qZUaTuRNyZJMbgKL42lQKcXAnIWDfOimMTE6xXgqujJq10iq5DwIH4x+Cf?= =?us-ascii?Q?gzLMgieZhLE6omEMsipu0Xo2d7U3j66smkGmF8hKlWjCUzDWb6FqvEK8SI0q?= =?us-ascii?Q?G/TFdqvlx7RmCGWY8xSA1O8eeV7KLwi616ESvR0WBxRrtSZk9hPYLDGHtpnC?= =?us-ascii?Q?bxHIzwY97z8vVv+y/meKTbgdrMcRQEqfoM37+zfoun/4XxWHJIKJU/e99fBU?= =?us-ascii?Q?Y2T4aroxIAQwaR3VrIFHjtVSkdDgH47tbZor7Yai5j0FhzAhBQ+jJWmqVJ+X?= =?us-ascii?Q?9xnlewaO8p/FKsYV4Daz7Qqi86JUUtnoatXMYF5mrs5+I9nOetkH91h+v0Mx?= =?us-ascii?Q?uR918SeH5XprerhrpgfDvpMlJMkUOjtcwGNeTyzy+txkp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mPDhkTHTAmjc77dtl3uHC+W1kWrfabXtn35X5N7FcbTmzHkM+QmmtQ5Vc4cxUDFRkzHw/ZUc2f2JKC1XDW5hm/MaCZLoV3JMwqv1nS3UMP746M3cSFtmYf8+i7BeX4uGbwrtlSQ2DJG8n8Gf3z8WKgSkKSEY1do+91Ty5Ie6iL1iHxtjUFBKLIwc89nhIh6bwLI5VvBOkD2SATd+EEmdLrQ6EGxFJIVyzAB2v4Vj8waljAZz8taulRxiSqmDP3iUeUgPkcD4H+dTAt0wgrfoG6t4xjoEXKVNK/XgjhO0hFSwnbPD4irzL87kbzAPb7inKfbv5NwMJU= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 19:25:04.5269 (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/ast/ast_drv.h | 1 - drivers/gpu/drm/ast/ast_fb.c | 20 -------------------- drivers/gpu/drm/ast/ast_mode.c | 26 ++++++-------------------- 3 files changed, 6 insertions(+), 41 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h index 8880f0b..569a148 100644 --- a/drivers/gpu/drm/ast/ast_drv.h +++ b/drivers/gpu/drm/ast/ast_drv.h @@ -245,7 +245,6 @@ struct ast_connector { struct ast_crtc { struct drm_crtc base; - u8 lut_r[256], lut_g[256], lut_b[256]; struct drm_gem_object *cursor_bo; uint64_t cursor_addr; int cursor_width, cursor_height; diff --git a/drivers/gpu/drm/ast/ast_fb.c b/drivers/gpu/drm/ast/ast_fb.c index 4ad4acd..dbabcac 100644 --- a/drivers/gpu/drm/ast/ast_fb.c +++ b/drivers/gpu/drm/ast/ast_fb.c @@ -255,27 +255,7 @@ static int astfb_create(struct drm_fb_helper *helper, return ret; } -static void ast_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, - u16 blue, int regno) -{ - struct ast_crtc *ast_crtc = to_ast_crtc(crtc); - ast_crtc->lut_r[regno] = red >> 8; - ast_crtc->lut_g[regno] = green >> 8; - ast_crtc->lut_b[regno] = blue >> 8; -} - -static void ast_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, - u16 *blue, int regno) -{ - struct ast_crtc *ast_crtc = to_ast_crtc(crtc); - *red = ast_crtc->lut_r[regno] << 8; - *green = ast_crtc->lut_g[regno] << 8; - *blue = ast_crtc->lut_b[regno] << 8; -} - static const struct drm_fb_helper_funcs ast_fb_helper_funcs = { - .gamma_set = ast_fb_gamma_set, - .gamma_get = ast_fb_gamma_get, .fb_probe = astfb_create, }; diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index aaef0a6..724c16b 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -63,15 +63,18 @@ static inline void ast_load_palette_index(struct ast_private *ast, static void ast_crtc_load_lut(struct drm_crtc *crtc) { struct ast_private *ast = crtc->dev->dev_private; - struct ast_crtc *ast_crtc = to_ast_crtc(crtc); + u16 *r, *g, *b; int i; if (!crtc->enabled) return; + r = crtc->gamma_store; + g = r + crtc->gamma_size; + b = g + crtc->gamma_size; + for (i = 0; i < 256; i++) - ast_load_palette_index(ast, i, ast_crtc->lut_r[i], - ast_crtc->lut_g[i], ast_crtc->lut_b[i]); + ast_load_palette_index(ast, i, *r++ >> 8, *g++ >> 8, *b++ >> 8); } static bool ast_get_vbios_mode_info(struct drm_crtc *crtc, struct drm_display_mode *mode, @@ -633,7 +636,6 @@ static const struct drm_crtc_helper_funcs ast_crtc_helper_funcs = { .mode_set = ast_crtc_mode_set, .mode_set_base = ast_crtc_mode_set_base, .disable = ast_crtc_disable, - .load_lut = ast_crtc_load_lut, .prepare = ast_crtc_prepare, .commit = ast_crtc_commit, @@ -648,15 +650,6 @@ static int ast_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, struct drm_modeset_acquire_ctx *ctx) { - struct ast_crtc *ast_crtc = to_ast_crtc(crtc); - int i; - - /* userspace palettes are always correct as is */ - for (i = 0; i < size; i++) { - ast_crtc->lut_r[i] = red[i] >> 8; - ast_crtc->lut_g[i] = green[i] >> 8; - ast_crtc->lut_b[i] = blue[i] >> 8; - } ast_crtc_load_lut(crtc); return 0; @@ -681,7 +674,6 @@ static const struct drm_crtc_funcs ast_crtc_funcs = { static int ast_crtc_init(struct drm_device *dev) { struct ast_crtc *crtc; - int i; crtc = kzalloc(sizeof(struct ast_crtc), GFP_KERNEL); if (!crtc) @@ -690,12 +682,6 @@ static int ast_crtc_init(struct drm_device *dev) drm_crtc_init(dev, &crtc->base, &ast_crtc_funcs); drm_mode_crtc_set_gamma_size(&crtc->base, 256); drm_crtc_helper_add(&crtc->base, &ast_crtc_helper_funcs); - - for (i = 0; i < 256; i++) { - crtc->lut_r[i] = i; - crtc->lut_g[i] = i; - crtc->lut_b[i] = i; - } return 0; }