From patchwork Thu Jun 28 18:28:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10494717 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 2FB7060325 for ; Thu, 28 Jun 2018 18:29:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33CE62A77C for ; Thu, 28 Jun 2018 18:29:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27DCD2A782; Thu, 28 Jun 2018 18:29:28 +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 90C022A780 for ; Thu, 28 Jun 2018 18:29:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966642AbeF1S30 (ORCPT ); Thu, 28 Jun 2018 14:29:26 -0400 Received: from mail-yb0-f193.google.com ([209.85.213.193]:36995 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967798AbeF1S3P (ORCPT ); Thu, 28 Jun 2018 14:29:15 -0400 Received: by mail-yb0-f193.google.com with SMTP id r3-v6so2380569ybo.4 for ; Thu, 28 Jun 2018 11:29:15 -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=hGViVgDMVA/+V/YSeILRYRw2akec/c/x+WMTdY/LAIE=; b=C3Vz3meyBCoCoKYg/eh3aD3yngzMtECIBP2GRN60UHRa1tL+ICFn0Vy45eW0VU7RJm kALJAYGHMAfaUASET0olE7wUr0hwNuTLSVHiA1JUuEz63OzTXZXrO84n8kR+QEo1F9+p quuAfXrhm190nzHvcBTbBrQBhByicwPs99cjg= 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=hGViVgDMVA/+V/YSeILRYRw2akec/c/x+WMTdY/LAIE=; b=smZ8c7H3DwNtrddrZO34xrjj9UOgxFULMTvi79yh1D/w4OgwB4rHN3kGkW/FAF8Ng4 ANZE0IO0arRTZLsALJrf+SvUsmstd+jAb+QCl3EreaCmOaI3Q0XBZ4XvZ0mcvr9WSbWm VqCIkLyzcANWzCz90kUjZwvSHg02bzSHkFmtnKvnPHEOaj57T8+ekPp2oiTZbaXZNs8F QfNhZSiizTdzbicQsN8aBdTN2c6H7cTNymynEl0XRhQeJLgsDbPNxskmlCr4YHZuOarU qpPuoR7FiWRZl0hRou7xd7LYYW0YWIy5aNXxcTKhVU4BE9S7CRV/n6TwS9trj7CLdIaW yccQ== X-Gm-Message-State: APt69E0VCLArJLYlcFW3+XuEdDxinr3nXt+ojX1cO4yt+Es2oHrvqwSj QYFJUzAljtCUcts56f/0m4B4ZQ== X-Google-Smtp-Source: ADUXVKK/TWfJirZpCW4Rqap+2E1x5bqf/V4SBkYaRNVDUwIFLbpWHSJ2rW1kRrFzCGjcm8hq8FJL/Q== X-Received: by 2002:a25:cc97:: with SMTP id l145-v6mr5804087ybf.334.1530210555375; Thu, 28 Jun 2018 11:29:15 -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.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 11:29:14 -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 08/15] drm/msm: dpu: Do debugfs init in the debugfs_init() hook Date: Thu, 28 Jun 2018 14:28:59 -0400 Message-Id: <20180628182906.84926-9-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 This allows us to remove postinit, which was added with dpu support. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 13 ++++++------- drivers/gpu/drm/msm/msm_drv.c | 9 --------- drivers/gpu/drm/msm/msm_kms.h | 1 - 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 61eecae15ab3..1f2163430caf 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -323,11 +323,6 @@ static void _dpu_debugfs_destroy(struct dpu_kms *dpu_kms) } } #else -static int _dpu_debugfs_init(struct dpu_kms *dpu_kms) -{ - return 0; -} - static void _dpu_debugfs_destroy(struct dpu_kms *dpu_kms) { } @@ -991,7 +986,8 @@ void dpu_kms_fbo_unreference(struct dpu_kms_fbo *fbo) } } -static int dpu_kms_postinit(struct msm_kms *kms) +#ifdef CONFIG_DEBUG_FS +static int dpu_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor) { struct dpu_kms *dpu_kms = to_dpu_kms(kms); struct drm_device *dev; @@ -1010,6 +1006,7 @@ static int dpu_kms_postinit(struct msm_kms *kms) return rc; } +#endif static long dpu_kms_round_pixclk(struct msm_kms *kms, unsigned long rate, struct drm_encoder *encoder) @@ -1289,7 +1286,6 @@ void _dpu_kms_set_encoder_mode(struct msm_kms *kms, static const struct msm_kms_funcs kms_funcs = { .hw_init = dpu_kms_hw_init, - .postinit = dpu_kms_postinit, .irq_preinstall = dpu_irq_preinstall, .irq_postinstall = dpu_irq_postinstall, .irq_uninstall = dpu_irq_uninstall, @@ -1311,6 +1307,9 @@ static const struct msm_kms_funcs kms_funcs = { .destroy = dpu_kms_destroy, .get_address_space = _dpu_kms_get_address_space, .set_encoder_mode = _dpu_kms_set_encoder_mode, +#ifdef CONFIG_DEBUG_FS + .debugfs_init = dpu_kms_debugfs_init, +#endif }; /* the caller api needs to turn on clock before calling it */ diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index bcd001603768..1e8d67381b5a 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -593,15 +593,6 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) if (ret) goto fail; - /* perform subdriver post initialization */ - if (kms && kms->funcs && kms->funcs->postinit) { - ret = kms->funcs->postinit(kms); - if (ret) { - pr_err("kms post init failed: %d\n", ret); - goto fail; - } - } - drm_kms_helper_poll_init(ddev); return 0; diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h index 3a583ee2f27a..2f1c9702b820 100644 --- a/drivers/gpu/drm/msm/msm_kms.h +++ b/drivers/gpu/drm/msm/msm_kms.h @@ -34,7 +34,6 @@ struct msm_kms_funcs { /* hw initialization: */ int (*hw_init)(struct msm_kms *kms); - int (*postinit)(struct msm_kms *kms); /* irq handling: */ void (*irq_preinstall)(struct msm_kms *kms); int (*irq_postinstall)(struct msm_kms *kms);