From patchwork Wed Oct 3 09:16:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10624471 X-Patchwork-Delegate: agross@codeaurora.org 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 C7842174A for ; Wed, 3 Oct 2018 09:17:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC7F62871B for ; Wed, 3 Oct 2018 09:17:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B00792871E; Wed, 3 Oct 2018 09:17:00 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A85C2871B for ; Wed, 3 Oct 2018 09:17:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727546AbeJCQEa (ORCPT ); Wed, 3 Oct 2018 12:04:30 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:41207 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727188AbeJCQEa (ORCPT ); Wed, 3 Oct 2018 12:04:30 -0400 Received: by mail-ed1-f65.google.com with SMTP id f38-v6so4654202edd.8 for ; Wed, 03 Oct 2018 02:16:58 -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 :mime-version:content-transfer-encoding; bh=Rp43N66gidsG3kSDGbBdAfsgE88KFlMQD6+IuFUaYpw=; b=GjSyREFVBeHshDXn32hvfNRYMjfptWLMKNEl8Moz8Dc0iPxw6Ss1gbVDCckvoiWC3k fOk8UT+VP9b5RLyc8O8PsMV2zjr3AaOEn0VzYhh9e8zlYhmKMWarSR8YzAIipbmpMAUl jFyvVP7MD1Wfo9YTMlo6WcJDCMZePyi9zjK4c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rp43N66gidsG3kSDGbBdAfsgE88KFlMQD6+IuFUaYpw=; b=mb24EOpYZJ9JDFRqliba/STGexWEYse7eyUcdjTpvKNr+OIrkyU9b1whqhQpIgSXcC ovUaeHWLDFydv1ybGFEgircp4nGpzLJKVtepAehsdNjTv7XVhEOhyf1WLvnXZ9ZMqyAP OLxglMF87Pl9nQfUPkAXGwcZJXYkTVSodLR9J4HIEqbjB/BFik3aY8Wtp5CkMQGcKj4p cQmEpPlw+KkymXAd1O6EIEOGZzHU/OkSVXuBIz4u19AWeR29m1/x7Jn6RXOW2RAoI2l2 4/yHbWtgvlAsKSpKH4FgfJ18VTuIGL2dUXj61knkgdZE/C6QwuEpe8UlQpqy5ATCTvyV 79VA== X-Gm-Message-State: ABuFfohl70S+cix0FxBJ9EBPzXvcgQBTTx9OzbzBjz++Rn64pKzZ8znR iWR8JxqIdXLSmXu0ZdfsC+aLSA== X-Google-Smtp-Source: ACcGV61+KNkarArjAwTb/6bdjtcDJOppcR9NAjJU9hrrBR2RyWZufrqln6gfSaY4T8Lf9W8c66KFHA== X-Received: by 2002:aa7:c2cd:: with SMTP id m13-v6mr1154629edp.79.1538558217582; Wed, 03 Oct 2018 02:16:57 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id a27-v6sm365688edc.46.2018.10.03.02.16.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 02:16:56 -0700 (PDT) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , Daniel Vetter , Rob Clark , Rajesh Yadav , Chandan Uddaraju , Archit Taneja , Jeykumar Sankaran , Sean Paul , Maarten Lankhorst , Sinclair Yeh , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Russell King , Gustavo Padovan , Arnd Bergmann , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Subject: [PATCH 11/18] drm/msm: Use drm_atomic_helper_shutdown Date: Wed, 3 Oct 2018 11:16:44 +0200 Message-Id: <20181003091651.25064-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.19.0.rc2 In-Reply-To: <20181002133526.13685-1-daniel.vetter@ffwll.ch> References: <20181002133526.13685-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drm_plane_helper_disable is a non-atomic drivers only function, and will blow up (since no one passes the locking context it needs). Atomic drivers which want to quiescent their hw on unload should use drm_atomic_helper_shutdown() instead. Signed-off-by: Daniel Vetter Cc: Rob Clark Cc: Rajesh Yadav Cc: Chandan Uddaraju Cc: Archit Taneja Cc: Jeykumar Sankaran Cc: Sean Paul Cc: Maarten Lankhorst Cc: Sinclair Yeh Cc: "Ville Syrjälä" Cc: Russell King Cc: Gustavo Padovan Cc: Arnd Bergmann Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 -- drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 1 - drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 1 - drivers/gpu/drm/msm/msm_drv.c | 1 + 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index 015341e2dd4c..ec959f847d5f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -1482,8 +1482,6 @@ static void dpu_plane_destroy(struct drm_plane *plane) mutex_destroy(&pdpu->lock); - drm_plane_helper_disable(plane, NULL); - /* this will destroy the states as well */ drm_plane_cleanup(plane); diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c index 79ff653d8081..7a499731ce93 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c @@ -68,7 +68,6 @@ static void mdp4_plane_destroy(struct drm_plane *plane) { struct mdp4_plane *mdp4_plane = to_mdp4_plane(plane); - drm_plane_helper_disable(plane, NULL); drm_plane_cleanup(plane); kfree(mdp4_plane); diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c index 7d306c5acd09..d5e4f0de321a 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c @@ -46,7 +46,6 @@ static void mdp5_plane_destroy(struct drm_plane *plane) { struct mdp5_plane *mdp5_plane = to_mdp5_plane(plane); - drm_plane_helper_disable(plane, NULL); drm_plane_cleanup(plane); kfree(mdp5_plane); diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index c1abad8a8612..69dbdba183fe 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -312,6 +312,7 @@ static int msm_drm_uninit(struct device *dev) if (fbdev && priv->fbdev) msm_fbdev_free(ddev); #endif + drm_atomic_helper_shutdown(ddev); drm_mode_config_cleanup(ddev); pm_runtime_get_sync(dev);