From patchwork Tue Jul 4 10:37:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 9825751 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 39B3D60353 for ; Wed, 5 Jul 2017 01:18:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F2A922AFC for ; Wed, 5 Jul 2017 01:18:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02EC02623C; Wed, 5 Jul 2017 01:18:41 +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 15C0822AFC for ; Wed, 5 Jul 2017 01:18:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A46789F9F; Wed, 5 Jul 2017 01:17:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10128.outbound.protection.outlook.com [40.107.1.128]) by gabe.freedesktop.org (Postfix) with ESMTPS id 74D9D899E9 for ; Tue, 4 Jul 2017 13:09:27 +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=Ch11YkYRD8XsmdP3XyYCiUgPvxF8OweWEV0sVZYdlrc=; b=DW8bW35OA0Ct6tvp2bWNOgWnr74CDS81HRNQOvx7piuNBLa5dmvaVj2rQrjpklPTyDmIqzbtQD4wTteOMKqdGIlLcg0n3UXtY4acn0ZsGZh8mctVg4KAn6KxITO0r+ZMSSpQ1enGj+A8iCbQcfXgQeBjAmiH5BnZFf0wBhrw8iA= 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 HE1PR0202MB2555.eurprd02.prod.outlook.com (2603:10a6:3:90::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Tue, 4 Jul 2017 10:36:18 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH v3 04/16] drm/color-mgmt: move atomic state/commit out from .gamma_set Date: Tue, 4 Jul 2017 12:37:00 +0200 Message-Id: <1499164632-5582-5-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1499164632-5582-1-git-send-email-peda@axentia.se> References: <1499164632-5582-1-git-send-email-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [81.224.171.159] X-ClientProxiedBy: AM5PR0201CA0002.eurprd02.prod.outlook.com (2603:10a6:203:3d::12) To HE1PR0202MB2555.eurprd02.prod.outlook.com (2603:10a6:3:90::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6f834acc-da93-4532-e440-08d4c2c882f2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1PR0202MB2555; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0202MB2555; 3:dIr3A1uzhCE9qLBdbPoqsNmmzyfHTYM6Br74Jmvnf5Vh6fPlDT6sdS3BekObLbq/3Ich8mzXUPM5bLKo32lDgwGKLO4FKBawG1CS9W1JRRqLv4SJ5Lw8rsAPAAFvK5c5+krYGDJZE6BuXPSdc82B23GRXpVdQaykMAnTVCdJZNBgjsBAq+CGY6N006B6TBhOMXB2rQg9wUktzPE12fXyiiK6U+UR9sg35KgCi4OD2SbChwQbY/2zhzMFuWoRJh0a3H9hnf7ZUh+0l/6l11xt9uYAa3HtCl034yRod/Y2XqK7p/MbLiTvhErPyK7zzXuzsTy0DpgdpFKJb6w80sR4MHMQZBZ89ksi4BH/CGvI+tdh0LagidYw7RqpHMd+aujo6GAUS5xWqAEwED3LcDnPWtSIa7iGimMZHXIRtAahRx7md+SDIn9lJmT05e4uIbbgnlNupT4jIzwwv74E/bO1xKnxXA0SAJuOyirNj2AgCGtLd7IXAuoc+Ehkhim0NzrbOcCyQYq3VIZM1Y2OwkloTDb7pwbHuvC64m/uLkGpmtasoYo653+YkFgwVyQCQDPSX6eG10J+13UFe3Yp1zHwQuuQjGw9xIo+xlingD1Qnm0iEdYzidlsKD0AVicypRDL7ziFy0PeUP4ExLwXxlL0MCtIstwoLxRNIjOI5y1i6okr5ewJg+7MKfa4IoK42KV3NeSupL6/QslUR0CZCOWjkw== X-MS-TrafficTypeDiagnostic: HE1PR0202MB2555: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0202MB2555; 25:xoE0hWU36HjPTvAiQsE0sMiExGN992tE71V0UM8Ow35WdZAAW3GA/SL1jFURagbeFiUhO1k8mtr1dKWackTmv+orZPjngfI2TxmlC/69jIsDaaXUBUBKyChNxojcVo/RmOpxKdyBUNZ+A/2IPmleH7bN+WaGt9iXHqU8m/oE/XRA36CugDHuQaA8bpcgp00c8D2ouBUWEinD/1Lq5VlbiogZR1tMFUVw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DPb1nAxhZ+NzJcOs4F4aFtDpteZGpsJGey/cKeRcctl4ZSA8g+0IrP3V7nu8szv+tAuNL7ziqYRx1i+URIi1f+fdslzGFEV0mnHGJhTxBbbXzQEm1eQoaXv7X4ouIdzwAcJvQdawt0oDqRq57THBOIXcemXauWigQmb8hs6rxhyGSvuNMDxb9TMviZEgZqriIFyBmbHjjxVQj1jzXmamO6wWVaUbPB9p8X7l5o+eZjDqmpo/GZjYpL25/P82xf4Z1LgjTnWqwb94WtbBrm4njRrsRsDGkZXFLnaxx3eCeJIsXAJKDlvcLFIOGaRZzJdgF/qM8U9t+vRR+a/TAGz3hceZ/NHAfj/5tUg0uaZOJ79jcSBLE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(247924648384137); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(100000703101)(100105400095)(6041248)(2016111802025)(20161123558100)(20161123562025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6043046)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0202MB2555; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0202MB2555; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2555; 4:bETM23G+c7PjeN2QoQTNxrzsv/oBd/eKVHO/ZPAP?= =?us-ascii?Q?Ezozo1NOoVNoepUGrqupKLM679gI6N9KosdjfeD4QEGZeSgInZc37Qwgj9yN?= =?us-ascii?Q?HQpNVpho4fBUYn74ZJUAUJmLT9zndHnL6dLBAn+jM9Hhl7k4gy1xfxcz8qI2?= =?us-ascii?Q?IIDG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niANamya?= =?us-ascii?Q?eGA3iK3rIHJI84JWPH/JVV9vMkavlrNffGSNDK/9I054kd35ucp7wBcz5Nf4?= =?us-ascii?Q?ApP3f4Iz2/hePwaR8Tuzb/wsL4M/zGLb8CngNrL7K0Ki73bcm4pWuFCYvVVU?= =?us-ascii?Q?QKk1L7NjXCAwQA+ov0jMRTOP5/vzoeVZPOSacPmROgh9t5U6iWZSeBmylnLD?= =?us-ascii?Q?M7mDM0nkAMKQjpfy6WoSsmCJE4JLXN/H2L6CY/7Umy7qzIzliClIk7TbeS55?= =?us-ascii?Q?fbt3BLmzwTIPx7eAuZeP1Hs=3D?= X-Forefront-PRVS: 0358535363 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39830400002)(39400400002)(39410400002)(39450400003)(8676002)(81166006)(7736002)(47776003)(189998001)(3846002)(36756003)(305945005)(50466002)(6116002)(5890100001)(50226002)(53936002)(86362001)(575784001)(33646002)(66066001)(2906002)(478600001)(42186005)(2361001)(74482002)(2351001)(38730400002)(110136004)(4326008)(25786009)(6506006)(8666007)(6512007)(54906002)(5003940100001)(7416002)(6486002)(6916009)(5660300001)(6666003)(2950100002)(50986999)(76176999)(142923001)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0202MB2555; H:orc.lan; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0202MB2555; 23:47sCV9qiZAgMlhjAFa56uJ4bAjpiTarDbIteN3I?= =?us-ascii?Q?OUiZag4UgxLWkKXb0ybH15UCaQiHXWGxJ8YOP0QXHcWAxXrmiBwSK9fOHdl7?= =?us-ascii?Q?jZRNnUoiJIWQAQDuYwABynXAJqjox02nRb26M0TYRiGaTXemoJCKCvRNJAFV?= =?us-ascii?Q?pY9jFH4axbeYxy97ge/1sCNaIX6Au0MB+WZ3DiJcRKanGycVRO97GJicL3sz?= =?us-ascii?Q?qGWMgLhij49KEPXLfOmUSC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daFJcVY1ABhlLY6PyBd?= =?us-ascii?Q?6r4JhI9DjtA8uNVVW7EFpN7+1NndXFLgaKe0rYDGv5O+bcjT3Ppsk++3buB5?= =?us-ascii?Q?AW3b2nek/9rGLGtS2/WwZ/qfaNkpB5bnh78jYwDXswkLYHOcBifffJu6W+nB?= =?us-ascii?Q?r9uI+ytaBWEKVIydmVqtuOFT9XXBuiMz9tSCMTyU0ytQKH/eGl/7srL7xvfL?= =?us-ascii?Q?CQoVWjFanRSDq8aENxTue/saViTNVnQBJ28Nl7q7eeIxAmF89f9maM4egcxv?= =?us-ascii?Q?ivA=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0202MB2555; 5:ufkTw1nfa3KKt6Goe9JUyYURHIj13ixl+edtexr1H1Cbzb2jbm/5K97kzOnuAmYVRWLnqfH8v2QKXQ5fcFCjjHZ7ax6eZohv6bNBcdvKflRkpRHqfD6r3T9rFIyT6Lna692VGCDbcgo5/vzaiR4bALH6K6G1G6wGcoxZ8Tr2BOPWP3HV9BCPy8lYgK3sExPwFoqdLE0iXyCo4ikbPqy5IR+hjOKrSEliyFqiLk1kO5sDeSPkbeMCT+neEQBnu2ODZrtsUAFWgoXudEIdyFFz9lsaljHG3MiU4mMBtiatrfc5uFs/85fh+6Rz3ZODvdpMOpwWgkzdStwL2CfJNhMF68RZfj8wAbk0geyp/DztUthpVKoGDivFdHjl5Ei5gsOdB5E48F0c9dp8D0nQkGgeQKfVvxn3apkPU9gdSF1udEtLxkKto22e2BMTcesSDXFvcGIMh51YhCk3I9yaeMFllQ+wvQZ94Igh8BlyZJZL2DdRkoVny6oLS3l4N3gOoNhB; 24:vwrsfHrk29LpBpmV0k1yEH2Bex3a5pA35Lycn3HPLZuAhRLcXFfE490ubTo/6HZiKQtHE0B7jXSEmHcBjIOzFjHkXCtSuoL5dKLFVj7jgA8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0202MB2555; 7:eMA/FpG+bd4HxzqelBOTKvIc3CHKO2JlqCUVbfve5QXPg1alj+UlPt8ePb92WHxuC+hBXTyP5jhRmHh6bePo3tpAZDg9uQv8bxJ6xW5hOL2PVstm/ug81O585MTvj+EHaih0hX1pEjCa4m9cSTxjSMzfe8iDcenb2lvhRvTDnh2YZCUv9BxRLkT6wNjgedp+G/rAZhP6TNi3q4YgHy3vkbbh71TZJHok58xw+q+TFDNfEze44A4kDJ6SHCQQ/jLZRySYuPtBtaRj2ujgI8YpDm8l0X3WKr8P64cUPvatRMPMcnZh8ssfQ0CALJOHqxb9oUG2PKEMcdcGNTR7uL53L7GU9SNO7NHoHWjULFxM6dhetU4ht8YAPXMWptv0kqOh8offf5wyM2TnlPWQRMCBsfwdFEsyu3SrcbWlDseX6LTo680UWblhuxRB0EwfsOuKONTbCYfd0XcJ8GT9mDdCDXQoLUtaRcdATQ64hlDcU4x1e45Il6GGKtyP65Kzaw9icgSxQaOY/281HefVF7jDNEeEVlOE3Gi6eNHsbh62srIK2MXtTlFeHnXG2+pcCuITx4HWtlLzBb9w9IH0+7NvxXcsq4CIcYjPYjr8YyuzjOj4dGgcZfoy3UxHpanC5vi7D30VT79Qqo0YznfTxSQgqRbvLExuXg8ItWbwtd+IuR9d57ZqQqMZlVCsYySpMvXA3lyHg3RPUjdR2gOmuS7BW278es3AskpCde0wz6KUEF9+ra8fVLRmn2kqWORcBd+5T7AW2zoFR4uKJiV22XAiDLKWM8nlzM5aVluCrV4RhIg= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2017 10:36:18.8692 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0202MB2555 X-Mailman-Approved-At: Wed, 05 Jul 2017 01:17:54 +0000 Cc: Boris Brezillon , Thomas Hellstrom , VMware Graphics , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Gerd Hoffmann , Daniel Vetter , Alex Deucher , Dave Airlie , amd-gfx@lists.freedesktop.org, virtualization@lists.linux-foundation.org, 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 Handle the atomics directly in the ioctl instead, in preparation for the fb_setcmap helper needing to commit the gamma map for several crtc in one commit. Signed-off-by: Peter Rosin --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 2 +- drivers/gpu/drm/ast/ast_mode.c | 2 +- drivers/gpu/drm/cirrus/cirrus_mode.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 37 +++++++------------------------- drivers/gpu/drm/drm_color_mgmt.c | 27 ++++++++++++++++++++++- drivers/gpu/drm/gma500/gma_display.c | 2 +- drivers/gpu/drm/gma500/gma_display.h | 2 +- drivers/gpu/drm/mgag200/mgag200_mode.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 2 +- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- drivers/gpu/drm/radeon/radeon_display.c | 2 +- drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 +- include/drm/drm_atomic_helper.h | 2 +- include/drm/drm_crtc.h | 3 +-- 20 files changed, 52 insertions(+), 49 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c index 9f78c03..31c977b 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c @@ -2622,7 +2622,7 @@ static void dce_v10_0_cursor_reset(struct drm_crtc *crtc) static int dce_v10_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); int i; diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index 4bcf01d..cf42640 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c @@ -2642,7 +2642,7 @@ static void dce_v11_0_cursor_reset(struct drm_crtc *crtc) static int dce_v11_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); int i; diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c index fd134a4..045014d 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c @@ -2494,7 +2494,7 @@ static void dce_v6_0_cursor_reset(struct drm_crtc *crtc) static int dce_v6_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); int i; diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c index a9e8695..ee9389f 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c @@ -2473,7 +2473,7 @@ static void dce_v8_0_cursor_reset(struct drm_crtc *crtc) static int dce_v8_0_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); int i; diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 90bb083..f194dfc 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c @@ -166,7 +166,7 @@ static void dce_virtual_bandwidth_update(struct amdgpu_device *adev) static int dce_virtual_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); int i; diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index aaef0a6..6f0335b 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -646,7 +646,7 @@ static void ast_crtc_reset(struct drm_crtc *crtc) 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 drm_crtc_state *state) { struct ast_crtc *ast_crtc = to_ast_crtc(crtc); int i; diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index 53f6f0f..2b4c2c3 100644 --- a/drivers/gpu/drm/cirrus/cirrus_mode.c +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c @@ -328,7 +328,7 @@ static void cirrus_crtc_commit(struct drm_crtc *crtc) */ 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 drm_crtc_state *state) { struct cirrus_crtc *cirrus_crtc = to_cirrus_crtc(crtc); int i; diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 86d3093..3045f51 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -3599,7 +3599,7 @@ EXPORT_SYMBOL(drm_atomic_helper_connector_destroy_state); * @green: green correction table * @blue: green correction table * @size: size of the tables - * @ctx: lock acquire context + * @state: atomic CRTC state object to manipulate * * Implements support for legacy gamma correction table for drivers * that support color management through the DEGAMMA_LUT/GAMMA_LUT @@ -3609,28 +3609,19 @@ EXPORT_SYMBOL(drm_atomic_helper_connector_destroy_state); int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct drm_device *dev = crtc->dev; struct drm_mode_config *config = &dev->mode_config; - struct drm_atomic_state *state; - struct drm_crtc_state *crtc_state; - struct drm_property_blob *blob = NULL; + struct drm_property_blob *blob; struct drm_color_lut *blob_data; int i, ret = 0; - state = drm_atomic_state_alloc(crtc->dev); - if (!state) - return -ENOMEM; - blob = drm_property_create_blob(dev, sizeof(struct drm_color_lut) * size, NULL); - if (IS_ERR(blob)) { - ret = PTR_ERR(blob); - blob = NULL; - goto fail; - } + if (IS_ERR(blob)) + return PTR_ERR(blob); /* Prepare GAMMA_LUT with the legacy values. */ blob_data = (struct drm_color_lut *) blob->data; @@ -3640,33 +3631,21 @@ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc, blob_data[i].blue = blue[i]; } - state->acquire_ctx = ctx; - crtc_state = drm_atomic_get_crtc_state(state, crtc); - if (IS_ERR(crtc_state)) { - ret = PTR_ERR(crtc_state); - goto fail; - } - /* Reset DEGAMMA_LUT and CTM properties. */ - ret = drm_atomic_crtc_set_property(crtc, crtc_state, + ret = drm_atomic_crtc_set_property(crtc, state, config->degamma_lut_property, 0); if (ret) goto fail; - ret = drm_atomic_crtc_set_property(crtc, crtc_state, + ret = drm_atomic_crtc_set_property(crtc, state, config->ctm_property, 0); if (ret) goto fail; - ret = drm_atomic_crtc_set_property(crtc, crtc_state, + ret = drm_atomic_crtc_set_property(crtc, state, config->gamma_lut_property, blob->base.id); - if (ret) - goto fail; - - ret = drm_atomic_commit(state); fail: - drm_atomic_state_put(state); drm_property_blob_put(blob); return ret; } diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c index 3eda500..864efe8 100644 --- a/drivers/gpu/drm/drm_color_mgmt.c +++ b/drivers/gpu/drm/drm_color_mgmt.c @@ -21,6 +21,7 @@ */ #include +#include #include #include @@ -218,9 +219,12 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_mode_crtc_lut *crtc_lut = data; + struct drm_crtc_state *crtc_state = NULL; + struct drm_atomic_state *state = NULL; struct drm_crtc *crtc; void *r_base, *g_base, *b_base; int size; + int atomic; struct drm_modeset_acquire_ctx ctx; int ret = 0; @@ -238,12 +242,28 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev, if (crtc_lut->gamma_size != crtc->gamma_size) return -EINVAL; + atomic = drm_drv_uses_atomic_modeset(dev); + if (atomic) { + state = drm_atomic_state_alloc(dev); + if (!state) + return -ENOMEM; + } drm_modeset_acquire_init(&ctx, 0); retry: ret = drm_modeset_lock_all_ctx(dev, &ctx); if (ret) goto out; + if (atomic) { + state->acquire_ctx = &ctx; + + crtc_state = drm_atomic_get_crtc_state(state, crtc); + if (IS_ERR(crtc_state)) { + ret = PTR_ERR(crtc_state); + goto out; + } + } + size = crtc_lut->gamma_size * (sizeof(uint16_t)); r_base = crtc->gamma_store; if (copy_from_user(r_base, (void __user *)(unsigned long)crtc_lut->red, size)) { @@ -264,7 +284,10 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev, } ret = crtc->funcs->gamma_set(crtc, r_base, g_base, b_base, - crtc->gamma_size, &ctx); + crtc->gamma_size, crtc_state); + + if (!ret && atomic) + ret = drm_atomic_commit(state); out: if (ret == -EDEADLK) { @@ -273,6 +296,8 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev, } drm_modeset_drop_locks(&ctx); drm_modeset_acquire_fini(&ctx); + if (atomic) + drm_atomic_state_put(state); return ret; diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c index e7fd356..ccf8c33 100644 --- a/drivers/gpu/drm/gma500/gma_display.c +++ b/drivers/gpu/drm/gma500/gma_display.c @@ -178,7 +178,7 @@ void gma_crtc_load_lut(struct drm_crtc *crtc) int gma_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, u32 size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct gma_crtc *gma_crtc = to_gma_crtc(crtc); int i; diff --git a/drivers/gpu/drm/gma500/gma_display.h b/drivers/gpu/drm/gma500/gma_display.h index 239c374..c07b34f 100644 --- a/drivers/gpu/drm/gma500/gma_display.h +++ b/drivers/gpu/drm/gma500/gma_display.h @@ -74,7 +74,7 @@ extern int gma_crtc_cursor_move(struct drm_crtc *crtc, int x, int y); extern void gma_crtc_load_lut(struct drm_crtc *crtc); extern int gma_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, u32 size, - struct drm_modeset_acquire_ctx *ctx); + struct drm_crtc_state *state); extern void gma_crtc_dpms(struct drm_crtc *crtc, int mode); extern void gma_crtc_prepare(struct drm_crtc *crtc); extern void gma_crtc_commit(struct drm_crtc *crtc); diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index f4b5358..2141796 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -1397,7 +1397,7 @@ static void mga_crtc_commit(struct drm_crtc *crtc) */ 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 drm_crtc_state *state) { struct mga_crtc *mga_crtc = to_mga_crtc(crtc); int i; diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index 4b4b0b4..f562824 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -789,7 +789,7 @@ nv_crtc_disable(struct drm_crtc *crtc) static int nv_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); int i; diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index e3132a2..f13fa74 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -2232,7 +2232,7 @@ nv50_head_help = { static int nv50_head_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); u32 i; diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 17d3daf..0ea575d 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -233,7 +233,7 @@ void radeon_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, static int radeon_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); int i; diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index 403bbd5..fcc8dac 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -301,7 +301,7 @@ vc4_crtc_lut_load(struct drm_crtc *crtc) static int vc4_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); u32 i; diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 3d94ea6..d75c5da 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -1914,7 +1914,7 @@ static int vmw_du_update_layout(struct vmw_private *dev_priv, unsigned num, int vmw_du_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, uint32_t size, - struct drm_modeset_acquire_ctx *ctx) + struct drm_crtc_state *state) { struct vmw_private *dev_priv = vmw_priv(crtc->dev); int i; diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h index 5f8d678..9b2d8d3 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h @@ -255,7 +255,7 @@ void vmw_du_crtc_restore(struct drm_crtc *crtc); int vmw_du_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, uint32_t size, - struct drm_modeset_acquire_ctx *ctx); + struct drm_crtc_state *state); int vmw_du_connector_set_property(struct drm_connector *connector, struct drm_property *property, uint64_t val); diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h index f0a8678..a91e063 100644 --- a/include/drm/drm_atomic_helper.h +++ b/include/drm/drm_atomic_helper.h @@ -177,7 +177,7 @@ void drm_atomic_helper_connector_destroy_state(struct drm_connector *connector, int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t size, - struct drm_modeset_acquire_ctx *ctx); + struct drm_crtc_state *state); /** * drm_atomic_crtc_for_each_plane - iterate over planes currently attached to CRTC diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 629a5fe..d442d30 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -368,8 +368,7 @@ struct drm_crtc_funcs { * hooks. */ int (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, - uint32_t size, - struct drm_modeset_acquire_ctx *ctx); + uint32_t size, struct drm_crtc_state *state); /** * @destroy: