From patchwork Tue Jan 16 13:34:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 10166957 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 54C7C601E7 for ; Tue, 16 Jan 2018 13:35:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B079280B0 for ; Tue, 16 Jan 2018 13:35:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C6152834A; Tue, 16 Jan 2018 13:35:32 +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 A997F280B0 for ; Tue, 16 Jan 2018 13:35:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B345589817; Tue, 16 Jan 2018 13:35:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0085.outbound.protection.outlook.com [104.47.40.85]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0EE6689815 for ; Tue, 16 Jan 2018 13:35:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onevmw.onmicrosoft.com; s=selector1-vmware-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zQlWHiG6iAf0NpjGJNjm1UgUDeQyDmyAlRR0/T2cjik=; b=XmZXDQBaZmh79gxOTj1fBmwWhjDO317k+pwx82wogU7rx9D0QJgyKevvRNA+xxYiATgF0O8g1Nvbv9yHQOFPUnSjpaArnUPWKBQth0p6q0nJVyq7ge1JWCi0I3gZQlu6FFBM7mzECIlHU+lI+42VLy1Yz2sTazYN9lTiFxsy0zU= Received: from ubuntu.localdomain (155.4.205.56) by BLUPR05MB755.namprd05.prod.outlook.com (10.141.208.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.9; Tue, 16 Jan 2018 13:35:25 +0000 From: Thomas Hellstrom To: dri-devel@lists.freedesktop.org Subject: [PATCH 5/7] drm/vmwgfx: Move the stdu vblank event to atomic function Date: Tue, 16 Jan 2018 14:34:32 +0100 Message-Id: <1516109674-10087-6-git-send-email-thellstrom@vmware.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516109674-10087-1-git-send-email-thellstrom@vmware.com> References: <1516109674-10087-1-git-send-email-thellstrom@vmware.com> MIME-Version: 1.0 X-Originating-IP: [155.4.205.56] X-ClientProxiedBy: DB6PR07CA0086.eurprd07.prod.outlook.com (10.175.238.24) To BLUPR05MB755.namprd05.prod.outlook.com (10.141.208.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 102990a5-e9c8-4473-ca16-08d55ce60094 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534125)(4602075)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:BLUPR05MB755; X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB755; 3:3LOczqac7blQCpzrNwWJoiDRH5TBuAxkrmc2PObbUv1NbDjpTR8ZLyu1j+wum1km0WlEK9Lz/rs8RI4BC5dBIu20jclD2MV6YZDEl6qE9HZxQnFmJ93NwuepVMrUPcX+N5V8vW0ZAJSvNDskVZkRFhD0kPXy8vxW9F41AUmsB0G0mRPoJ+B5Uk77/8aJH+mw66aNn3VDbDIX7XKXOXtRWx+Axok/wpu4yodT/KCRpMDTGjhg8Dnno+2q/OZU6FK7; 25:GSBi6FP0Qm/ZSngGu3i1aoW2aqDpWLU5W1ENrtYXxq1XRieEVjrYs8BCvGo5LLEIEkk2M0PHfQgHTUXlybfISLu5DjoridiO7cgZMCQ0Sg7hP0Hnfqu3wd7XTqc3YzOcLXDYqC3phPw3Fs8ARbzna33cShZHIGU2eg0XOJQsuJI/u1bMjYWcPG10TYeEOtAehJq7n1PM+JJp2l1Y2EiIf7j+YtdCOcZ2yjWypn1Y6pK3d02HF9m+q5PGPuOVnz9hokikxzk9N76UWAalWZjf0RWC4DVpMRQ+kPfGOmMQwF3ohXhpy3IsMllEqeDWo1simjHiICMlIzSz0NfqErlkcA==; 31:Iuug2kFUbf577UZ97/Eko7Cr8Tm6IWIA+Bmc1PhOfX6cyW2LomvKO9lsfMozGJCnen2ZOAVe2S6SaFsFjlvdv/yIVFJt1zYcEf3o585SbTVRIYlwwuSAbjN3xkjsexnsgBAFMNdIbZLQWvxzgGR3pI6Gl8gmJaYj/WgmgEMEYV7NVIRp93hp1WTur11nlQjS3YiGLVsW1Qbtd14c1E/wVrVWgeUB1H6s/2am0VG1Vhg= X-MS-TrafficTypeDiagnostic: BLUPR05MB755: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=thellstrom@vmware.com; X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB755; 20:h22aIFZdpFdAbfnkJ5vdQb3AXI9qgjt6GKAyO9uLoOfZjE9sV+BKtiwonJyfiZ9YfIWNcqXTUb/DT0dQxSgdlEsGSmpH069kkTi2WTgkrh+1Q3r6sNmsHA9mrcl/STrIsL3TbAZzF/tqux7iNrRdQDJEyYSp5wlek/j12qTWBk7Z9nxbP8hy+YtishgCNN5nP8IaxF4ZXSCvZM3U3s+8WS6Nmj8/o30nVDgZWseyEVETWulUrmlGnvETDmoEHxkUqqgM1dNafzjOrFHR08ZSj0KK9k0oENQakxTZLz5JLocjnT+/3Ku0D8pei0gFruKKOYwqtPt+bWMtqboSg9GphNGL7OTIGhNE1jNhBf5u75LLXjJ1XLQW0Q98b4G1yS0VK2pVdFKkMpbCFEVCLpySUgpRHr2WNpg9TxTJwYuuS+LpHkOln2M4g/bsehED3Hm+gm2kYL73zHViOWCH6Y5rR9NgCuWxNNYbq4M6Bip2rHlSUAqH1Zb6eFk9gTAECtOK; 4:NomWfPDeqI+SQnkEr5ZppHV77YG2ntsJLTxh63puEJVk2bsrRwNDzkzmX0yyyL2yaHUqIGJZtyw8lEMMzF9tNuSJg/Nwk453IAupGe+CWt5pvsawIKupmfwS4xx+bn8CPI0MyAnz59Zcqh4QFXfFdnRiEIV3yygItqKAk4lsvJG5kyl4GiUtLWgRuw+LTiIFUK+Yq60jG3AakMaS354uMm5V4xXLfHBw+Q719enEj7ZWm8YQv1VhibnuyxTZ/AetuCS+K1ZnVJ/Ymw9KTV1N3fWg940rajaCorX1s21XlX4tq/39BEs88IgDIi7QYTFY X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(3231023)(2400035)(944501161)(10201501046)(93006095)(93001095)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:BLUPR05MB755; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BLUPR05MB755; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(396003)(39380400002)(376002)(39860400002)(189003)(199004)(50466002)(7736002)(6666003)(6916009)(97736004)(106356001)(305945005)(6486002)(2950100002)(107886003)(478600001)(105586002)(2361001)(2351001)(5660300001)(3846002)(86362001)(6512007)(59450400001)(26005)(386003)(6116002)(76176011)(52116002)(6506007)(53936002)(51416003)(2906002)(68736007)(8936002)(316002)(16526018)(54906003)(16586007)(8676002)(81166006)(81156014)(36756003)(25786009)(47776003)(4326008)(66066001)(48376002)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR05MB755; H:ubuntu.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR05MB755; 23:shf32zrZGkhdQRTYDUhSn+RRAXA0H+7/pWrdcZP2qn?= =?us-ascii?Q?cofJSazQY3jGPBYof52OpgieIcbueavFxptimj5kdzwiD0HAkG1rSFMqProT?= =?us-ascii?Q?VKLTD+V9HXQnCGHMVn0SLnaEI0pk9leCMiUngwVYIcCwzgv2vbmZnKYjaVnV?= =?us-ascii?Q?9r+bQqEOEGMhDahQYkSVEeSBq5b0e620sqr0Po9hsFkquklQU/7o1C/BmQFn?= =?us-ascii?Q?U9wge+fUf9U6sRgSXtBZopFJnSw1wy/dr3o605yqAQtLfB96mpqErtn2y4PF?= =?us-ascii?Q?qquwLkLeXcVGRGqU9D/yjPDnlQVOUilHniPKHWIbPbzX6QQoCEgpSLXnVhIf?= =?us-ascii?Q?MB64ihr8Mo4fdP182cw9b1LpBj+ibCfKaDHNzLzmG/cfEpEyCLZ3+qK9Sn1I?= =?us-ascii?Q?RX5QPcMK6p3Gw2OmPQ/3zNqVYBQ7xitJIjnbTSeAfnYX9toz6gR9/0+8sGGX?= =?us-ascii?Q?7ISnsJh+v231EiUtidQchwLdk4HY/Fh40ED7msZUsJsblXtDm4k+p1EgUoFN?= =?us-ascii?Q?/Y7+nQuHPzb96PO7f+1F9+OBocEBLi/6JOo7Od1sFMFGH8fqvqruQm29Ofdh?= =?us-ascii?Q?bAw9Syb1hFSeXovyZN5+b5m1zLwRszfb2epiEXt6vwSSHyfbwGzgVVb5gNnZ?= =?us-ascii?Q?gzA8Ro45bf2Uan9a9wItv+u/MbULZYRfT6H2dS03BynMNhFp1vjJB+zaiP3n?= =?us-ascii?Q?Pe098u5X0SF0qcJozjH38cVSgS1RSWkq2JC2iMHC6TAHd68C/gSMbe6sa7sG?= =?us-ascii?Q?gppRYo1EN3FKafGfdexM93x2pQx5Srx2NX0qGSvYDbYbBskWO2amgf8prpZ+?= =?us-ascii?Q?diUhLIYeWJglclN1fVdEG+lmd9idnc5G6eAQIde3Lp8HsoK02Ko5XaD5mUqs?= =?us-ascii?Q?WjXRLAlYdoFp7k4+UM/E8CmhxXRb+1RaQigZnSCizL30J2KnOtTr7GGv8pSL?= =?us-ascii?Q?SAXc0Kwqc7QuXz+GYOcN/sZ2p97Zm5y6RIAYRt2KDGDjhwHRcIXmP9YiOj3h?= =?us-ascii?Q?hqC1glkCfnJOQilwJwqQh8eU/qn1WElhad820lEdSZLdp1X0fyZBjX+cYtZl?= =?us-ascii?Q?D2G6+brhrl5xcLOkXG6vAvGy4Ahe/YEyeR3gOSMY2rZzcsi08TPi+xamlZhx?= =?us-ascii?Q?RXeW531RogXRk8senWzKiSzNeEAzdiak815JvRe1Lrr4J3upLwF+zqRzkMV2?= =?us-ascii?Q?SoR3Tjvb8AloI=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB755; 6:l12aarnoShpfi4PtT91WnlOsmz65s2V0WJ/ui4j8v78gkd78uLZgFIIAOI3jcQhd1aA6dNCMfW3gNm9MssztwwMRVGPcxCiNXFwxgKu0JNsSAtbCy+X/HrOxNVrXWtlFML8xy9DhK7uxJF6xoTm96PeT7KuulrgUbSztsn6BlEkW3RwmRqr1+F+p1Za18jDro4gW010eUmZXVTZoe6mcWZ+a1+/+ObSlRLnHDsrMfpqagn/ycynkfgsYPIv/WtpeujBeFYelxBIBg858arb8ow4/qkI3uZOsuXZFrb+wXQbrJpp1IsLRRVX+YOovFvqWH2Y8HdCspdlaZlXGbYYAh2IvpFiEjpZN6x7wyO7vZKI=; 5:Iqj4WOiBwZdSWrT/wDzIDu2uNk0/kgAgoYp/xx+ur7s/3h6gs6PUoTtMw6rN3SFakG//4qQL8O6/k1w02hwjNi/AoQaVvMSj7AV6GsFp8lxRzNEMDpwWq3o6l+G5oxH95VAU2cQmEHJcpUrIM1KxeqXDy9SvUj3teWY4yhq4Oek=; 24:dhZqg+R/ad7bo+RTSn2f8wqyF+M8Kz92CQzqjn0Pen1UjqC/pD4E3KLdjo1JtwMvFBb8nx0OYb7we02n/s2W0N+XhCg1FOKcjE7gBfCgLzo=; 7:2EePTEuPoJ9uqluUAbHl+Z9f6KESDpThtwtzzpWKF+g63vyeiyEwLI4XESmfgHRVK7TZpmRxYcnvytDOrdKZxfIIYHlJNnM0O4dK5ZX8dvD2zWHPrhm/kel0oiiXRuA/ZgW8IGkt2r+XHi0Da7LZ8SQBdo0f3pAugLx8VV8sQ0GR/k243WJRYUuZEHT0dcdZFSiPcunbkPQaC8Z1SqJ1o4wrVHA0TU2hP7VYpEZGAyuwq7VD/DUmN+qp0+yhkMxa SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR05MB755; 20:FbC+Wwp5P8poULV8WrF+pZP43ezOKQcAEPEvyeW99ZApCgK9sISsUbkPBAQIZOhjVzJkXofCg5ycESTB36tlsXVT6dOspWcZFaN+HkIW5URxR/oQlTnX/zrHLAz9EtmlzMxXgy0qe3AFGgPpyH7Hl+Sly8jf+KQQAVyNOv6ia4A= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 13:35:25.8215 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 102990a5-e9c8-4473-ca16-08d55ce60094 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR05MB755 Cc: Thomas Hellstrom , Deepak Rawat 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 From: Deepak Rawat Atomic ioctl can also send the same page flip flags as legacy ioctl. In those cases also need to send the vblank event to userspace. vmwgfx does not support flag DRM_MODE_PAGE_FLIP_ASYNC, so this flag is never expected. Signed-off-by: Deepak Rawat Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 142 +++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 65 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c index c86cec1..0e771d6 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c @@ -494,47 +494,15 @@ static int vmw_stdu_crtc_page_flip(struct drm_crtc *crtc, struct vmw_screen_target_display_unit *stdu = vmw_crtc_to_stdu(crtc); int ret; - dev_priv = vmw_priv(crtc->dev); - stdu = vmw_crtc_to_stdu(crtc); - if (!stdu->defined || !vmw_kms_crtc_flippable(dev_priv, crtc)) return -EINVAL; - /* - * We're always async, but the helper doesn't know how to set async - * so lie to the helper. Also, the helper expects someone - * to pick the event up from the crtc state, and if nobody does, - * it will free it. Since we handle the event in this function, - * don't hand it to the helper. - */ - flags &= ~DRM_MODE_PAGE_FLIP_ASYNC; - ret = drm_atomic_helper_page_flip(crtc, new_fb, NULL, flags, ctx); + ret = drm_atomic_helper_page_flip(crtc, new_fb, event, flags, ctx); if (ret) { DRM_ERROR("Page flip error %d.\n", ret); return ret; } - if (stdu->base.is_implicit) - vmw_kms_update_implicit_fb(dev_priv, crtc); - - if (event) { - struct vmw_fence_obj *fence = NULL; - struct drm_file *file_priv = event->base.file_priv; - - vmw_execbuf_fence_commands(NULL, dev_priv, &fence, NULL); - if (!fence) - return -ENOMEM; - - ret = vmw_event_fence_action_queue(file_priv, fence, - &event->base, - &event->event.vbl.tv_sec, - &event->event.vbl.tv_usec, - true); - vmw_fence_obj_unreference(&fence); - } else { - (void) vmw_fifo_flush(dev_priv, false); - } - return 0; } @@ -1323,48 +1291,38 @@ static void vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane, struct drm_plane_state *old_state) { - struct vmw_private *dev_priv; - struct vmw_screen_target_display_unit *stdu; struct vmw_plane_state *vps = vmw_plane_state_to_vps(plane->state); - struct drm_crtc *crtc = plane->state->crtc ?: old_state->crtc; - struct vmw_framebuffer *vfb = NULL; + struct drm_crtc *crtc = plane->state->crtc; + struct vmw_screen_target_display_unit *stdu; + struct drm_pending_vblank_event *event; + struct vmw_private *dev_priv; int ret; - stdu = vmw_crtc_to_stdu(crtc); - dev_priv = vmw_priv(crtc->dev); - - stdu->display_srf = vps->surf; - stdu->content_fb_type = vps->content_fb_type; - stdu->cpp = vps->cpp; - memcpy(&stdu->guest_map, &vps->guest_map, sizeof(vps->guest_map)); - memcpy(&stdu->host_map, &vps->host_map, sizeof(vps->host_map)); - - if (!stdu->defined) - return; - - if (plane->state->fb) { - vfb = vmw_framebuffer_to_vfb(plane->state->fb); - ret = vmw_stdu_bind_st(dev_priv, stdu, &stdu->display_srf->res); - } else - ret = vmw_stdu_bind_st(dev_priv, stdu, NULL); - /* * We cannot really fail this function, so if we do, then output an - * error and quit + * error and maintain consistent atomic state. */ - if (ret) - DRM_ERROR("Failed to bind surface to STDU.\n"); - else - crtc->primary->fb = plane->state->fb; - - if (vfb) { + if (crtc && plane->state->fb) { + struct vmw_framebuffer *vfb = + vmw_framebuffer_to_vfb(plane->state->fb); struct drm_vmw_rect vclips; + stdu = vmw_crtc_to_stdu(crtc); + dev_priv = vmw_priv(crtc->dev); + + stdu->display_srf = vps->surf; + stdu->content_fb_type = vps->content_fb_type; + stdu->cpp = vps->cpp; + memcpy(&stdu->host_map, &vps->host_map, sizeof(vps->host_map)); vclips.x = crtc->x; vclips.y = crtc->y; vclips.w = crtc->mode.hdisplay; vclips.h = crtc->mode.vdisplay; + ret = vmw_stdu_bind_st(dev_priv, stdu, &stdu->display_srf->res); + if (ret) + DRM_ERROR("Failed to bind surface to STDU.\n"); + if (vfb->dmabuf) ret = vmw_kms_stdu_dma(dev_priv, NULL, vfb, NULL, NULL, &vclips, 1, 1, true, false, @@ -1373,11 +1331,65 @@ vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane, ret = vmw_kms_stdu_surface_dirty(dev_priv, vfb, NULL, &vclips, NULL, 0, 0, 1, 1, NULL, crtc); - } else + if (ret) + DRM_ERROR("Failed to update STDU.\n"); + + crtc->primary->fb = plane->state->fb; + } else { + crtc = old_state->crtc; + stdu = vmw_crtc_to_stdu(crtc); + dev_priv = vmw_priv(crtc->dev); + + /* + * When disabling a plane, CRTC and FB should always be NULL + * together, otherwise it's an error. + * Here primary plane is being disable so blank the screen + * target display unit, if not already done. + */ + if (!stdu->defined) + return; + + ret = vmw_stdu_bind_st(dev_priv, stdu, NULL); + if (ret) + DRM_ERROR("Failed to blank STDU\n"); + ret = vmw_stdu_update_st(dev_priv, stdu); + if (ret) + DRM_ERROR("Failed to update STDU.\n"); - if (ret) - DRM_ERROR("Failed to update STDU.\n"); + return; + } + + event = crtc->state->event; + /* + * In case of failure and other cases, vblank event will be sent in + * vmw_du_crtc_atomic_flush. + */ + if (event && (ret == 0)) { + struct vmw_fence_obj *fence = NULL; + struct drm_file *file_priv = event->base.file_priv; + + vmw_execbuf_fence_commands(NULL, dev_priv, &fence, NULL); + + /* + * If fence is NULL, then already sync. + */ + if (fence) { + ret = vmw_event_fence_action_queue( + file_priv, fence, &event->base, + &event->event.vbl.tv_sec, + &event->event.vbl.tv_usec, + true); + if (ret) + DRM_ERROR("Failed to queue event on fence.\n"); + else + crtc->state->event = NULL; + + vmw_fence_obj_unreference(&fence); + } + } else { + (void) vmw_fifo_flush(dev_priv, false); + } }