From patchwork Tue Jun 20 19:25:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9800499 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 77F2C60329 for ; Wed, 21 Jun 2017 00:59:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D4D8200F5 for ; Wed, 21 Jun 2017 00:59:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F77126222; Wed, 21 Jun 2017 00:59:30 +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 E58F6200F5 for ; Wed, 21 Jun 2017 00:59:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0DCD66E3FE; 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 1114 seconds by postgrey-1.35 at gabe; Tue, 20 Jun 2017 19:58:49 UTC Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0136.outbound.protection.outlook.com [104.47.2.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 499C06E31E; Tue, 20 Jun 2017 19:58:49 +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=5QFlSeYuCjKDHrxKfDcAqM8S1Y0jiZW1eKskonklcLM=; b=b/rpyzIlGL4OynG7EYyP1UnlpKSNh20Nb14pc6Ke5Lq+JaJxsMavrQp+ikwytcHF4AX09PDafUxF5RL8Dl2dEeGs/GDac8eRJUahw3l3VDWr1F1ESkrgI/4MVv5oqxC/glJnKlOTypZ89PM5AK5xA/ZeOJulDb7iaKQr8bJPzNM= 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:11 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH 05/11] dmr: gma500: remove dead code and pointless local lut storage Date: Tue, 20 Jun 2017 21:25:29 +0200 Message-Id: <1497986735-14418-6-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: ac3c0c83-2443-4572-e8e4-08d4b8121402 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075); SRVR:HE1PR0202MB2556; X-Microsoft-Exchange-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jtm1Tkt/MZ+Kpdh1Snx7Yha1tgrfbIHTaac/3yhMKzcSYIl3EniASyZ0m6JMEkupU= 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:IaiL49JVdHuYYfwZ0s81jQahHHOclo989VcYZybm?= =?us-ascii?Q?elozoBZDuWopLjeIEdHesBNG7g8LQIX6oU4dlOZrhgSpjPoG3Vl9DJORN4HB?= =?us-ascii?Q?tTl+u6NaVk/TXfLZeUVwZEuc2BmLDcynKZvF1OxGOa81FmXD1pILr0a+UVpH?= =?us-ascii?Q?d7ivzqMJ4FIUmJUzlOF2U44bQs23oASzPDgADjLebZ2/SzTfxzGiYEXru4Bp?= =?us-ascii?Q?6PD890CUIy8ErfszD5J6aTQks7es+NUS2TPprrwNQC5jPqmDU9y+j2cGE47o?= =?us-ascii?Q?Dw10xTfheSnzkCUx7W4nunJhLWOoKQFGcISud5szK6bWJxVmZwgfFWR65Eaq?= =?us-ascii?Q?pcT4F5U5OXg3tnqLVqIci0fYWBs05rIf7fBTHIVGzWXPggo92btUI8wKLmDl?= =?us-ascii?Q?dPNpx2KOBm1S85JSAzojBUQ7fbsK+zpVQZM7O2DoZ4xjENIXgdKrubKTzFnR?= =?us-ascii?Q?iA5qiUIAVJ8sKydRFCISZw0EcRIkSSvpPjfU5vzPm9JfpOF2SlwleZ0deCqV?= =?us-ascii?Q?Oa4XIsRf0AJTO2V6cFaMknO0bYXzaacUWdDvEDVgdlGdaLQUelrMzFnGPVMq?= =?us-ascii?Q?LkfbYO4Omf3tN9R//soHkHO79CQmhKd0HniGQndVxJR1jszHjtRHfFjb/bEG?= =?us-ascii?Q?bvM24P8YUQgojv8NGY5Xvj4YcaFHk6WH3gEFHjEz6apfg6hDbF93ZbR7PxmG?= =?us-ascii?Q?J9jDK+EZVAyJuKnYcu8kz2So1ipPI7v69rjAnYMAltdoRHbsT4U2tUZwOcxv?= =?us-ascii?Q?xTZAxmuXl0xdRez2mfMk/sToqNhKgaWb0o3digLEIB2Fkxom8qDFsjw+ADY4?= =?us-ascii?Q?vGIdfNlWAy1758efgyqRXuHhj+VtEKpTg+DRPrcZbsPQDWusF+uYNDoFqPFo?= =?us-ascii?Q?/H/fQ+GwXRh9VJITBS3QNG+pn3noWF/2CiYp1yq/zvuE9ZGZxdUS0SirwLjh?= =?us-ascii?Q?SDyv3SR0UsAJJHMt5eEbZ4GiWq6JuHbvpNDVIzo2Emwr+TSO0ifnDR7xSMw7?= =?us-ascii?Q?imXirjKZ/SwfUfgFfvnZwG/6e84et5bhFCQkFof7r08LWOQxMuAKgeydXqGR?= =?us-ascii?Q?ZzUlFLdqXaNyskhj2DLcqMgxWNDRTTkoKYVKZXg627fyx3aC8mGPWku5qKj9?= =?us-ascii?Q?emrnUDwx8f0L3L5nYzEYkPz9VN4bifBi61YbjEd2ST01ekuq0I3KNPCVFQzw?= =?us-ascii?Q?i9ivqi983Mcj6ZkGhDBreWGOJNt2e80fGqF+?= 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)(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:+nXYT0HSJEQ5834XZDle4fDdlo1Efy0VNOHebwL?= =?us-ascii?Q?/qM7jVuy41wzFTC2jYV4VdNp4iPl0dPSoLMzK5ETBN3rg7h3fozrzVMbJ0mt?= =?us-ascii?Q?LADxNa5SoCKJlc2hc/z/t8Px2F9OKAIZZtfKjRukUhkwXFeXL7WbIxRl8bHF?= =?us-ascii?Q?Wglgu7qzk0jO+RJ9dGSLqXr2YI7ebonPcBmuhsluc9MIG2m4INuA5ebuuGN3?= =?us-ascii?Q?cXXzjQefLPq6I5diE+hd0TSZsav7xPnzOvnp7szLiEdUbW6dPXKVyAY/xBqn?= =?us-ascii?Q?0Anr6C5VnAl8miyWbIed8oG7vHg10o7gnumCmmNCrWqnTGZ9ZdXicp5phyju?= =?us-ascii?Q?DB3gSjj88qhXy8vFWaiJeHrgH3KdWlY9MWFQ8Ii6iNQ4tlItg3yiv4E4Vq/j?= =?us-ascii?Q?FuHUVKcbEMYivdAbwv+GjDeIJs0ryxz1Utd+CE6Wu1tdtKPn12+gLM2NrIDv?= =?us-ascii?Q?RSlA5CG9eMVVfJixhJGYunfeSgYdqMiBXfzTpV+VNG5gomhVFCzQGodNscQF?= =?us-ascii?Q?u7FUzmtN81SrnN246FqejDOZLIfxdweHYeqWAe0XN/9FMSSKUuUoP+hF+ZGU?= =?us-ascii?Q?fXSU2bZBFasOANidmEOLsATcNDk6qJRD68oTVpPF8sSFkl/K7rV9aWgIv0J5?= =?us-ascii?Q?VnUZfHvCT6xkTj545oOtIAo187fkbr5PSAHuSeMsyUZaF7beb+Ytnal7tX0K?= =?us-ascii?Q?keIQkQXVYOJSJ8L58mUrPzfoZ29ET+INNBUwaKPG0V8vsVUWsBsP6ttsl7G3?= =?us-ascii?Q?/uNDQSPL8ExSI/UBOiU4KFm6qCUsdGqrP+oZPvCliVdUb0YLZefqpGa0yD0d?= =?us-ascii?Q?DQ/ETfZ4BclKpVFgncMsTRBhgg5RfK+GonJItsRxSerrWe+ntoduMW+r/Cyt?= =?us-ascii?Q?ipcLJnd7ABdzDKl20tJp65zngOyq5z1w+7LaIemvAn8jU3AI66MXMfskYMlK?= =?us-ascii?Q?8mjFW35PftOe7rN3Tnv1GRzJIHwEe767fWnMJ8rcsgZoKUTh4/jyDU2RtUMC?= =?us-ascii?Q?GXFQDvLpABMNsdqCs+39LWguAWx8m5BWClKSX142OWWsp4t6NEJe2I3lueEs?= =?us-ascii?Q?+iMzTebBeYUHXArXdotZaqhbD1EPuoz98cR18ue1Pk4rJ87MHPF0LBHmVhhZ?= =?us-ascii?Q?V38DnQpc1tvl0Py9OVovPFU6N3FW34qju?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2556; 6:LX565c8Xtxg5rYeWaPUFPJpofGlU0LgNj1cWxoWB?= =?us-ascii?Q?4nEPH+Cp6WYtwfwTxpjSxdAYHJ0sTUga6DStAydKpisURXmbbG00jAA4sHn2?= =?us-ascii?Q?1a6lqLkHvr0q30i9JnQSuxmOwg/Urv/Jm0iRofK2XOg+YhOqqwlGwFnqTOXr?= =?us-ascii?Q?DSOQXx9wGCHRXOZhnwFninpfEdygPafmVfHDM1wzVAyFfhux+hhDYaIv+Wnf?= =?us-ascii?Q?xeYYvoM8hTPkKz0Rh/iTeL8O7j3mSLkUCy8rl3iiJAH9j22v4saFv2ueXPlQ?= =?us-ascii?Q?ddYgKRKu/7lfb/vrSpZYoizE/vb/+7xxs8Z8//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Q5z4pfu34u7Kbl7PqZIcA9oXrng8EVMxfmKtfXlqyg8oHKKfNBmp8kRZIIHmG32ENxc/3K6lDJziXg0GO4oBXpWGfUj1z84A4GiNIFCmj4dHdHDPQpbI8gfoRW9/gx/rmfv25v2XQh+XZEEFJUfW0UKvSENpVVhvk2lvlc1bMzJXn6aaELy2AhEU6ZZ0maxZCq4A+ucNEGBxrWaCymuYalsShq7CuLMOZJoXVegJuOWi86qOlkQaFenY4FZEKVeWADpXrrhipg= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 19:25:11.9489 (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 .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. It is a bit strange that the fb helper .load_lut was not hooked up, so this change may well make the driver work for the C8 mode from the fbdev interface. But that is untested. Signed-off-by: Peter Rosin --- drivers/gpu/drm/gma500/framebuffer.c | 22 -------------------- drivers/gpu/drm/gma500/gma_display.c | 32 ++++++++++-------------------- drivers/gpu/drm/gma500/psb_intel_display.c | 7 +------ drivers/gpu/drm/gma500/psb_intel_drv.h | 1 - 4 files changed, 12 insertions(+), 50 deletions(-) diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index 7da70b6..2570c7f 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c @@ -479,26 +479,6 @@ static struct drm_framebuffer *psb_user_framebuffer_create return psb_framebuffer_create(dev, cmd, r); } -static void psbfb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, - u16 blue, int regno) -{ - struct gma_crtc *gma_crtc = to_gma_crtc(crtc); - - gma_crtc->lut_r[regno] = red >> 8; - gma_crtc->lut_g[regno] = green >> 8; - gma_crtc->lut_b[regno] = blue >> 8; -} - -static void psbfb_gamma_get(struct drm_crtc *crtc, u16 *red, - u16 *green, u16 *blue, int regno) -{ - struct gma_crtc *gma_crtc = to_gma_crtc(crtc); - - *red = gma_crtc->lut_r[regno] << 8; - *green = gma_crtc->lut_g[regno] << 8; - *blue = gma_crtc->lut_b[regno] << 8; -} - static int psbfb_probe(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) { @@ -525,8 +505,6 @@ static int psbfb_probe(struct drm_fb_helper *helper, } static const struct drm_fb_helper_funcs psb_fb_helper_funcs = { - .gamma_set = psbfb_gamma_set, - .gamma_get = psbfb_gamma_get, .fb_probe = psbfb_probe, }; diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c index e7fd356..f3c48a2 100644 --- a/drivers/gpu/drm/gma500/gma_display.c +++ b/drivers/gpu/drm/gma500/gma_display.c @@ -144,33 +144,32 @@ void gma_crtc_load_lut(struct drm_crtc *crtc) struct gma_crtc *gma_crtc = to_gma_crtc(crtc); const struct psb_offset *map = &dev_priv->regmap[gma_crtc->pipe]; int palreg = map->palette; + u16 *r, *g, *b; int i; /* The clocks have to be on to load the palette. */ if (!crtc->enabled) return; + r = crtc->gamma_store; + g = r + crtc->gamma_size; + b = g + crtc->gamma_size; + if (gma_power_begin(dev, false)) { for (i = 0; i < 256; i++) { REG_WRITE(palreg + 4 * i, - ((gma_crtc->lut_r[i] + - gma_crtc->lut_adj[i]) << 16) | - ((gma_crtc->lut_g[i] + - gma_crtc->lut_adj[i]) << 8) | - (gma_crtc->lut_b[i] + - gma_crtc->lut_adj[i])); + (((*r++ >> 8) + gma_crtc->lut_adj[i]) << 16) | + (((*g++ >> 8) + gma_crtc->lut_adj[i]) << 8) | + ((*b++ >> 8) + gma_crtc->lut_adj[i])); } gma_power_end(dev); } else { for (i = 0; i < 256; i++) { /* FIXME: Why pipe[0] and not pipe[..._crtc->pipe]? */ dev_priv->regs.pipe[0].palette[i] = - ((gma_crtc->lut_r[i] + - gma_crtc->lut_adj[i]) << 16) | - ((gma_crtc->lut_g[i] + - gma_crtc->lut_adj[i]) << 8) | - (gma_crtc->lut_b[i] + - gma_crtc->lut_adj[i]); + (((*r++ >> 8) + gma_crtc->lut_adj[i]) << 16) | + (((*g++ >> 8) + gma_crtc->lut_adj[i]) << 8) | + ((*b++ >> 8) + gma_crtc->lut_adj[i]); } } @@ -180,15 +179,6 @@ int gma_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, u32 size, struct drm_modeset_acquire_ctx *ctx) { - struct gma_crtc *gma_crtc = to_gma_crtc(crtc); - int i; - - for (i = 0; i < size; i++) { - gma_crtc->lut_r[i] = red[i] >> 8; - gma_crtc->lut_g[i] = green[i] >> 8; - gma_crtc->lut_b[i] = blue[i] >> 8; - } - gma_crtc_load_lut(crtc); return 0; diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c index 7b6c849..8762efa 100644 --- a/drivers/gpu/drm/gma500/psb_intel_display.c +++ b/drivers/gpu/drm/gma500/psb_intel_display.c @@ -518,13 +518,8 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe, gma_crtc->pipe = pipe; gma_crtc->plane = pipe; - for (i = 0; i < 256; i++) { - gma_crtc->lut_r[i] = i; - gma_crtc->lut_g[i] = i; - gma_crtc->lut_b[i] = i; - + for (i = 0; i < 256; i++) gma_crtc->lut_adj[i] = 0; - } gma_crtc->mode_dev = mode_dev; gma_crtc->cursor_addr = 0; diff --git a/drivers/gpu/drm/gma500/psb_intel_drv.h b/drivers/gpu/drm/gma500/psb_intel_drv.h index 6a10215..e8e4ea1 100644 --- a/drivers/gpu/drm/gma500/psb_intel_drv.h +++ b/drivers/gpu/drm/gma500/psb_intel_drv.h @@ -172,7 +172,6 @@ struct gma_crtc { int plane; uint32_t cursor_addr; struct gtt_range *cursor_gt; - u8 lut_r[256], lut_g[256], lut_b[256]; u8 lut_adj[256]; struct psb_intel_framebuffer *fbdev_fb; /* a mode_set for fbdev users on this crtc */