From patchwork Thu Oct 4 09:41:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharat Masetty X-Patchwork-Id: 10625775 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 EE3E41731 for ; Thu, 4 Oct 2018 09:41:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEA8028AD9 for ; Thu, 4 Oct 2018 09:41:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2B9928AF3; Thu, 4 Oct 2018 09:41:58 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 7F50C28AD9 for ; Thu, 4 Oct 2018 09:41:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727367AbeJDQeY (ORCPT ); Thu, 4 Oct 2018 12:34:24 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:39394 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727046AbeJDQeX (ORCPT ); Thu, 4 Oct 2018 12:34:23 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0688360C8C; Thu, 4 Oct 2018 09:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538646117; bh=LBOOUuGchbNVms6o0jlDRV1M5EHywbpwyuEiSVrsFyg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IcPyxwccpo2nqq5o57G65iP0GJUKTcWmJmO4tbFxn3OP6vrgOMUhFy8GIYHedXYGL OSl+cUCpdxKZJk9RdNNVxPetNzvCrtvDRT8n+xUJ0tXZRF3U2DxwQogxyRt/zCG6b7 M9gpiCNhFGIGP76FTTQ5k9V6jvEn0XaazoInqfqs= Received: from smasetty-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: smasetty@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4C60060B72; Thu, 4 Oct 2018 09:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538646116; bh=LBOOUuGchbNVms6o0jlDRV1M5EHywbpwyuEiSVrsFyg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i2aK+IBGZqvvP3Ia+EJ475YEVuD4sdFFhL9BK+a3F1wdXzwTIBLfsFoTbcAjkqde4 BQzSI/encya1dnR6Rt/FfEmvbFRJc5CScHb9s/3gZzOnPocFX7D7Ki7m/O8FH0eoaj pEBx21fevGDKYVwBLdtzu6q9Oj60o4pwjx67ulw8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4C60060B72 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=smasetty@codeaurora.org From: Sharat Masetty To: freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, jcrouse@codeaurora.org, Sharat Masetty Subject: [v4 1/4] drm/msm: suspend devfreq on init Date: Thu, 4 Oct 2018 15:11:40 +0530 Message-Id: <1538646103-27445-2-git-send-email-smasetty@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1538646103-27445-1-git-send-email-smasetty@codeaurora.org> References: <1538646103-27445-1-git-send-email-smasetty@codeaurora.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 Devfreq turns on and starts recommending power level as soon as it is initialized. The GPU is still not powered on by the time the devfreq init happens and this leads to problems on GPU's where register access is needed to get/set power levels. So we start suspended and only restart devfreq when GPU is powered on. Signed-off-by: Sharat Masetty --- drivers/gpu/drm/msm/msm_gpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 46e6b82..3378a9d 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -105,6 +105,8 @@ static void msm_devfreq_init(struct msm_gpu *gpu) dev_err(&gpu->pdev->dev, "Couldn't initialize GPU devfreq\n"); gpu->devfreq.devfreq = NULL; } + + devfreq_suspend_device(gpu->devfreq.devfreq); } static int enable_pwrrail(struct msm_gpu *gpu)