Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp193517imu; Thu, 10 Jan 2019 21:44:06 -0800 (PST) X-Google-Smtp-Source: ALg8bN6PDIdqavIlTYhxqSJXXEk5dXesLHolbapgc4rCklaGQODmfN+G0YkcIRJQ75EHdt/r8fMK X-Received: by 2002:a62:5fc4:: with SMTP id t187mr13323112pfb.66.1547185446199; Thu, 10 Jan 2019 21:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547185446; cv=none; d=google.com; s=arc-20160816; b=h3ZwsyqHriQCLSt3J9yOrPnZFqaUCxn12RdPY94kUIjqDe2itnGzx6eU9AuPbrheEe UmG0Hgb0CcfhQo8sZFsF2VPCS2UWO8YEMgEFjmvKUes+drDeIoGHgQWERTGyXnbzgBRc aXjg9lTzm0nBgrSGOTWaOX+YBHsgKJU3aTcrMKYEt8Ze51w3Xf5sEJDyjD7offe+JGGg c5kIvspct8mB5cSAOZOhtWiNtWnhsk03yADunV47trQJwzPddB2xESa027NGzbYWPiFa 4mO47210OmEzjC11y4caJ6oRC3VvywjLf1sT4iR7xkPtggbpPiMYxh+2OSDeErZ0L92w Q5oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=d2HkUhrm2tGm1KDGdAv39S5/KBBjY6Ypax4VrBqqmEY=; b=NQL30pZfar8RIwD+Zzlv7cGmF0P4Xo23HDlGItqhYK+NvVeN1uzq0lcDqO5/gyjYxJ hlRMnjT1QYvM6AjJsjIjhh26Ab4dEY9PbuQYs1Gmfl9qse+Og6Q9wQGpdt7BAaxjZurv 2xyCDuQByRyMmMvaW1dflMZ2oGVqTqdMim64+gyrTDahE2mYNIsy/TXqOcUKeP0Ro4iL QwXai1TREOvbhEKu2SjzL8kQTUJw0T5ioSIZt4oo098St8C1qxHmTYRhd8Wb6u5OzsDV RE3zdzlRaSTucbqhrDdK4/rutM1bLzShz7CoOOlgMNiOu1HeIjoWMGtx2EU2P5KHHPY/ PpCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si3917161pfj.276.2019.01.10.21.43.51; Thu, 10 Jan 2019 21:44:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730799AbfAKFi4 (ORCPT + 99 others); Fri, 11 Jan 2019 00:38:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60026 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730093AbfAKFiA (ORCPT ); Fri, 11 Jan 2019 00:38:00 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 470A05277D; Fri, 11 Jan 2019 05:38:00 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-203.ams2.redhat.com [10.36.116.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8FAB1019630; Fri, 11 Jan 2019 05:37:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A70189AB2; Fri, 11 Jan 2019 06:37:53 +0100 (CET) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org, David Airlie Cc: andr2000@gmail.com, noralf@tronnes.org, Gerd Hoffmann , David Airlie , virtualization@lists.linux-foundation.org (open list:DRM DRIVER FOR BOCHS VIRTUAL GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v4 08/16] drm/bochs: atomic: use suspend/resume helpers Date: Fri, 11 Jan 2019 06:37:44 +0100 Message-Id: <20190111053752.4004-9-kraxel@redhat.com> In-Reply-To: <20190111053752.4004-1-kraxel@redhat.com> References: <20190111053752.4004-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 11 Jan 2019 05:38:00 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch to atomic helpers: drm_mode_config_helper_suspend/resume(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_drv.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index f3dd66ae99..08ba6029d2 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b/drivers/gpu/drm/bochs/bochs_drv.c @@ -103,11 +103,8 @@ static int bochs_pm_suspend(struct device *dev) struct drm_device *drm_dev = pci_get_drvdata(pdev); struct bochs_device *bochs = drm_dev->dev_private; - drm_kms_helper_poll_disable(drm_dev); - drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 1); - - return 0; + return drm_mode_config_helper_suspend(drm_dev); } static int bochs_pm_resume(struct device *dev) @@ -116,12 +113,8 @@ static int bochs_pm_resume(struct device *dev) struct drm_device *drm_dev = pci_get_drvdata(pdev); struct bochs_device *bochs = drm_dev->dev_private; - drm_helper_resume_force_mode(drm_dev); - drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 0); - - drm_kms_helper_poll_enable(drm_dev); - return 0; + return drm_mode_config_helper_resume(drm_dev); } #endif -- 2.9.3