From patchwork Fri Nov 16 18:42:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10686793 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 9AB5D17DE for ; Fri, 16 Nov 2018 18:43:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D4B12D83D for ; Fri, 16 Nov 2018 18:43:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81AB12D812; Fri, 16 Nov 2018 18:43:02 +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 173D72D83F for ; Fri, 16 Nov 2018 18:43:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390397AbeKQE4c (ORCPT ); Fri, 16 Nov 2018 23:56:32 -0500 Received: from mail-yw1-f67.google.com ([209.85.161.67]:43925 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728039AbeKQE4c (ORCPT ); Fri, 16 Nov 2018 23:56:32 -0500 Received: by mail-yw1-f67.google.com with SMTP id l200so4897202ywe.10 for ; Fri, 16 Nov 2018 10:43:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TRpW+15tiHfdg+auCA9tYJ84eQbXCkeYmmOwQowwfTk=; b=Eibnsrhkm5flRAu5fWoca67KkkNTZ8WFk1rCzXrDcSDnpX+lPNMeXan8Gs6Usdwq28 TAGX78nBzHfRDoIGIT1NGg5l6ZR3/Y1sBPGxvuXfFccgPN5zWN0E2h/0AyOjiTZ+6cj5 v4EZPc56zLCrfTVcA6Pr7uSt8cNbFZG29nyYIk/EfYUvtXKDxn0dIXfyIQdAljz8yFjR WVcrg4t0tA53Hd67R9wY2wZl2F3EU5y4Vyf9y9l8j4DuKQg/XJq4NB3WUOMLBFSjP0ac FJ6TAz+z9fw9Q6hwkNAIKrzbkhAczRsB5SgDjpwB9bKNnACfPClatchAMzE/ZKWW9oI1 yVUA== 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=TRpW+15tiHfdg+auCA9tYJ84eQbXCkeYmmOwQowwfTk=; b=JerrEYBQUrrRmiCsyhBtUaj6iCTIKCXi9zZV/cZMyTDqC6T5uohvcdLcADQZHcwPyi xKtkDN1VbSx8p9ZDiMwxSh3vcfJyFLLr+xPKdZu7SJdJ2QhwGV9+htDJt4o4Gf0wewkm Y1VcqjCqYKS+/L7LvbtXC8/oRdwgVmTlmzuelVhvgiznlIX2WbMA8bAFABchzhQAoonW DKG0wjXy/rGTtUWIDr8qfHgqoqWrD5Rtoj4HmmTze0FfNuy0PRD2J0ou0YLxss+Vhfcb 3dbwWjSD3DXvoJbWW0zMwYBKXJI9aY1kMdxPSiaydIfTf/DbqQoQ9jv+VR+gkfu18MEd 9tBg== X-Gm-Message-State: AGRZ1gI5978b0atJ9Wcmn2Ygdj5qgRFFCnCsuHDFvaj5eE48G1EpHdks JsUyjqxKIsGmxdns58TYEf4D7Q== X-Google-Smtp-Source: AJdET5f2XF1Np/+iIgFb50Bc3lIVFo+ynauWIwiuKJqt6LAbn65/lB8UW678rV8NXilpPKyu1AS3Vw== X-Received: by 2002:a81:3b55:: with SMTP id i82-v6mr11463023ywa.397.1542393780682; Fri, 16 Nov 2018 10:43:00 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id b144sm5359134ywa.33.2018.11.16.10.43.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 10:43:00 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: robdclark@gmail.com, jsanka@codeaurora.org, Sean Paul Subject: [PATCH v2 04/24] drm/msm: dpu: Don't use power_event for vbif_init_memtypes Date: Fri, 16 Nov 2018 13:42:14 -0500 Message-Id: <20181116184238.170034-5-sean@poorly.run> X-Mailer: git-send-email 2.19.1.1215.g8438c0b245-goog In-Reply-To: <20181116184238.170034-1-sean@poorly.run> References: <20181116184238.170034-1-sean@poorly.run> 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 From: Sean Paul power_events are only used for pm_runtime, and that's all handled in dpu_kms. So just call vbif_init_memtypes at the correct times. Changes in v2: - Removed obsolete comment (Jeykumar) Cc: Jeykumar Sankaran Signed-off-by: Sean Paul Reviewed-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 24 +++--------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 1 - 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 23094d108e81..ab8574ab8327 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -651,10 +651,6 @@ static void _dpu_kms_hw_destroy(struct dpu_kms *dpu_kms) dpu_hw_intr_destroy(dpu_kms->hw_intr); dpu_kms->hw_intr = NULL; - if (dpu_kms->power_event) - dpu_power_handle_unregister_event( - &dpu_kms->phandle, dpu_kms->power_event); - /* safe to call these more than once during shutdown */ _dpu_debugfs_destroy(dpu_kms); _dpu_kms_mmu_destroy(dpu_kms); @@ -832,16 +828,6 @@ u64 dpu_kms_get_clk_rate(struct dpu_kms *dpu_kms, char *clock_name) return clk_get_rate(clk->clk); } -static void dpu_kms_handle_power_event(u32 event_type, void *usr) -{ - struct dpu_kms *dpu_kms = usr; - - if (!dpu_kms) - return; - - dpu_vbif_init_memtypes(dpu_kms); -} - static int dpu_kms_hw_init(struct msm_kms *kms) { struct dpu_kms *dpu_kms; @@ -1012,13 +998,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms) */ dev->mode_config.allow_fb_modifiers = true; - /* - * Handle (re)initializations during power enable - */ - dpu_kms_handle_power_event(DPU_POWER_EVENT_ENABLE, dpu_kms); - dpu_kms->power_event = dpu_power_handle_register_event( - &dpu_kms->phandle, DPU_POWER_EVENT_ENABLE, - dpu_kms_handle_power_event, dpu_kms, "kms"); + dpu_vbif_init_memtypes(dpu_kms); pm_runtime_put_sync(&dpu_kms->pdev->dev); @@ -1172,6 +1152,8 @@ static int __maybe_unused dpu_runtime_resume(struct device *dev) return rc; } + dpu_vbif_init_memtypes(dpu_kms); + rc = dpu_power_resource_enable(&dpu_kms->phandle, true); if (rc) DPU_ERROR("resource enable failed: %d\n", rc); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h index f2c78deb0854..5f08be187c86 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h @@ -114,7 +114,6 @@ struct dpu_kms { struct dpu_mdss_cfg *catalog; struct dpu_power_handle phandle; - struct dpu_power_event *power_event; /* directory entry for debugfs */ struct dentry *debugfs_root;