From patchwork Thu Jun 28 18:28:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10494713 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.web.codeaurora.org (Postfix) with ESMTP id 46F5760325 for ; Thu, 28 Jun 2018 18:29:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C3622A762 for ; Thu, 28 Jun 2018 18:29:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 408792A780; Thu, 28 Jun 2018 18:29:26 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 E1A492A762 for ; Thu, 28 Jun 2018 18:29:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030486AbeF1S3T (ORCPT ); Thu, 28 Jun 2018 14:29:19 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:33252 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030475AbeF1S3N (ORCPT ); Thu, 28 Jun 2018 14:29:13 -0400 Received: by mail-yb0-f196.google.com with SMTP id e84-v6so2387112ybb.0 for ; Thu, 28 Jun 2018 11:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VPQph8l988fTtTlQnZaJqyGWLquADgEF98OLUY6GpkI=; b=oGn4BmTmfwXl2oAMBYu3wxFmlDMe/TX4DWvPUczSKF9OMow1FpduO55TTln6X3JPrP CuHSJNxRmgMtRRD0Fv0qPypWIb1bOsICFkjw+mOnUMpjSPZQtTnUy59GkMEpy1Y95zMe i4BL+2fzjSiOuzp8v6A7Sgo9NrdOGz/4K6IiI= 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; bh=VPQph8l988fTtTlQnZaJqyGWLquADgEF98OLUY6GpkI=; b=gx63cyE/w/y+Kg3eSQ2ax6BZFxbkeE5RNOSu6x/BYhguaiw8GKSSs60czC09nKCYRq o0qJBRP04SU5BZb9djSQ3r8/OLqiFD8JEatZhLGdyvFQmbD3ADrO9pDS0mgmnq0RbBY1 KkGYjq1QrmvTtUnisg3JWJOO44tBEu6AOBjAfrlM26omMCFd1c9ULz7bC+aG53Nphxwv lduDNnFKFISLTqvHsZcSA2dNj8QGDFm1bv8lCw3UAXzJjFKzxltqiNfv9aMV8r1zwdB2 1XkwH1LPekaE/ZiP0Oa6CiDEJ5bOAGudRgz5GP2mzccqHa4zL+ei/A5MO7Wk4abqKQKj bXFQ== X-Gm-Message-State: APt69E3mgVqIfrj8SFrGG2kUSl1FIgXNdn4c5EDLjKZq27UeJmotd+ut BZah0QmJSFGTIS9+f5UaUuEsKA== X-Google-Smtp-Source: AAOMgpd9Bx8stitA9cbH8lXC+DQDvYCmin/gK5ocoAHnQ04SWQ9BX3qysMTtLZISj2BGEHIo6UHYMQ== X-Received: by 2002:a25:be0f:: with SMTP id h15-v6mr3634664ybk.309.1530210552630; Thu, 28 Jun 2018 11:29:12 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id g145-v6sm2732140ywe.17.2018.06.28.11.29.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 11:29:11 -0700 (PDT) From: Sean Paul To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: robdclark@gmail.com, hoegsberg@chromium.org, jsanka@codeaurora.org, abhinavk@codeaurora.org, Sean Paul Subject: [DPU PATCH 05/15] drm/msm: More cleanup in msm_drv Date: Thu, 28 Jun 2018 14:28:56 -0400 Message-Id: <20180628182906.84926-6-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.rc2.346.g013aa6912e-goog In-Reply-To: <20180628182906.84926-1-seanpaul@chromium.org> References: <20180628182906.84926-1-seanpaul@chromium.org> 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 Revert the component_bind function back to upstream. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/msm_drv.c | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 561617db7338..5181f997f071 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -380,26 +380,6 @@ static int msm_init_vram(struct drm_device *dev) return ret; } -#ifdef CONFIG_OF -static int msm_component_bind_all(struct device *dev, - struct drm_device *drm_dev) -{ - int ret; - - ret = component_bind_all(dev, drm_dev); - if (ret) - DRM_ERROR("component_bind_all failed: %d\n", ret); - - return ret; -} -#else -static int msm_component_bind_all(struct device *dev, - struct drm_device *drm_dev) -{ - return 0; -} -#endif - static int msm_drm_init(struct device *dev, struct drm_driver *drv) { struct platform_device *pdev = to_platform_device(dev); @@ -455,16 +435,16 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) drm_mode_config_init(ddev); - msm_gem_shrinker_init(ddev); + /* Bind all our sub-components: */ + ret = component_bind_all(dev, ddev); + if (ret) + goto bind_fail; ret = msm_init_vram(ddev); if (ret) goto fail; - /* Bind all our sub-components: */ - ret = msm_component_bind_all(dev, ddev); - if (ret) - goto bind_fail; + msm_gem_shrinker_init(ddev); switch (get_mdp_ver(pdev)) { case KMS_MDP4: