From patchwork Wed Mar 22 21:50:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9640149 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 B9A2F601E9 for ; Wed, 22 Mar 2017 21:51:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC4B8201A4 for ; Wed, 22 Mar 2017 21:51:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A015A27D5E; Wed, 22 Mar 2017 21:51:58 +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=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 299C8201A4 for ; Wed, 22 Mar 2017 21:51:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 83B726E9A5; Wed, 22 Mar 2017 21:51:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id A7A446E98E for ; Wed, 22 Mar 2017 21:51:14 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id u108so28698515wrb.2 for ; Wed, 22 Mar 2017 14:51:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MNSxb4jAkSZGT0J4jXm+gRRWqB/4MI9g1f0mX626+KY=; b=hrA8PEbiDHqthaozLKB5RslBfJy+RgEG2E0WA6+tQnouQpzSeRJK0AJeDw2tUbhV0K 5t+ut3EjRrkqyiXNq/DdPaqdYgRK8sMjsiBLgSZBuCAnz9eq8cz+i9guCMOTHaJHSx19 AsKptYtvmYjP5QGwui0jw3/tHF1+UqNWpgt/k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MNSxb4jAkSZGT0J4jXm+gRRWqB/4MI9g1f0mX626+KY=; b=jRDmGopbi5PKPANbJWe78AjG2v28D43qqOH3wMfE+j9A50ciyDL2kjDH0FbfBcDoxX UXxPK9BbZgaGrvQRUYU+q+SmY+J1Oi2oQxb2ocCOy1whe/okh+IsFcv7llOQwdG5CkaE J1CC/b3tkfioRPYTCEFLy74uFc2f1ZYqZvC6nNhpE9pFXMALSliVeE765UpZoa0vf8qG C9ModDrS3eDHYrIAYK8c0zj7IhGOg/saguBx6MJxb1PycRi2FmANmoBYbt/tE4gRHqHS /wqbAt94/3XPQtD/HfK9a+qwLaj69jt72a7iB4ZSroUKQiEBSdrFq/n6lUYO6Zs2u4XC 2euw== X-Gm-Message-State: AFeK/H0pm0JZg4E9yGFCEk7u66Ax3jBPgWGFhnIEZ4eqF8w8AcJUYCAWZjzdQSikSt3yWA== X-Received: by 10.223.175.196 with SMTP id y4mr37579385wrd.77.1490219473145; Wed, 22 Mar 2017 14:51:13 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:56c9:0:decc:6e78:7e96:b452]) by smtp.gmail.com with ESMTPSA id t85sm1777070wmt.23.2017.03.22.14.51.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2017 14:51:12 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 06/19] drm/vmwgfx: Drop the cursor locking hack Date: Wed, 22 Mar 2017 22:50:45 +0100 Message-Id: <20170322215058.8671-7-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170322215058.8671-1-daniel.vetter@ffwll.ch> References: <20170322215058.8671-1-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , Daniel Vetter , Intel Graphics Development , Thomas Hellstrom 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP It's been around forever, no one bothered to address the FIXME, so I presume it's all fine. Cc: Sinclair Yeh Cc: Thomas Hellstrom Signed-off-by: Daniel Vetter --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index d492d57d5309..424b3fc57203 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -148,15 +148,6 @@ int vmw_du_crtc_cursor_set2(struct drm_crtc *crtc, struct drm_file *file_priv, s32 hotspot_x, hotspot_y; int ret; - /* - * FIXME: Unclear whether there's any global state touched by the - * cursor_set function, especially vmw_cursor_update_position looks - * suspicious. For now take the easy route and reacquire all locks. We - * can do this since the caller in the drm core doesn't check anything - * which is protected by any looks. - */ - drm_modeset_unlock_crtc(crtc); - drm_modeset_lock_all(dev_priv->dev); hotspot_x = hot_x + du->hotspot_x; hotspot_y = hot_y + du->hotspot_y; @@ -224,9 +215,6 @@ int vmw_du_crtc_cursor_set2(struct drm_crtc *crtc, struct drm_file *file_priv, } out: - drm_modeset_unlock_all(dev_priv->dev); - drm_modeset_lock_crtc(crtc, crtc->cursor); - return ret; } @@ -239,25 +227,12 @@ int vmw_du_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) du->cursor_x = x + du->set_gui_x; du->cursor_y = y + du->set_gui_y; - /* - * FIXME: Unclear whether there's any global state touched by the - * cursor_set function, especially vmw_cursor_update_position looks - * suspicious. For now take the easy route and reacquire all locks. We - * can do this since the caller in the drm core doesn't check anything - * which is protected by any looks. - */ - drm_modeset_unlock_crtc(crtc); - drm_modeset_lock_all(dev_priv->dev); - vmw_cursor_update_position(dev_priv, shown, du->cursor_x + du->hotspot_x + du->core_hotspot_x, du->cursor_y + du->hotspot_y + du->core_hotspot_y); - drm_modeset_unlock_all(dev_priv->dev); - drm_modeset_lock_crtc(crtc, crtc->cursor); - return 0; }