From patchwork Wed Jun 1 22:06:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9148541 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 429F460467 for ; Wed, 1 Jun 2016 22:08:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35A7E2040D for ; Wed, 1 Jun 2016 22:08:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A743265F9; Wed, 1 Jun 2016 22:08: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=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E79E12040D for ; Wed, 1 Jun 2016 22:08:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 908D16EAAA; Wed, 1 Jun 2016 22:07:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE21A6EAB5 for ; Wed, 1 Jun 2016 22:07:49 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id a136so10669596wme.0 for ; Wed, 01 Jun 2016 15:07:49 -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=CerWgFH5v6N4xNn9aID4AOkzamxAbdAx6DgtWHBT8u8=; b=B0ftv1kzV9GW4o1TFNAD/O22h/YCnXQgLGbGbG4rkDOQstCLWPdYCHYp/tvv2i45Rt +N518KSb16LBsrN3qBVXXXHJAphkF+iKNzsUwhu1i9xdQZvKP1kmJZi35B4onjth9r69 CiILntjW0qu0tHFIZ8IkGTHpmiFJZkn7y9f0w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CerWgFH5v6N4xNn9aID4AOkzamxAbdAx6DgtWHBT8u8=; b=RscKOxutI+nsPl7MnYYQm0G9EzaOr/K9YrPb3arjLOfFQ/PMxLtelvuFawDsHTylSb 9DuRirGz7nbsFa+j7AvW3FVTb3lc5re2RE7CzOLDY1fXLj+In1G2DTgJPSE29XlZbKIT 4pdjxm2JvlJ6bTP4pQLnJH6UuWjOoC2eVG+e/s67e+vqvOIsjhJII6EWaqWPGEX8LfoA 8EJglrz0AS/hzXaXAv14Id5eqqdOwC1g+qsoyNhD4FaKFpGIophBqDP9foKsZhl2q9C0 xGiCMpt1fdIP+MVc1rjsSKwP6SyDXEyn0bkjQ4e3QRAspjafCZydWRd4wDgchIFJAJfr R/6A== X-Gm-Message-State: ALyK8tJ87LJezR+2KmdEV4WuJDrfBEOChruRbxCQ+5fUOrga+xrcfc+TFZo8u1SWwkSNPA== X-Received: by 10.28.111.29 with SMTP id k29mr1303743wmc.58.1464818868080; Wed, 01 Jun 2016 15:07:48 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:56b5:0:ac27:b86c:7764:9429]) by smtp.gmail.com with ESMTPSA id lf7sm1571508wjb.23.2016.06.01.15.07.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jun 2016 15:07:47 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 30/38] drm/rockchip: Disarm vop->is_enabled Date: Thu, 2 Jun 2016 00:06:53 +0200 Message-Id: <1464818821-5736-31-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1464818821-5736-1-git-send-email-daniel.vetter@ffwll.ch> References: <1464818821-5736-1-git-send-email-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , Intel Graphics Development , Tomeu Vizoso 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 With atomic helpers there's no need to track the enabled state of a pipe any more, because atomic helpers track this accurately already. Just disable the early returns, since the debug checks might be useful. v2: Don't call drm_helper_disable_unused_functions, it blows up without this check. At least explains why rockchip still needed this old legacy-style state tracing - to work around issues from calling other legacy style functions! Cc: Tomeu Vizoso Cc: Mark yao Tested-by: Tomeu Vizoso Reviewed-by: Tomeu Vizoso Signed-off-by: Daniel Vetter --- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 3 --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 ------ 2 files changed, 9 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c index f261512bb4a0..245a567f7b8c 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c @@ -156,9 +156,6 @@ int rockchip_drm_fbdev_init(struct drm_device *dev) goto err_drm_fb_helper_fini; } - /* disable all the possible outputs/crtcs before entering KMS mode */ - drm_helper_disable_unused_functions(dev); - ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP); if (ret < 0) { dev_err(dev->dev, "Failed to set initial hw config - %d.\n", diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 5567fb43e674..957a6b4917c8 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -431,9 +431,6 @@ static void vop_enable(struct drm_crtc *crtc) struct vop *vop = to_vop(crtc); int ret; - if (vop->is_enabled) - return; - ret = pm_runtime_get_sync(vop->dev); if (ret < 0) { dev_err(vop->dev, "failed to get pm runtime: %d\n", ret); @@ -501,9 +498,6 @@ static void vop_crtc_disable(struct drm_crtc *crtc) struct vop *vop = to_vop(crtc); int i; - if (!vop->is_enabled) - return; - /* * We need to make sure that all windows are disabled before we * disable that crtc. Otherwise we might try to scan from a destroyed