From patchwork Thu Apr 26 08:24:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 10364909 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 88ED5601BE for ; Thu, 26 Apr 2018 08:24:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BA1829084 for ; Thu, 26 Apr 2018 08:24:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7089429087; Thu, 26 Apr 2018 08:24:53 +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.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, 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 E49D429084 for ; Thu, 26 Apr 2018 08:24:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ABA196E69F; Thu, 26 Apr 2018 08:24:51 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0083.outbound.protection.outlook.com [104.47.34.83]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3F53D6E69F for ; Thu, 26 Apr 2018 08:24:50 +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=J47EEpi56R3IOjAvl9c3tZJnKPCu9mMSzcyiCLmOtds=; b=RZWD/g9oJ1deeLHGb7uv7GiqWb4SUe8lysH872WyySELG7cHjJg8Uh34vGKEfjsHR3vQJv79OmHLDuUrQ7i9V3Ro2tqepRZkHWADuT5MLLDhwU96YCrgNQeQV5L/aGLjQO37z2aGNzi6pMombvY9YsEF3FhKdZwgAlu7MvBT1FM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=thellstrom@vmware.com; Received: from localhost.localdomain.localdomain (155.4.205.56) by SN6PR05MB4591.namprd05.prod.outlook.com (2603:10b6:805:38::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.735.5; Thu, 26 Apr 2018 08:24:44 +0000 From: Thomas Hellstrom To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/vmwgfx: Clean up fbdev modeset locking Date: Thu, 26 Apr 2018 10:24:07 +0200 Message-Id: <20180426082408.2602-1-thellstrom@vmware.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 X-Originating-IP: [155.4.205.56] X-ClientProxiedBy: HE1PR0301CA0004.eurprd03.prod.outlook.com (2603:10a6:3:76::14) To SN6PR05MB4591.namprd05.prod.outlook.com (2603:10b6:805:38::25) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:SN6PR05MB4591; X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4591; 3:/u1gt+eEzkx2EHZdqzG0uImQVsS4kyW7lmp/N99lgRgXxq1IRCfD2DSwDZWMl8hZTAjmwZZBcWrggJpZSz4O7ULIfKup7opYSeP3/d+ykRvnew0xWyn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IYjocvJCnrowcTvg+t0rKRLLTeC/uQlt1mWSM6X9PWf+U2sQ4oh5u4vQle9U2P4wYNWyYtE9QojMXV1BvVo3j1Y3kQHS0U2uWHOGF2yWhlQ9pNrqzAHh2hqKKvJbnMA2qcXW3idiXLXbmDokmbC17yZ6x1j/tYqY+MnKJ17daVJzVfGT02bxTjIihHURhpWQFfFKX16uyHAOryxTjRDIUbmsbxq660VIJh; 4:EuMgT94OsciDDa+r4x8QD9+oLzzapuULAquhkrov24yFtRTmjvsWuX4NqIVDiANP9kjeVGO6LMISms7kHjLUjpUnwiDtTt6T74fkZUJaNOL5c91/86jvQmEa2uud0cOOH5jDfhud/s1zNBLNfh5budDhEXx5ldNXaHKjpZNKTnvuqaXl3VTSY2D6LD3u/c0qLKFLOLt/7mRx7MNx7lmpg4JxOI/wmCRGLz/+lq3i/FcqSFSBsaS1JLClki8xUeFo9+cjr7oLuyhxkHs4AWt6o7Fo5PmP5Ywc8yJGtmqqebSYblPT3yVV24nsFAgnXcxk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231232)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:SN6PR05MB4591; BCL:0; PCL:0; RULEID:; SRVR:SN6PR05MB4591; X-Forefront-PRVS: 0654257CF5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(366004)(396003)(376002)(39380400002)(346002)(39860400002)(199004)(189003)(1076002)(2361001)(6486002)(97736004)(53936002)(6512007)(105586002)(106356001)(5660300001)(956004)(2906002)(50466002)(3846002)(6116002)(25786009)(2351001)(48376002)(476003)(2616005)(486006)(305945005)(186003)(16526019)(26005)(478600001)(52116002)(59450400001)(6506007)(51416003)(86362001)(386003)(81166006)(47776003)(81156014)(575784001)(107886003)(4326008)(8676002)(36756003)(68736007)(66066001)(6666003)(7736002)(316002)(6916009)(50226002)(8936002)(16586007); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR05MB4591; H:localhost.localdomain.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR05MB4591; 23:F9djpN5l9Yw2PwBxRqnaQvS/KTU+fa6PqYh8mFywk?= =?us-ascii?Q?2y0sLGIee+jkUDTAdwoiy3AjG3bfQySZIHxfCia8kIl0SGoToXY2HuSwLYDM?= =?us-ascii?Q?corry4v+FCgAFW6hdsiv1WltEBOcSuiVhNal2USKb/vB6EDJejFl5fDILvEz?= =?us-ascii?Q?yj/M+wnpU6ZC3MJBgBqcnALKzOxVnmmthxLD5voMGXGnqZ7uP4fMfmuoKCZJ?= =?us-ascii?Q?gWPx5qlq18DVnXDX9wDZ0+1XVzx4t26SuJz9RcgLXZOuvROh5J+pyeG/Dudb?= =?us-ascii?Q?DNkYMNYYBG5JEvKpi9hfEWv4u96mA+CyMuPTuqXIp0wav2pVbsPTwlMybG9N?= =?us-ascii?Q?vjT8UnuuglaRqb0Zg8Sq2UsaZGi8R3++uWy7fwmulI+A8hRcpJO8m/WLPhh7?= =?us-ascii?Q?e2bM5KXKRYMnyQXuB5w3uqzOGXRx5eMPDHvD2+8E7Am7kKoouNxqgh6aWJ4f?= =?us-ascii?Q?HpDC1kPtrXWMB2xAIAc67jBJ/L9ap1lJJUcvxqMaODyM64tL2XfgleA3GQxt?= =?us-ascii?Q?w/D7cYUfFrLE9YSUFQQnfiWOtcGd/wEnLG0xTsRBoBb3QTz+kIMu0+mneQm3?= =?us-ascii?Q?+4dGtiXwHNcActiZibb1nRQ9Jypg4OUF5irk8MSnbm/VVSDOt56uYWyLhD+C?= =?us-ascii?Q?/6FH6d6gD6mlhbT0SZS2oPr04OT3qGpcg3/V0LijF55TsKa5QeZDffqPOaH8?= =?us-ascii?Q?rh/gTlHu51QyDy7Z8v+aL9DT8ok9i3PfRJeuCa2yy1rgoxgHSOBt8w5nSXvH?= =?us-ascii?Q?LXJfTumAe89a5mzrOSUdFDGS57hEo4cf3GUVGOHQGg9FcGBJkG/wQeGMt36R?= =?us-ascii?Q?8s7fuFhLsqww+gL+hJslUBVKb0LKAcj5S378+BnM3Gi7Yo3c93PS8L9me54Y?= =?us-ascii?Q?3jzMjk+EAO+KLUvhUVMtugTfi8micocCSI3djVEKEj8h0Z0+znArNfBurfqe?= =?us-ascii?Q?cUkhHsHujEShd2BMUI+dufAFFHWu6RC1DAifAihta7TS9E6ogUuKRj8ShQ4l?= =?us-ascii?Q?/bZOKg43AoMG9qks42WFynIiGLXHG65nD0U0r0YQ1wL84grW55m9jFiOLXDT?= =?us-ascii?Q?waJsSHDarDpYQe7INZZuOpOcNvEF+c7aIP3OD6aCMa0pSGd8rtPzT8szoyjU?= =?us-ascii?Q?wYzIrOknT9xIg0u5kwTJXVLWTyf051HKNLsVXeFXDAHtv73rNwIAPV0VG4uz?= =?us-ascii?Q?6PN1xWAt5afgpViQ28GZrnZxeQmFkS6NOhwElDtyaVVzR+7Eqd0XeHiNsYhP?= =?us-ascii?Q?CjHXKvpq0yYtRwB4UR2bFmq+2OrYX8QMuChb3hT?= X-Microsoft-Antispam-Message-Info: bOnWjV/LGVWj1ezl8eNdJRZYxDO0xqqkCRnW+mdLtG3SRZBAcIsLLua1bETZMQq4lhXSqhDVn+fVFIZj8Grztjk6wruX+OYVG2D+sMshfSFnB5TE1R8G5Xlm8097QsJB/4YjIlhRYJADS0dKv9rNSVONC9tVY9BWZHPV6k6FDRiMClJLUmWKClcDkZykqjHR X-Microsoft-Exchange-Diagnostics: 1; SN6PR05MB4591; 6:J5QD0Wbl0nf0CeUvrIA8YjjKsX+cZ1v8YnueAcBI2/Q69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8s4j01KP0fYAD0v78ne58xcmUlW9/4Qi7ME/n+enCX9Hyior20xzCRLtqaxE1kjjezzIqX8LuS8LjYVw3e9JAx51IbM8GItplyKe3bZyyy937bkjDvtxONIIEaLF82NNN1IdoDYyWVlQ+g= X-MS-Office365-Filtering-Correlation-Id: 78324835-f47c-4a9f-a6f4-08d5ab4f2b69 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2018 08:24:44.5809 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 78324835-f47c-4a9f-a6f4-08d5ab4f2b69 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB4591 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: Thomas Hellstrom Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP At least since the atomic port, the vmwgfx fbdev code is taking a number of unnecessary modeset locks. In particular the kms_set_config() function will grab its own locks, leading to locking retries. So avoid drm_modeset_lock_all() and instead provide a local acquire context for kms_set_config(). Also have the vmw_kms_fbdev_init data itself grab the lock that it needs. This also fixed a long standing problem that vmw_fb_close() didn't provide an acquire context for kms_set_config(), causing potential warnings and hangs during driver unload. This problem was uncovered by the recent commit "drm/vmwgfx: Improve on hibernation" Testing done: Repeated driver load and unload on Ubuntu 16.04.2 Fixes: c3b9b1657344 ("drm/vmwgfx: Improve on hibernation") Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 31 ++++++++++--------------------- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 13 ++++++++++--- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c index 2582ffd36bb5..ba0cdb743c3e 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c @@ -441,11 +441,11 @@ static int vmwgfx_set_config_internal(struct drm_mode_set *set) struct drm_crtc *crtc = set->crtc; struct drm_framebuffer *fb; struct drm_crtc *tmp; - struct drm_modeset_acquire_ctx *ctx; struct drm_device *dev = set->crtc->dev; + struct drm_modeset_acquire_ctx ctx; int ret; - ctx = dev->mode_config.acquire_ctx; + drm_modeset_acquire_init(&ctx, 0); restart: /* @@ -458,7 +458,7 @@ static int vmwgfx_set_config_internal(struct drm_mode_set *set) fb = set->fb; - ret = crtc->funcs->set_config(set, ctx); + ret = crtc->funcs->set_config(set, &ctx); if (ret == 0) { crtc->primary->crtc = crtc; crtc->primary->fb = fb; @@ -473,20 +473,13 @@ static int vmwgfx_set_config_internal(struct drm_mode_set *set) } if (ret == -EDEADLK) { - dev->mode_config.acquire_ctx = NULL; - -retry_locking: - drm_modeset_backoff(ctx); - - ret = drm_modeset_lock_all_ctx(dev, ctx); - if (ret) - goto retry_locking; - - dev->mode_config.acquire_ctx = ctx; - + drm_modeset_backoff(&ctx); goto restart; } + drm_modeset_drop_locks(&ctx); + drm_modeset_acquire_fini(&ctx); + return ret; } @@ -624,7 +617,6 @@ static int vmw_fb_set_par(struct fb_info *info) } mutex_lock(&par->bo_mutex); - drm_modeset_lock_all(vmw_priv->dev); ret = vmw_fb_kms_framebuffer(info); if (ret) goto out_unlock; @@ -657,7 +649,6 @@ static int vmw_fb_set_par(struct fb_info *info) drm_mode_destroy(vmw_priv->dev, old_mode); par->set_mode = mode; - drm_modeset_unlock_all(vmw_priv->dev); mutex_unlock(&par->bo_mutex); return ret; @@ -713,18 +704,14 @@ int vmw_fb_init(struct vmw_private *vmw_priv) par->max_width = fb_width; par->max_height = fb_height; - drm_modeset_lock_all(vmw_priv->dev); ret = vmw_kms_fbdev_init_data(vmw_priv, 0, par->max_width, par->max_height, &par->con, &par->crtc, &init_mode); - if (ret) { - drm_modeset_unlock_all(vmw_priv->dev); + if (ret) goto err_kms; - } info->var.xres = init_mode->hdisplay; info->var.yres = init_mode->vdisplay; - drm_modeset_unlock_all(vmw_priv->dev); /* * Create buffers and alloc memory @@ -832,7 +819,9 @@ int vmw_fb_close(struct vmw_private *vmw_priv) cancel_delayed_work_sync(&par->local_work); unregister_framebuffer(info); + mutex_lock(&par->bo_mutex); (void) vmw_fb_kms_detach(par, true, true); + mutex_unlock(&par->bo_mutex); vfree(par->vmalloc); framebuffer_release(info); diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index f11601b6fd74..aacc9307ab0b 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -2680,7 +2680,9 @@ int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv, struct vmw_display_unit *du; struct drm_display_mode *mode; int i = 0; + int ret = 0; + mutex_lock(&dev_priv->dev->mode_config.mutex); list_for_each_entry(con, &dev_priv->dev->mode_config.connector_list, head) { if (i == unit) @@ -2691,7 +2693,8 @@ int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv, if (i != unit) { DRM_ERROR("Could not find initial display unit.\n"); - return -EINVAL; + ret = -EINVAL; + goto out_unlock; } if (list_empty(&con->modes)) @@ -2699,7 +2702,8 @@ int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv, if (list_empty(&con->modes)) { DRM_ERROR("Could not find initial display mode.\n"); - return -EINVAL; + ret = -EINVAL; + goto out_unlock; } du = vmw_connector_to_du(con); @@ -2720,7 +2724,10 @@ int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv, head); } - return 0; + out_unlock: + mutex_unlock(&dev_priv->dev->mode_config.mutex); + + return ret; } /**