From patchwork Tue Jun 20 19:25:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9800497 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 7416F60329 for ; Wed, 21 Jun 2017 00:59:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D0C8200F5 for ; Wed, 21 Jun 2017 00:59:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6139026222; Wed, 21 Jun 2017 00:59:21 +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 BD323200F5 for ; Wed, 21 Jun 2017 00:59:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 970126E001; Wed, 21 Jun 2017 00:58:54 +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-db5eur01on0105.outbound.protection.outlook.com [104.47.2.105]) by gabe.freedesktop.org (Postfix) with ESMTPS id A2FD16E370; Tue, 20 Jun 2017 22:57:43 +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=dz3VfrZq15uDweab3ud4AmR4mt6Bb1f98tJzUUXwQeE=; b=jEunK0MigUHzNC9PKT5mvviJMAETw7q035v63Iao86AMr/+Eup3kvrvAdkwkqg45lNrw3Fx1cbrA2BE1+ZDnRQq5atKfMjg6PO02uI6xRyueVhlFzDkZ3wxFrcalY7jWtns5eX1qaroVgMYqBJci/dV+M9z8hJ9A1u8vLye15z0= 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:19 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH 07/11] drm: mgag200: remove dead code and pointless local lut storage Date: Tue, 20 Jun 2017 21:25:31 +0200 Message-Id: <1497986735-14418-8-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: 49eab684-be50-4571-4304-08d4b8121868 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075); SRVR:HE1PR0202MB2556; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0202MB2556; 3:uN7Bn0pwLVrQeaUlhDg8y5WAdSEnz1dBXVKppovVjYnARP7nak8+wm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am-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:BzDS9biZuCPnfUASYiFuMF4SmGnAlpaU5zQ+DhdR?= =?us-ascii?Q?C4f5gH6wqYM05NH66lmADX9vecVmPpbJ59MiNApM02Ug1T+Li+d1FfvtS6LL?= =?us-ascii?Q?wcZ2BPV7Hv17ynKb0Lp+Seq4cxpfas9TAMfbl56K+Yqv6T8CsCjhHRvc8tsS?= =?us-ascii?Q?ZglPnhy0LWt68oEb2UNc+OIu2ENceZWY/YfPXEIz0Q2ixj1WjiCNI12V5tbs?= =?us-ascii?Q?f/yRAVAGXBwwVwNhnEZnNLd1VCYlVrXnrD2acrMIRN4HcWEYZ6EXaDZiChFC?= =?us-ascii?Q?qglk3ODj57Gp2KZeafxRVWU7/Q6kli4CeQiYBh6+8ug5c4RJNqQJqC2BUKQK?= =?us-ascii?Q?i8twhGOlY8yapmQRXKV0q8B+X60mO92Mh1ReYPz0phCreoNFEBi39dryG1Hr?= =?us-ascii?Q?pAbeZwL5pv+3fI3j74QGoMz0kVqkugsdgxe/r+Ehl+2Jnl5EpjSgMUbMrZzm?= =?us-ascii?Q?czmOtkBgdXltBw4W1GyNOQt6oBVZIt3NJyBS6Tfm6hFYuq7tnxU6gHBfTXWX?= =?us-ascii?Q?pL/az7O4+FmbmjH8GlDv3MCcUuY0UJmRIORG8MWCcvq87Yoi3LlhkhoyqMU8?= =?us-ascii?Q?zkJDCe+0pTeo84ynkEFxZt3l/WP/Xi5BZT/nV0l7OlN4N229obHtmtkpj7kG?= =?us-ascii?Q?TYII35h17D36M/HtmBnnvOSmXZzGL5iZEyhopjcce350BzN4S2X7Lx51Q4vx?= =?us-ascii?Q?fVyVw+KzttsoCe1X/tbmJ2HSiHm11mtRO/Kh6h9opA9a9LJsKmXvlmYj91lO?= =?us-ascii?Q?zvGYR8iq3dhlpqtXqjUnvirHXEfEu+7cRVsKGBYPzauN+UPxn7rPXvlCTI3R?= =?us-ascii?Q?KKiutDja2ITysO2Kwxlaz2jAK9Xzz8e2EnKSXdK3q4ACBw0ykWFwR6S50buv?= =?us-ascii?Q?2lAdLBZ0JSaGjcPE7h44FISTuwFJC9EYVZosNwTi4suRjEtj+ZsOFa4u2Bqc?= =?us-ascii?Q?VZSndD0uSwIe9OQU2ijE9ErANnyuJ5KiAzpfOVNQUfPF0cAiYFDM/rRQPezG?= =?us-ascii?Q?mxdXghCz0ykLho2k1e9KPtcuSBhnOVubQrniVPeqH1iXCj/htoJKIQ08qiEd?= =?us-ascii?Q?hGQwnHQhkodB7W8blZ0Xo5C4nw9Z8spewgkNzosCmCc7zJBGcSt6DE88/oAm?= =?us-ascii?Q?WlXZ6X24VzI0SWgZZQLo7UMDZpR4Y/IplVRCbTkd4OK5cp5zdGzWZ+OEZRTI?= =?us-ascii?Q?NzVq6BmNVrxtVbI=3D?= X-Forefront-PRVS: 03449D5DD1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(979002)(6009001)(39410400002)(39400400002)(39450400003)(39840400002)(478600001)(6506006)(8666007)(53936002)(2906002)(8676002)(7736002)(38730400002)(110136004)(6916009)(2950100002)(6666003)(5003940100001)(74482002)(21086003)(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)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0202MB2556; H:orc.lan; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2556; 23:aEdiGSDjFJXGcHiDj13Y6isIvUTm3OsWuSj+k4Y?= =?us-ascii?Q?4UQ0zkNOCVF+nUR4fxXQOq/xMx03fPJKMqIUQvnkc+FT8F/upJEIBLlFti9e?= =?us-ascii?Q?w5mC/Y621QC3d/EOGR1jVsM+9nZ/Ohe3/ZuEaw7At2PHL5SxSJcizvIERmaj?= =?us-ascii?Q?rHTmy5LazD6XbGVwFcijsgj3y3sdsb2LRk037RP753zwIyWQB1I+Ox3l6fGg?= =?us-ascii?Q?5GLiCsB8Zm8huIwptx57vDFvwAYJRdEHT+0h67497lfyw2WMh9cu1HNkixp3?= =?us-ascii?Q?CyLDIbixjTxVWFvULo+TYD7M8xV5+1hqBRf1GMFgjBNRl019W3FwmLg3X/5C?= =?us-ascii?Q?tbt+4PiwV5bj0wP2omqQgXGZkMfiRWVwLoxJigxDpBXN7ItAP0dUcWFhVKss?= =?us-ascii?Q?cpDXuo9YxqxkXp9rqIlAu6Rz7wJUhi3J7nNTpWWRljbmSEKeURAVdw+67Rh2?= =?us-ascii?Q?1F1KKDOj5FJ6jC4sF+VFIoB6j24pTrrCeLTcu4AzqrJBId/gnfcjcUi4rjsT?= =?us-ascii?Q?mBb0gVJXrwKM0NLlYWRRfiNcl77ie3JPbnTBxnyIuXIQHoGi6clFuo/OGpWE?= =?us-ascii?Q?CHkLfFQcw13m2wXWdHHmqVUmr8CqnTceJJFJ0RuVAozQSSjXKxQq51L+ZZwZ?= =?us-ascii?Q?EgZT6GTi4dRXfZq166S+MEjb6dosX4jWDRN1zpKh0oJLrx/PlJpI2pSgiKpr?= =?us-ascii?Q?31qw4I7SR6PwHns9GVUEP3BfQiuarMWiMOpTIRHqVuc+38rV17z6aNvOJoKV?= =?us-ascii?Q?prWHCuC9AH6RN8Ah/J2PiH4VuY8iP+Gl3ENle1M15cKiiULwFZbh8omV3lhH?= =?us-ascii?Q?pPnJcCemKjFhYKJI356Vjvt6w50ZxRt5ScMPdUEy1OIYIvEsjQmKaVv2WOu4?= =?us-ascii?Q?+nWP2GHpE7ETjHNQlch/6A/NKWYdIkfnpkNm9Uum3H4CswCa722hk1iB69D6?= =?us-ascii?Q?MSytQyqmJTbDmuAH5RW5xTEgiTCLtNhrqx3Yv+htnjNhs7CeOWXusABlL/4A?= =?us-ascii?Q?XjRwOqJnAtLUJnp4okvWecrftvNzvv1V0MZVXGd88DXkGYTj1+2fe64+T+tq?= =?us-ascii?Q?qIlrWMoyjTpRk74GOTe5ojelZnKxOVR3o0B+apBNCi661o6ncD7IYIT8gwaP?= =?us-ascii?Q?MTdxihQzcfBH0DrB6GCuLmjCAGuHAmLXmity9MkRV/dmk07lIuGsnp/fMPnf?= =?us-ascii?Q?NK0tzF/n7yGH38Lpyqk82uDGBAGpJ2W86K9SzxQtNO/AEfN/IWvhCUL+OvBr?= =?us-ascii?Q?akB8/jxu9eCb8McPLxGE=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2556; 6:Mr1/SGHkkWp7tKylCThnbn1SRjF366f4XB9Nw3ci?= =?us-ascii?Q?/uArq7DjPS5/0mXVGXVGnbzT2/gIPye1qGV+p1C+ZhCa1rlqSmotc0cVtIQb?= =?us-ascii?Q?YDaDIi3xj8F4USReVXywX/Vv9vsLEt67u/RDgubS4Mq8VdalSGxvtYYO8UdY?= =?us-ascii?Q?KnyTdaBVHPUyqpQslhfNkBm0Z1gHx9m2ZxaguFwAyw/aUV/z9btxkS70rJ5Q?= =?us-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LXQAJfjdOa1oSyHf1XhQR4ayjCQUbW75cQfYJ+JbpfLNuoTb3aIaTyKuRA29P0fx4YkgCPyJiQ/Gtikkb565wafRfG0HP3ZFvtot2zsgB9l1PjbKDsIZfG9+Vpfy//yMVW2vTn1zxXMCuNBNbfAZIP8HQsPwKLUuHha1Q5yOZ6R2Ls1nBKYx3lEmUQOMQtfSg0SMMkmsoBliA7zPa/0AJ95oFSXnsRliXP9QqrSyz9/6IOhy+kQSvso8RlWrGBvtUoXT2PjtblmYV2Vesua4cUT/MQSrhWK02H/5kppGapAXhxhoZcpfAX9mf8fvzbN8PEcXUpP2ymsh0SaRFws3SPD6aWApob4TkP3uGc8q0bXVjSd/uJqYZQXcPcoU7HNzOiFOaM9rGI36ljJ20= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 19:25:19.3084 (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/mgag200/mgag200_drv.h | 5 --- drivers/gpu/drm/mgag200/mgag200_fb.c | 2 -- drivers/gpu/drm/mgag200/mgag200_mode.c | 62 ++++++++-------------------------- 3 files changed, 15 insertions(+), 54 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu/drm/mgag200/mgag200_drv.h index c88b6ec..04f1dfb 100644 --- a/drivers/gpu/drm/mgag200/mgag200_drv.h +++ b/drivers/gpu/drm/mgag200/mgag200_drv.h @@ -237,11 +237,6 @@ mgag200_bo(struct ttm_buffer_object *bo) { return container_of(bo, struct mgag200_bo, bo); } - /* mgag200_crtc.c */ -void mga_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, - u16 blue, int regno); -void mga_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, - u16 *blue, int regno); /* mgag200_mode.c */ int mgag200_modeset_init(struct mga_device *mdev); diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 5d3b1fa..5cf980a 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -258,8 +258,6 @@ static int mga_fbdev_destroy(struct drm_device *dev, } static const struct drm_fb_helper_funcs mga_fb_helper_funcs = { - .gamma_set = mga_crtc_fb_gamma_set, - .gamma_get = mga_crtc_fb_gamma_get, .fb_probe = mgag200fb_create, }; diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index adb411a..117bec3 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -27,15 +27,19 @@ static void mga_crtc_load_lut(struct drm_crtc *crtc) { - struct mga_crtc *mga_crtc = to_mga_crtc(crtc); struct drm_device *dev = crtc->dev; struct mga_device *mdev = dev->dev_private; struct drm_framebuffer *fb = crtc->primary->fb; + u16 *r_ptr, *g_ptr, *b_ptr; int i; if (!crtc->enabled) return; + r_ptr = crtc->gamma_store; + g_ptr = r_ptr + crtc->gamma_size; + b_ptr = g_ptr + crtc->gamma_size; + WREG8(DAC_INDEX + MGA1064_INDEX, 0); if (fb && fb->format->cpp[0] * 8 == 16) { @@ -46,25 +50,27 @@ static void mga_crtc_load_lut(struct drm_crtc *crtc) if (i > (MGAG200_LUT_SIZE >> 1)) { r = b = 0; } else { - r = mga_crtc->lut_r[i << 1]; - b = mga_crtc->lut_b[i << 1]; + r = *r_ptr++ >> 8; + b = *b_ptr++ >> 8; + r_ptr++; + b_ptr++; } } else { - r = mga_crtc->lut_r[i]; - b = mga_crtc->lut_b[i]; + r = *r_ptr++ >> 8; + b = *b_ptr++ >> 8; } /* VGA registers */ WREG8(DAC_INDEX + MGA1064_COL_PAL, r); - WREG8(DAC_INDEX + MGA1064_COL_PAL, mga_crtc->lut_g[i]); + WREG8(DAC_INDEX + MGA1064_COL_PAL, *g_ptr++ >> 8); WREG8(DAC_INDEX + MGA1064_COL_PAL, b); } return; } for (i = 0; i < MGAG200_LUT_SIZE; i++) { /* VGA registers */ - WREG8(DAC_INDEX + MGA1064_COL_PAL, mga_crtc->lut_r[i]); - WREG8(DAC_INDEX + MGA1064_COL_PAL, mga_crtc->lut_g[i]); - WREG8(DAC_INDEX + MGA1064_COL_PAL, mga_crtc->lut_b[i]); + WREG8(DAC_INDEX + MGA1064_COL_PAL, *r_ptr++ >> 8); + WREG8(DAC_INDEX + MGA1064_COL_PAL, *g_ptr++ >> 8); + WREG8(DAC_INDEX + MGA1064_COL_PAL, *b_ptr++ >> 8); } } @@ -1396,14 +1402,6 @@ static int mga_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, struct drm_modeset_acquire_ctx *ctx) { - struct mga_crtc *mga_crtc = to_mga_crtc(crtc); - int i; - - for (i = 0; i < size; i++) { - mga_crtc->lut_r[i] = red[i] >> 8; - mga_crtc->lut_g[i] = green[i] >> 8; - mga_crtc->lut_b[i] = blue[i] >> 8; - } mga_crtc_load_lut(crtc); return 0; @@ -1452,14 +1450,12 @@ static const struct drm_crtc_helper_funcs mga_helper_funcs = { .mode_set_base = mga_crtc_mode_set_base, .prepare = mga_crtc_prepare, .commit = mga_crtc_commit, - .load_lut = mga_crtc_load_lut, }; /* CRTC setup */ static void mga_crtc_init(struct mga_device *mdev) { struct mga_crtc *mga_crtc; - int i; mga_crtc = kzalloc(sizeof(struct mga_crtc) + (MGAG200FB_CONN_LIMIT * sizeof(struct drm_connector *)), @@ -1473,37 +1469,9 @@ static void mga_crtc_init(struct mga_device *mdev) drm_mode_crtc_set_gamma_size(&mga_crtc->base, MGAG200_LUT_SIZE); mdev->mode_info.crtc = mga_crtc; - for (i = 0; i < MGAG200_LUT_SIZE; i++) { - mga_crtc->lut_r[i] = i; - mga_crtc->lut_g[i] = i; - mga_crtc->lut_b[i] = i; - } - drm_crtc_helper_add(&mga_crtc->base, &mga_helper_funcs); } -/** Sets the color ramps on behalf of fbcon */ -void mga_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, - u16 blue, int regno) -{ - struct mga_crtc *mga_crtc = to_mga_crtc(crtc); - - mga_crtc->lut_r[regno] = red >> 8; - mga_crtc->lut_g[regno] = green >> 8; - mga_crtc->lut_b[regno] = blue >> 8; -} - -/** Gets the color ramps on behalf of fbcon */ -void mga_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, - u16 *blue, int regno) -{ - struct mga_crtc *mga_crtc = to_mga_crtc(crtc); - - *red = (u16)mga_crtc->lut_r[regno] << 8; - *green = (u16)mga_crtc->lut_g[regno] << 8; - *blue = (u16)mga_crtc->lut_b[regno] << 8; -} - /* * The encoder comes after the CRTC in the output pipeline, but before * the connector. It's responsible for ensuring that the digital