From patchwork Tue Apr 2 09:04:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 10881249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 298C515AC for ; Tue, 2 Apr 2019 09:05:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1706A28754 for ; Tue, 2 Apr 2019 09:05:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AE3B2876C; Tue, 2 Apr 2019 09:05:11 +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.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 B634528754 for ; Tue, 2 Apr 2019 09:05:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 680646E74C; Tue, 2 Apr 2019 09:05:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 369D06E332 for ; Tue, 2 Apr 2019 09:05:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AEA038AE41; Tue, 2 Apr 2019 09:05:03 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-22.ams2.redhat.com [10.36.116.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B08F6155F; Tue, 2 Apr 2019 09:05:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A3038A1E0; Tue, 2 Apr 2019 11:04:59 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/bochs: drop mode_config_initialized Date: Tue, 2 Apr 2019 11:04:58 +0200 Message-Id: <20190402090459.12126-2-kraxel@redhat.com> In-Reply-To: <20190402090459.12126-1-kraxel@redhat.com> References: <20190402090459.12126-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 02 Apr 2019 09:05:03 +0000 (UTC) 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: David Airlie , open list , Gerd Hoffmann , "open list:DRM DRIVER FOR BOCHS VIRTUAL GPU" MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/bochs/bochs_kms.c | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs.h b/drivers/gpu/drm/bochs/bochs.h index 03711394f1ed..a7f6723bebdd 100644 --- a/drivers/gpu/drm/bochs/bochs.h +++ b/drivers/gpu/drm/bochs/bochs.h @@ -73,7 +73,6 @@ struct bochs_device { struct drm_crtc crtc; struct drm_encoder encoder; struct drm_connector connector; - bool mode_config_initialized; /* ttm */ struct { diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 93cb27f93d39..485f9cf05e8b 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -267,7 +267,6 @@ const struct drm_mode_config_funcs bochs_mode_funcs = { int bochs_kms_init(struct bochs_device *bochs) { drm_mode_config_init(bochs->dev); - bochs->mode_config_initialized = true; bochs->dev->mode_config.max_width = 8192; bochs->dev->mode_config.max_height = 8192; @@ -292,9 +291,6 @@ int bochs_kms_init(struct bochs_device *bochs) void bochs_kms_fini(struct bochs_device *bochs) { - if (bochs->mode_config_initialized) { - drm_atomic_helper_shutdown(bochs->dev); - drm_mode_config_cleanup(bochs->dev); - bochs->mode_config_initialized = false; - } + drm_atomic_helper_shutdown(bochs->dev); + drm_mode_config_cleanup(bochs->dev); } From patchwork Tue Apr 2 09:04:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 10881247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7B5BD15AC for ; Tue, 2 Apr 2019 09:05:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67D1C28754 for ; Tue, 2 Apr 2019 09:05:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B9FD2876C; Tue, 2 Apr 2019 09:05:09 +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.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 1D5A028754 for ; Tue, 2 Apr 2019 09:05:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A8B16E332; Tue, 2 Apr 2019 09:05:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E7446E74C for ; Tue, 2 Apr 2019 09:05:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D29E13087934; Tue, 2 Apr 2019 09:05:03 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-22.ams2.redhat.com [10.36.116.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B4336402D; Tue, 2 Apr 2019 09:05:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C1B99A1E3; Tue, 2 Apr 2019 11:04:59 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/cirrus: drop mode_info.mode_config_initialized Date: Tue, 2 Apr 2019 11:04:59 +0200 Message-Id: <20190402090459.12126-3-kraxel@redhat.com> In-Reply-To: <20190402090459.12126-1-kraxel@redhat.com> References: <20190402090459.12126-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 02 Apr 2019 09:05:03 +0000 (UTC) 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: David Airlie , open list , "open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE" , Gerd Hoffmann , Dave Airlie MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/cirrus/cirrus_drv.h | 1 - drivers/gpu/drm/cirrus/cirrus_mode.c | 9 ++------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.h b/drivers/gpu/drm/cirrus/cirrus_drv.h index 915709739257..828b150cdb20 100644 --- a/drivers/gpu/drm/cirrus/cirrus_drv.h +++ b/drivers/gpu/drm/cirrus/cirrus_drv.h @@ -101,7 +101,6 @@ struct cirrus_crtc { struct cirrus_fbdev; struct cirrus_mode_info { - bool mode_config_initialized; struct cirrus_crtc *crtc; /* pointer to fbdev info structure */ struct cirrus_fbdev *gfbdev; diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c index 32ce2c1040b4..b109cd71426f 100644 --- a/drivers/gpu/drm/cirrus/cirrus_mode.c +++ b/drivers/gpu/drm/cirrus/cirrus_mode.c @@ -575,7 +575,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev) int ret; drm_mode_config_init(cdev->dev); - cdev->mode_info.mode_config_initialized = true; cdev->dev->mode_config.max_width = CIRRUS_MAX_FB_WIDTH; cdev->dev->mode_config.max_height = CIRRUS_MAX_FB_HEIGHT; @@ -613,10 +612,6 @@ int cirrus_modeset_init(struct cirrus_device *cdev) void cirrus_modeset_fini(struct cirrus_device *cdev) { cirrus_fbdev_fini(cdev); - - if (cdev->mode_info.mode_config_initialized) { - drm_helper_force_disable_all(cdev->dev); - drm_mode_config_cleanup(cdev->dev); - cdev->mode_info.mode_config_initialized = false; - } + drm_helper_force_disable_all(cdev->dev); + drm_mode_config_cleanup(cdev->dev); }