From patchwork Tue Sep 11 16:13:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kazlauskas, Nicholas" X-Patchwork-Id: 10595859 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 61A5714E0 for ; Tue, 11 Sep 2018 16:16:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F251299B9 for ; Tue, 11 Sep 2018 16:16:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 414B9299DA; Tue, 11 Sep 2018 16:16:31 +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=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 DBDA6299B9 for ; Tue, 11 Sep 2018 16:16:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 71AE66E3AD; Tue, 11 Sep 2018 16:16:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM05-CO1-obe.outbound.protection.outlook.com (mail-co1nam05on0608.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe50::608]) by gabe.freedesktop.org (Postfix) with ESMTPS id 364836E3AD; Tue, 11 Sep 2018 16:16:28 +0000 (UTC) Received: from BN6PR1201CA0001.namprd12.prod.outlook.com (2603:10b6:405:4c::11) by BY1PR12MB0422.namprd12.prod.outlook.com (2a01:111:e400:51b2::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.17; Tue, 11 Sep 2018 16:16:24 +0000 Received: from CO1NAM03FT019.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::202) by BN6PR1201CA0001.outlook.office365.com (2603:10b6:405:4c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1122.16 via Frontend Transport; Tue, 11 Sep 2018 16:16:24 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by CO1NAM03FT019.mail.protection.outlook.com (10.152.80.176) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.1143.11 via Frontend Transport; Tue, 11 Sep 2018 16:16:23 +0000 Received: from kazbox.amd.com (10.180.168.240) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.389.1; Tue, 11 Sep 2018 11:16:23 -0500 From: Nicholas Kazlauskas To: , Subject: [PATCH 8/9] drm/amd/display: Drop FreeSync ioctl notification support Date: Tue, 11 Sep 2018 12:13:32 -0400 Message-ID: <20180911161333.5334-9-nicholas.kazlauskas@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180911161333.5334-1-nicholas.kazlauskas@amd.com> References: <20180911161333.5334-1-nicholas.kazlauskas@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(39860400002)(346002)(136003)(376002)(2980300002)(428003)(199004)(189003)(5660300001)(47776003)(7696005)(486006)(6666003)(48376002)(426003)(97736004)(50466002)(126002)(110136005)(446003)(336012)(72206003)(316002)(476003)(76176011)(11346002)(356003)(54906003)(16586007)(106466001)(104016004)(305945005)(53416004)(51416003)(105586002)(2616005)(36756003)(68736007)(26005)(478600001)(4326008)(77096007)(575784001)(86362001)(186003)(44832011)(1076002)(53936002)(50226002)(8936002)(81156014)(2906002)(14444005)(8676002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR12MB0422; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT019; 1:68vs8D5tNQ6SpbeN6R2WZaIsVydEj6fUurCq/8VLs71DIcD+iVXvSoxN4ClWpEpWHOHIQhEoh+/QM5zlEIxpncRaYmKXYJe68IQhg8tKc25u9goJ5D/Bpkm2qEo2YtDk X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f81e4b41-0358-48d9-cea5-08d61801eb38 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060); SRVR:BY1PR12MB0422; X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0422; 3:6FDxDh/Y+lbSNbzh4zrPRxatquG8cxm7R3fJHuNAAvut2cPwtxH6IS4ayFJiIxf1yMKB6WMGPfkZwZ7qvfFMaz8lQHRQEm5UXeWmUVkga6muI20Ivmq10fSY8tX7vMhzF07erlCuLotoCkSBBFpwVK9NnZagIgjVo+Ua6/pv+zsBITD1TFsJaQuIJDsGj2COMvvTNPolhhzeM1/p3YntI/5gb3+Os3WpEW/vnwE73KrFeLRcbD9AJm7S00x6UznXqP8Xrijk5GyZB408WEeFJT4TQjvcW3kfaYWoNim8hLLfUM98bUd61M7otFKuUkONF8b4si4sZriruedACp1BfH8Tetn1xbCtbD7zgIdEqvM=; 25:Kxia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q79v5cCzUoByUgMEsSsVd8HFgZBF4qBh1SnvkvC/5tMlM+hDIp5h8xVJVrf1wfJpubdJWmm9TVWzH0J/utbeS68eF5hBsX2 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231311)(944501410)(52105095)(93006095)(93003095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699050); SRVR:BY1PR12MB0422; BCL:0; PCL:0; RULEID:; SRVR:BY1PR12MB0422; X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0422; 4:uZesflBEIxD8ESBZVSur8Wet4fVTMOcyavGPClhah9G/u1YcKOkz/BufgXrH9oZ0ZzBt0D7dyofPwaBrDAi1QNmHmXEN2uumzsRBMUN1m7WkRaunN/jjGo9YtnL52cNNLKcddA+T19LJw4vCfw/xeEmw0ZoRWhZWwKWp1IGdPMHWhxUgJZQ55HUrYmHeiEVfcMyl7USpgZz1Eprbg3xTsLd9i55e9pF22Fy0JaGbaUbmRC93uRzNnyL2fSS5jZm35x68NoqadyXL9ft4e1a4mZbqCxVr1dwBZxbFyy6cLIomyLm0RTUJ/q9RrOmOQ0qJ X-Forefront-PRVS: 0792DBEAD0 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR12MB0422; 23:3dVQ56E2039U2jjVS23iE1tQJWK/KvQ3+kJl9+OsS?= F/GQ/ejOHptzuzULVofV3/vjkw/39vsACUJxVTkjioHgEbOkybYbr+tzsjh5BlMsA3cGXYm4NUmbXV8sXUiYZcORhBdYVgTp8otShWbjESFg2NRqc6MOxUJj8GUg3nzmLeyTvYxlMafLGDMU9WOd11JVUhXTvThroP8uHEtjhJtjGIJm+vCKO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l8Imdme+fvabOkMIrs5h9alvIrMVmKerbSGX+NTVC6jrwgWQsoSpH9FD4a5xfAUjVIrRscOwWZL7jxLGmU67OB0OkinLii5c3KOPZHqrPLgLBCNno9ripxjDD4MH1uzuAwqIEAO1YOyS92ZIYfb4ARdGeCX/fnm5ZwZS0aXzKHVWHN54LJchX9L44AERcxNQdT74PCZCgkcN1hKnD0ZELrZ55 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0422; 20:n5oz92CPGKl8yQibwTQmKSHyy/wQAwkztdEGpnHe4X0CXEWKnv4tMflUd+HB1B++qZmD+4mOOiW6jeD10EZ+mI1MVstm7SIrF6OjTtx424HmweJ+1gXLspJK0hOvT2EgBUc0/b7I87/q8zHF7M4mHMUUV6SrJKw7GBPjKWG7sc/bRpj5NHIySJGj/h36EPpONqK5LdRZrC+28+X4tk1FTLLRAN9OBf6rkWtsh0uf1sFo5Aw/P8sjPpYr3Fy4B6F0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2018 16:16:23.6625 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f81e4b41-0358-48d9-cea5-08d61801eb38 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR12MB0422 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolai.haehnle@amd.com, michel@daenzer.net, Christian.Koenig@amd.com, manasi.d.navare@intel.com, Alexander.Deucher@amd.com, Nicholas Kazlauskas , Marek.Olsak@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is no longer needed with the addition of the DRM properties. The base driver correctly checks that notify_freesync is non-null before calling so there shouldn't be any null pointer dereferences as a result of this. Change-Id: If0833b201c81303ca4062393e873faf3ef7c143b Signed-off-by: Nicholas Kazlauskas --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 71 ------------------- 1 file changed, 71 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index d28bab0f4657..c9de8f555c6a 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1581,76 +1581,6 @@ static void dm_bandwidth_update(struct amdgpu_device *adev) /* TODO: implement later */ } -static int amdgpu_notify_freesync(struct drm_device *dev, void *data, - struct drm_file *filp) -{ - struct drm_amdgpu_freesync *args = data; - struct drm_atomic_state *state; - struct drm_modeset_acquire_ctx ctx; - struct drm_crtc *crtc; - struct drm_connector *connector; - struct drm_connector_state *old_con_state, *new_con_state; - int ret = 0; - uint8_t i; - bool enable = false; - - if (args->op == AMDGPU_FREESYNC_FULLSCREEN_ENTER) - enable = true; - - drm_modeset_acquire_init(&ctx, 0); - - state = drm_atomic_state_alloc(dev); - if (!state) { - ret = -ENOMEM; - goto out; - } - state->acquire_ctx = &ctx; - -retry: - drm_for_each_crtc(crtc, dev) { - ret = drm_atomic_add_affected_connectors(state, crtc); - if (ret) - goto fail; - - /* TODO rework amdgpu_dm_commit_planes so we don't need this */ - ret = drm_atomic_add_affected_planes(state, crtc); - if (ret) - goto fail; - } - - for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) { - struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state); - struct drm_crtc_state *new_crtc_state; - struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc); - struct dm_crtc_state *dm_new_crtc_state; - - if (!acrtc) { - ASSERT(0); - continue; - } - - new_crtc_state = drm_atomic_get_new_crtc_state(state, &acrtc->base); - dm_new_crtc_state = to_dm_crtc_state(new_crtc_state); - - dm_new_crtc_state->base.variable_refresh = enable; - } - - ret = drm_atomic_commit(state); - -fail: - if (ret == -EDEADLK) { - drm_atomic_state_clear(state); - drm_modeset_backoff(&ctx); - goto retry; - } - - drm_atomic_state_put(state); - -out: - drm_modeset_drop_locks(&ctx); - drm_modeset_acquire_fini(&ctx); - return ret; -} static const struct amdgpu_display_funcs dm_display_funcs = { .bandwidth_update = dm_bandwidth_update, /* called unconditionally */ @@ -1664,7 +1594,6 @@ static const struct amdgpu_display_funcs dm_display_funcs = { dm_crtc_get_scanoutpos,/* called unconditionally */ .add_encoder = NULL, /* VBIOS parsing. DAL does it. */ .add_connector = NULL, /* VBIOS parsing. DAL does it. */ - .notify_freesync = amdgpu_notify_freesync, };