From patchwork Wed Jan 17 21:55:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10172691 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 C64E160230 for ; Thu, 18 Jan 2018 09:51:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7FEA20415 for ; Thu, 18 Jan 2018 09:51:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8EA620881; Thu, 18 Jan 2018 09:51:31 +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 1FD8920950 for ; Thu, 18 Jan 2018 09:51:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FD086E5BC; Thu, 18 Jan 2018 09:42:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from galahad.ideasonboard.com (galahad.ideasonboard.com [185.26.127.97]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDF3C6E3A1 for ; Wed, 17 Jan 2018 21:55:43 +0000 (UTC) Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 105452118E; Wed, 17 Jan 2018 22:54:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1516226085; bh=CKRvHSr/CBNKgtgOP+gsgTVTTlwUYy7FKSrJy+MvCgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RoGI3up+plImCw3IEYS2l6DYsWAn3ZQrPO4Hs3jq+mv8GuvD2TU4kdKl9Cx9pbdM7 uvXCZVBF+Bus9tqK+Ya7j9eZ3wiCl3ruaVphwFLOIUtr9FTW5NG6QE1jILYj2rf9tM pQG7NP/w1C46Xq/8Y7LBKYwjyXYNlwwFVCb2W7yU= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH 11/12] drm: vc4: Use drm_atomic_helper_shutdown() to disable planes on removal Date: Wed, 17 Jan 2018 23:55:34 +0200 Message-Id: <20180117215535.16517-12-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180117215535.16517-1-laurent.pinchart+renesas@ideasonboard.com> References: <20180117215535.16517-1-laurent.pinchart+renesas@ideasonboard.com> 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 The plane cleanup handler currently calls drm_plane_helper_disable(), which is a legacy helper function. Replace it with a call to drm_atomic_helper_shutdown() at removal time. The plane .destroy() handler now consisting only of a call to drm_plane_cleanup(), replace it with direct calls to that function. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/msm/Kconfig | 1 - drivers/gpu/drm/vc4/Kconfig | 1 - drivers/gpu/drm/vc4/vc4_drv.c | 3 +++ drivers/gpu/drm/vc4/vc4_plane.c | 8 +------- drivers/gpu/drm/zte/Kconfig | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index 99d39b2aefa6..d6b0685ca129 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -2,7 +2,6 @@ config DRM_MSM tristate "MSM DRM" depends on DRM - depends on ARCH_QCOM || (ARM && COMPILE_TEST) depends on OF && COMMON_CLK depends on MMU select QCOM_MDT_LOADER if ARCH_QCOM diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig index fdae18aeab4f..412d7a06f0db 100644 --- a/drivers/gpu/drm/vc4/Kconfig +++ b/drivers/gpu/drm/vc4/Kconfig @@ -1,6 +1,5 @@ config DRM_VC4 tristate "Broadcom VC4 Graphics" - depends on ARCH_BCM || ARCH_BCM2835 || COMPILE_TEST depends on DRM depends on SND && SND_SOC depends on COMMON_CLK diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index ceb385fd69c5..ed2c1c233c39 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -299,6 +300,8 @@ static void vc4_drm_unbind(struct device *dev) drm_fb_cma_fbdev_fini(drm); + drm_atomic_helper_shutdown(drm); + drm_mode_config_cleanup(drm); drm_dev_unref(drm); diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 515f97997624..9fcc55078ff7 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -825,12 +825,6 @@ static const struct drm_plane_helper_funcs vc4_plane_helper_funcs = { .cleanup_fb = vc4_cleanup_fb, }; -static void vc4_plane_destroy(struct drm_plane *plane) -{ - drm_plane_helper_disable(plane); - drm_plane_cleanup(plane); -} - /* Implements immediate (non-vblank-synced) updates of the cursor * position, or falls back to the atomic helper otherwise. */ @@ -910,7 +904,7 @@ vc4_update_plane(struct drm_plane *plane, static const struct drm_plane_funcs vc4_plane_funcs = { .update_plane = vc4_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .destroy = vc4_plane_destroy, + .destroy = drm_plane_cleanup, .set_property = NULL, .reset = vc4_plane_reset, .atomic_duplicate_state = vc4_plane_duplicate_state, diff --git a/drivers/gpu/drm/zte/Kconfig b/drivers/gpu/drm/zte/Kconfig index 5b36421ef3e5..76d63bcc5c3a 100644 --- a/drivers/gpu/drm/zte/Kconfig +++ b/drivers/gpu/drm/zte/Kconfig @@ -1,6 +1,6 @@ config DRM_ZTE tristate "DRM Support for ZTE SoCs" - depends on DRM && ARCH_ZX + depends on DRM select DRM_KMS_CMA_HELPER select DRM_KMS_FB_HELPER select DRM_KMS_HELPER