From patchwork Tue Jan 17 05:16:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Grodzovsky X-Patchwork-Id: 9519979 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 202ED6043D for ; Tue, 17 Jan 2017 05:18:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11047284DD for ; Tue, 17 Jan 2017 05:18:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04CBA284E9; Tue, 17 Jan 2017 05:18:15 +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 8383C284DD for ; Tue, 17 Jan 2017 05:18:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 757D46E5DB; Tue, 17 Jan 2017 05:18:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0083.outbound.protection.outlook.com [104.47.42.83]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9D56F6E5D4; Tue, 17 Jan 2017 05:18:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sy8q941fnW42KeBurGJDaB7d4KQf1rfR2NeAZJ0IBkU=; b=VhFp8uzcwKg7WCvRumLPraYGHQDcOuhmqPvy8oQtL2QtDrOC6EPWL75U9qdg1CVxXQxecQPckTIeEhSMZM7eHiWjjo4bSk3IcFGOSwlGK1fIa3bJ+sqqndYgr1PATjwW0CY/3XVg/N73OpQ9yhH2KWa/smEm/Y/Do+qnxcpKo5s= Received: from CY1PR12CA0001.namprd12.prod.outlook.com (10.160.137.11) by BN1PR12MB0066.namprd12.prod.outlook.com (10.160.81.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Tue, 17 Jan 2017 05:18:09 +0000 Received: from DM3NAM03FT035.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::205) by CY1PR12CA0001.outlook.office365.com (2a01:111:e400:4c1f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13 via Frontend Transport; Tue, 17 Jan 2017 05:18:08 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by DM3NAM03FT035.mail.protection.outlook.com (10.152.82.188) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.8 via Frontend Transport; Tue, 17 Jan 2017 05:18:07 +0000 Received: from SCYBEXDAG01.amd.com (10.34.11.11) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 16 Jan 2017 23:18:02 -0600 Received: from agrodzovsky-All-Series.amd.com (172.29.227.109) by SCYBEXDAG01.amd.com (10.34.11.11) with Microsoft SMTP Server id 14.3.319.2; Tue, 17 Jan 2017 13:17:49 +0800 From: Andrey Grodzovsky To: Subject: [PATCH v2 2/3] drm/amd/display: Switch to using atomic_helper for flip. Date: Tue, 17 Jan 2017 00:16:46 -0500 Message-ID: <1484630207-27366-3-git-send-email-Andrey.Grodzovsky@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484630207-27366-1-git-send-email-Andrey.Grodzovsky@amd.com> References: <1484630207-27366-1-git-send-email-Andrey.Grodzovsky@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)(6009001)(7916002)(39840400002)(39410400002)(39850400002)(39450400003)(39860400002)(2980300002)(428002)(199003)(189002)(575784001)(5660300001)(86362001)(101416001)(50226002)(54906002)(305945005)(68736007)(81166006)(8676002)(6666003)(5003940100001)(2950100002)(92566002)(356003)(8936002)(81156014)(6916009)(36756003)(105586002)(110136003)(106466001)(189998001)(50466002)(626004)(77096006)(38730400001)(2351001)(4326007)(47776003)(97736004)(2906002)(48376002)(50986999)(53416004)(30001)(76176999); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR12MB0066; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT035; 1:58CMoIpDdB3QTjCNHLFq6suItoZwGWy0+l1a5db3ANj5bLsUCvv3LYO1feZEsJK6YdPCrZ2ed4TTfWFWp7hsylXbqU7rAqo/sdJBGYuDwpKlaujCgFwU/HZHh9Y9dWLeo7gtReSUsUU8RpPl5nwd0wQmAC4a+tpHc5GEv7yPh0pqRGuVxc4dG1Vl2txXJxCo4P9WryDMAlhAvj2vCtIz31UyfqB6bAENLlQKYefROvbc/SLdDBiKB+k3Wi9RXkDYQxPua2zyQu5eBkfqTyx770B2UynVdvFrafA3DNTMNKkarte9ca45Nptmi51czrvNQQbuxkYK3bAuL8qEipL/vjpVwFLKH36zFheCHJMWB47Qseq5U6Qfhg4ydcfo562g0KQpgpKXw1PXGC5ETsC8t8YqE2D+5E7uS00G5aVGfpfW4DnwPHMOxVcer6tbzdQoCMCgD2mOzN7QTOqtiEiZGKH7g1IO9UoNDyMQkXQay8m9wEMTLyALsiJIziZeijlb X-MS-Office365-Filtering-Correlation-Id: 8442ac30-f641-40d2-8fe9-08d43e98392a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN1PR12MB0066; X-Microsoft-Exchange-Diagnostics: 1; BN1PR12MB0066; 3:fuKeD201OsqdfEN1F+ADaveMvJBr5FP/I90AbddmA+gZGhlz4o2E6x/ndPl+Q9F8WTFQWHzRrElKs+SJyFf1qwvy9Im28QyianaTEBJv90vnyAQMXCmfqT0cbOs32z9dr/vKELEl3HDA4y4umtCR4OHy3LtAt0tl0Y1aURrZdm9QsjLoZZGela6fJg2cGrFW4TrXMiM90eAHnEq2kfCOCnk1Zkq4Qj2niKqWIP/zBKYcJ2rf8YUuHue5nJusUim28EYsrs0PM/a46XYhsBf2Sg6AQkVp10MR4/R4nuk35zfArg4scrOUOxn3zPQ3KtD1C9YBMRLmzB3w2nkLKOxJLMOt7/HMOgRh9kPVAJaO1rRJ/XWWl00EBGRWSR7/Og++; 25:WiqLB4jJEd2SONKoHjDpkZj6DZvJq3//39SC1aZKeDAPEvdkzTNqG09m++ITIVQk3dzS+iq9MeQ3U2VR+zYQ0UC7FLtW1e2N/YQqYTVoz+k+04fg7E6dxpe/xCdnz3FpPdIkcO9hlXlzKZmcukMcLnH5AqwRt6g7cU/91mqnevatca+buvBV8pCxwPFxU1WwMUMM1qyYAeYSzx+1Nlezz4wUULdsHeYwsSQ3Wm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A+qay//iBNe18 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13018025)(13016025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123558021)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:BN1PR12MB0066; BCL:0; PCL:0; RULEID:; SRVR:BN1PR12MB0066; X-Microsoft-Exchange-Diagnostics: 1; BN1PR12MB0066; 4:goljjl4R0nk3lSaB27wzM5J93/4MQBwHRxaS2qul350TmFJ4P2Gqq7yJQzAVkZ24F+drkWS+UNMX3KpOG1M98FedG9rEAaYNXkik33cytLyS5Iu+CVEwhqRCAOKZ0iK7n0o5dda78djjZgeGu75by6Di7Lf7Ya04lIdmyPhDr39lXc+mHhtEVvXEmuYul64IaKLQssUFAAtOqupq41h54rOHiRnZUkToidiIMApq8PSCRso9LMKG75DmUG4r6zXzdTDXBJriEiaHDPvYPiNiHmPrRvCSJIKpCrOuzL4OEuh8mGGuL+yDh60WiChCKju7gF1BqxRhAgf9sgdViCSq33QtuhkL5FtxuhN2ntysnp9LI7q+HNCGm1ic0pKUyKyJ9iYr4lcLY53nTmcSxXIws5aqff1ZNsSQnuKOoMRPFd2Mu2WdbtXbk/43xE/2ai3fN9dFEt1UaiwPelHUc+kbBW+A5D5MG89wM6WEQUA/noBqrk6pIdvOWH4hpSAmRML8mCWYk8aZjSfWDYLNclY2GhY2eQlTzwqTBsbEeJpbr0k8ecgwYwNR/qPqHLNXk3WKWAtuj1cnBiFmrhuMQi4k/HDlFnQEdYECzzd6IZV2SU2SBeKsVyxwuDtAAv3Ma2rqrthBV1E3kTPKL1IYSxX8M/JDmBQSxH42L1t92tXzHmPbVjjFKzFYqVETEbdtzBrLqF/mLbpIzGcDea+ajx/jpQ== X-Forefront-PRVS: 01901B3451 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR12M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lwg5CXWTbcr13YRSKHyhR8ny68O5izTkED7P9Pqk1gPCBwv23tm6qvI5pj6kxZB4x87YBE8lbvxMqIA96ay+hj3afWogr43ugPhBhLo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR12MB0066; 7:pk7TIzXukGZSaXzy2nigfxbhFBpf++ujWu27+P8wocdzqEFUzaIf7U7I1EXYGqvI1LOicfhFCEqkuDjGWUSic5SGy/3GL5/CM8A+KzANPXcteZ3YqmO4KYeUgrbfcVFcLCFXECrI5xdm2JJdaxkZP7AAW/+TEm0BOITCtsiA3jNhwj8KQefkV2OYFQS+y7GEHAO5FsXXYquU7hQ+NlMlByjRUrg6ALaLggTUVskFEljBWepq5BwGJqE8qVtpcnrFRUcm5G/Abho1uhe/CtPX29nCnO1OELIcmnEz4Hf0risP2SF2ySf+4apqcIsc/2UScVHooFv9LOyL/mUUEGZbWFc4ho938f612ttijhpKBOORpgeGqJAOwfxxw7GBQiuL+eFEAua4o2LOYu79Ui3AwWXOI21+jYQQwVyPjxhRftvzd0NvXpY5Ev7v05XZDKXdDgveIoazug9cvyM2a6qbow==; 20:LzYtj+Zn6mNlqIUt98Eo4LlG1IPEiU8U5IJq+UdJ04KH6xlelojzAbiIsQiHqOmRf6bYFCb4p7A93+5GPmUnlpEOOKXo8X17lGYO2Sym8MDtbi2q5UCBS33PLaVm3ewbNEerirOwqPONtrFhO7F+aVmMHxzxZTYGS3H2HKUPCzO5473D3ux7tO9V902oPY0NpZ2dULKSIembRWEko1W6RN1nu6P1aGGUhiZ+nMriSlCYnY/Mbj0DkkO6Ep0AVLqb X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 05:18:07.8155 (UTC) 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: BN1PR12MB0066 Cc: nouveau@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, laurent.pinchart@ideasonboard.com, Alexander.Deucher@amd.com, daniel.vetter@intel.com 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 Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 - .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 92 ++-------------------- 2 files changed, 6 insertions(+), 87 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h index 4c0a86e..3ff3c14 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h @@ -443,7 +443,6 @@ struct amdgpu_crtc { enum amdgpu_interrupt_state vsync_timer_enabled; int otg_inst; - uint32_t flip_flags; /* After Set Mode target will be non-NULL */ struct dc_target *target; }; diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c index a443b70..d4664bf 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c @@ -1060,83 +1060,6 @@ static int dm_crtc_funcs_atomic_set_property( return 0; } - -static int amdgpu_atomic_helper_page_flip(struct drm_crtc *crtc, - struct drm_framebuffer *fb, - struct drm_pending_vblank_event *event, - uint32_t flags) -{ - struct drm_plane *plane = crtc->primary; - struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); - struct drm_atomic_state *state; - struct drm_plane_state *plane_state; - struct drm_crtc_state *crtc_state; - int ret = 0; - - state = drm_atomic_state_alloc(plane->dev); - if (!state) - return -ENOMEM; - - ret = drm_crtc_vblank_get(crtc); - if (ret) - return ret; - - state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); -retry: - crtc_state = drm_atomic_get_crtc_state(state, crtc); - if (IS_ERR(crtc_state)) { - ret = PTR_ERR(crtc_state); - goto fail; - } - crtc_state->event = event; - - plane_state = drm_atomic_get_plane_state(state, plane); - if (IS_ERR(plane_state)) { - ret = PTR_ERR(plane_state); - goto fail; - } - - ret = drm_atomic_set_crtc_for_plane(plane_state, crtc); - if (ret != 0) - goto fail; - drm_atomic_set_fb_for_plane(plane_state, fb); - - /* Make sure we don't accidentally do a full modeset. */ - state->allow_modeset = false; - if (!crtc_state->active) { - DRM_DEBUG_ATOMIC("[CRTC:%d] disabled, rejecting legacy flip\n", - crtc->base.id); - ret = -EINVAL; - goto fail; - } - acrtc->flip_flags = flags; - - ret = drm_atomic_nonblocking_commit(state); - -fail: - if (ret == -EDEADLK) - goto backoff; - - if (ret) - drm_crtc_vblank_put(crtc); - - drm_atomic_state_put(state); - - return ret; -backoff: - drm_atomic_state_clear(state); - drm_atomic_legacy_backoff(state); - - /* - * Someone might have exchanged the framebuffer while we dropped locks - * in the backoff code. We need to fix up the fb refcount tracking the - * core does for us. - */ - plane->old_fb = plane->fb; - - goto retry; -} - /* Implemented only the options currently availible for the driver */ static const struct drm_crtc_funcs amdgpu_dm_crtc_funcs = { .reset = drm_atomic_helper_crtc_reset, @@ -1145,7 +1068,7 @@ static int amdgpu_atomic_helper_page_flip(struct drm_crtc *crtc, .destroy = amdgpu_dm_crtc_destroy, .gamma_set = amdgpu_dm_atomic_crtc_gamma_set, .set_config = drm_atomic_helper_set_config, - .page_flip = amdgpu_atomic_helper_page_flip, + .page_flip_target = drm_atomic_helper_page_flip_target, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, .atomic_set_property = dm_crtc_funcs_atomic_set_property @@ -1679,7 +1602,7 @@ static bool page_flip_needed( sizeof(old_state_tmp)) == 0 ? true:false; if (new_state->crtc && page_flip_required == false) { acrtc_new = to_amdgpu_crtc(new_state->crtc); - if (acrtc_new->flip_flags & DRM_MODE_PAGE_FLIP_ASYNC) + if (new_state->pflip_flags & DRM_MODE_PAGE_FLIP_ASYNC) page_flip_required = true; } return page_flip_required; @@ -2760,7 +2683,6 @@ int amdgpu_dm_atomic_commit( for_each_plane_in_state(state, plane, old_plane_state, i) { struct drm_plane_state *plane_state = plane->state; struct drm_crtc *crtc = plane_state->crtc; - struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); struct drm_framebuffer *fb = plane_state->fb; if (!fb || !crtc || !crtc->state->planes_changed || @@ -2771,10 +2693,9 @@ int amdgpu_dm_atomic_commit( ret = amdgpu_crtc_page_flip_target(crtc, fb, crtc->state->event, - acrtc->flip_flags, - drm_crtc_vblank_count(crtc)); - /*clean up the flags for next usage*/ - acrtc->flip_flags = 0; + plane_state->pflip_flags, + crtc->state->target_vblank); + if (ret) break; } @@ -3143,8 +3064,7 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, * 1. This commit is not a page flip. * 2. This commit is a page flip, and targets are created. */ - if (!page_flip_needed(plane_state, old_plane_state, - true) || + if (!page_flip_needed(plane_state, old_plane_state, true) || action == DM_COMMIT_ACTION_DPMS_ON || action == DM_COMMIT_ACTION_SET) { struct dc_surface *surface;