From patchwork Wed Feb 1 17:03:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Grodzovsky X-Patchwork-Id: 9550297 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 9D0F160415 for ; Wed, 1 Feb 2017 17:21:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E34428435 for ; Wed, 1 Feb 2017 17:21:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8301128451; Wed, 1 Feb 2017 17:21:06 +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 E3A9328435 for ; Wed, 1 Feb 2017 17:21:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6EFDB6E888; Wed, 1 Feb 2017 17:21:03 +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-by2nam03on0061.outbound.protection.outlook.com [104.47.42.61]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1BF9E6E883 for ; Wed, 1 Feb 2017 17:21:02 +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=sIUD2NrOre+jzVO0Gp3aZJxIAHQIqCgFk0MG/L5LJS0=; b=Z4ESd5+T0L2EoJd2+RJQN/xbKJLfnvTCXy0gIwjPBr0U7Uj3uZpYqynN6wKUCG4RRZucpPhEzcObTbfR7xreBx0r1RSJ28Py6eZnskFviVnzZTmyJVmf6JLcMpxUbs5PBqiwIH+df80gxuFUJGlDGaHJUa4EC9RV5TCRQsDynwc= Received: from BN6PR12CA0011.namprd12.prod.outlook.com (10.168.222.21) by CY1PR12MB0460.namprd12.prod.outlook.com (10.163.91.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Wed, 1 Feb 2017 17:05:30 +0000 Received: from CO1NAM03FT058.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::206) by BN6PR12CA0011.outlook.office365.com (2603:10b6:404:12::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12 via Frontend Transport; Wed, 1 Feb 2017 17:05:29 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; intel.com; dkim=none (message not signed) header.d=none; intel.com; 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 CO1NAM03FT058.mail.protection.outlook.com (10.152.81.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7 via Frontend Transport; Wed, 1 Feb 2017 17:05:28 +0000 Received: from SATLEXDAG01.amd.com (10.181.40.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 1 Feb 2017 11:05:27 -0600 Received: from SCYBEXDAG01.amd.com (10.34.11.11) by SATLEXDAG01.amd.com (10.181.40.3) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 1 Feb 2017 12:05:26 -0500 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; Thu, 2 Feb 2017 01:05:22 +0800 From: Andrey Grodzovsky To: Subject: [PATCH v4 3/3] drm/amd/display: Switch to using atomic_helper for flip. Date: Wed, 1 Feb 2017 12:03:36 -0500 Message-ID: <1485968616-4296-4-git-send-email-Andrey.Grodzovsky@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1485968616-4296-1-git-send-email-Andrey.Grodzovsky@amd.com> References: <1485968616-4296-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)(39410400002)(39450400003)(39840400002)(39850400002)(39860400002)(2980300002)(428002)(3190300001)(199003)(189002)(2906002)(106466001)(53416004)(105586002)(305945005)(50986999)(76176999)(77096006)(101416001)(53936002)(189998001)(4326007)(50226002)(6666003)(8936002)(110136003)(38730400001)(47776003)(2950100002)(6916009)(626004)(2351001)(5660300001)(48376002)(5003940100001)(81156014)(81166006)(8676002)(54906002)(50466002)(86362001)(575784001)(36756003)(92566002)(356003)(68736007)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0460; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT058; 1:Wg+OvxXUCHkeKtKguwNeQmd5QYSUn2VHKV6P7plMDLtEPOT5J4yx1VE2bSW6ZznsRrH2a3hIx8fcvCfzB6oxDJKWc/pb/HA4WWAtJTPwoM0YR5UxZ+Qibk9jWi5g2Z0HMqznnikxba4+/gsl1RiDQRm2nMcCJvOQg+4FkXyaDRMVy4DTq7k80ovhkhLdagxjjrZylMCwlfdxi3tler1HqP7Js0FZ0JfMXXeIfgJSvuaI04hm/pLJlvT197c79iUe3XfeOaWdJEKA1kcv4r0hrWIXyclaItaB+9Xf6A8uQUKWYvQ1FNwdFqIItj4XL6OPsBc2M6LxF44glNWWOZ3clj/vTgV4HMZzM8wMo3wbX34XLVp32JLvDGlbzxVZZi7YCnr1zxXK1Q88Q2N3DaXA9XQPCUsFvxZKnLSrqoEef/W4ZNWmWwuxw4XGFRR5TwyRNFIOjqBIdryKOyggXlYjFynmSJsw1ZTWfewq1IUg8WGsl5+PdztaOkZ0rmtjVwq1gVOTbvCnIJd36az0aYwYOXpuSFa+2nyESGFo7NorKecQbmwW95GwdmApyMQay4yB X-MS-Office365-Filtering-Correlation-Id: f1f74f4b-a14d-4ab9-00ad-08d44ac4861d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR12MB0460; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0460; 3:OFqxHTlaB5V56Lk2kkV8uqJ8WiB4GYjgpc+xPOsCcICBVHZ0jDishmIVK3DjFuuxkEyUp2Co9jN6iTjzfAmquWgG7VTooNjEwiYbURj9JUiSXuVKZMlabFbiHI04hQWKA2JpolMSzPK/HWVS19tTKYIGbuoxWR/yKlOLPvCt3vjbhU4d0AYbGyV5DDc/ajmcTIWjK+Wrdau04lNij9FLkdQ5UpbG3k8GNGmkMGJr9P+snWRltDyhl5qLPn308DP1E5U3Q3u6lbH2dWWEgQZ24BswvTOZdj76DtwOaxZcsL6gTly2rY5B3cAb0wtrY69GKtlnTfaGuNeXjvLAE+LrzT4PSniv8T5iXCfrynzBe3vpSsdX8kLVxpJJYkK8FnjT X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0460; 25:YIKlWGDpVTnn+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buCSgE5/06hLuA4WolW1dwm9x42luxPPF9pA7Lv8SAO2uUnY0WpaTaFz7xX4VVoIkpgQxmYJAqva7ukeuhi7vIWGOeIk/7dpKCmTVlSwxFGLcncvYHjxlw0Hhs7Ho2C1ZJ3ifOyOD2jaYYFfuP320U8kz78dnyo71E+LjeJqYG5Lab22ewdx+35QzB2wLlHlKPnh5dkYKWnp90U2FibS7+8sgrSK7wzHDbl0QSfldoeoP977ZAB6eDCvyvSe9QlRuB0ua+Gox3lgpZjzkKiS1hQkJWvH/SMIQJ/4aKJP4QtbGY7YS5udnX0OgrFoG2u6v9ME6pP4Y/v55Ffs141VfXwDwDiW16PQfJcPBms9uvveGYiCzYiTsM3wldZ5f6O42w1zEGfi9JYN6+xE0/dhE+mVmrHloJFCh5jQETjUicFHhrwE/firxa2BHihD5yq/3z5tu+twlcJsRbpudWU4w7H2P8PkUPT+A8MPwbnUwf8HSmoRcg/1v8j 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)(20161123564025)(20161123562025)(20161123558025)(20161123555025)(6072148); SRVR:CY1PR12MB0460; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0460; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0460; 4:3VEhHPLgUvt/fvSkqSjLi5sPidkHYHEmfkMI95h4+c15AMa8jDsaurA5on3A/mf8nFkwQ02vUkvjaAHFnSK7twtgU3s21FaIkBzemlezMNOiklf14fpY1DrJ9HWL/Kl5FoS0PnFrL9Wxw5YD1ctuoVazmyozUeR57IgSDqqogUTU497e9bLWUqUH5/+hxr1UAlJQByHdz4GDkEBIyYyQKluqkATLxd6TnYAh7xSJ5ZCy/SydosIpfTSRgKtIGh+V7I70EECoO+Un5seZVAzcGEKnxulq/jxL2L7+BRAD2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hXTF+CeTPmarKVL8Cd9Jr1wQwDXHNDeuNpVAQnM5m614DccHtt71CpCxoxpsbFwBb1osKIPwWqbWP37meNz/qgMvs4cydvPcGz9YiojfWZnqVafj6c+hSbWLrjooCPecAQ/7N5t3mWWZ261dyjJ3HkJN9pLhYI4J1svVL8T4WSrpc1qOcVH2wi/KXlB; 20:7pSjeGJzdtI2cv/k+5VhZv1XQor6zGH16GA547DT1+ur2ZseWjNAB/bSTNccuns9OUeo6ASXxVoSRbcnXavYeleQLMnccjoojC+tvzZ6q0Wh7b7exAuIeaOQc/KRqGHpRc0y52t9Mvjk7lx+grIgAvoWi5ZOZeAAMumw/buLUocfA7lWsFFF6UQ3YXcT/WLJCMTbj7k2yoVJB/AccS1qqeMNdjP8n2GkiYKM4IkaetKljQZvAgPMFSCXpWGc0anz X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2017 17:05:28.6269 (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: CY1PR12MB0460 Cc: dc_upstream@amd.com, nouveau@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, laurent.pinchart@ideasonboard.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 v2: Modify for movig pflip flags to crtc_state v4: Fix identation. Change-Id: I25dae6d8c29de5d022a42aa99a18a32674b56cda Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 - .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 113 +++++---------------- 2 files changed, 24 insertions(+), 90 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..78f65ba 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 @@ -1626,7 +1549,8 @@ static void clear_unrelated_fields(struct drm_plane_state *state) static bool page_flip_needed( const struct drm_plane_state *new_state, const struct drm_plane_state *old_state, - bool commit_surface_required) + bool commit_surface_required, + uint32_t pflip_flags) { struct drm_plane_state old_state_tmp; struct drm_plane_state new_state_tmp; @@ -1679,7 +1603,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 (pflip_flags & DRM_MODE_PAGE_FLIP_ASYNC) page_flip_required = true; } return page_flip_required; @@ -2696,7 +2620,11 @@ int amdgpu_dm_atomic_commit( * 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, + crtc->state->pflip_flags) + || action == DM_COMMIT_ACTION_DPMS_ON || action == DM_COMMIT_ACTION_SET) { list_for_each_entry(connector, @@ -2760,21 +2688,24 @@ 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; + uint32_t pflip_flags; if (!fb || !crtc || !crtc->state->planes_changed || !crtc->state->active) continue; - if (page_flip_needed(plane_state, old_plane_state, false)) { + pflip_flags = crtc->state->pflip_flags; + if (page_flip_needed(plane_state, + old_plane_state, + false, + pflip_flags)) { 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; + crtc->state->pflip_flags, + crtc->state->target_vblank); + if (ret) break; } @@ -3138,13 +3069,17 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, continue; action = get_dm_commit_action(crtc->state); + crtc_state = drm_atomic_get_existing_crtc_state(state, crtc); /* Surfaces are created under two scenarios: * 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, + crtc_state->pflip_flags) + || action == DM_COMMIT_ACTION_DPMS_ON || action == DM_COMMIT_ACTION_SET) { struct dc_surface *surface;