Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2275456pxa; Mon, 17 Aug 2020 05:54:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL3N3WSzkmjf+l3zM+s65DS0oKpvuiLqk1NP2o0wetM6NKUOUL/b7YHP0bWEi2iiAPI80F X-Received: by 2002:a17:906:6cd:: with SMTP id v13mr14661529ejb.307.1597668856529; Mon, 17 Aug 2020 05:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597668856; cv=none; d=google.com; s=arc-20160816; b=ZEjW3VfIWr+h/6Lf5aAoaT6g8x2xyPXqHAXc1VCY52MCeBby3+gkyrYcDIlNTzbUg5 fxilnYxFAec4E6xqmEonWeOg4aJtnnZZc0U/4Ejt2SkmLsP11ukyeL6uYzXv0PeqbzBd paYyPHCJFE8XX1Fso7oPQqerXTK6GP02uP0QWRLUQv3fOw/rDU7+HabJHX8SZfGxYt9t wTnsUIUFwdpN4FN7mImEhPQCS3EFly3Skp3BXn7HDAMt2k+tJHHzK9X4i4ox2N0O73lf OqEEKkPDbViHZvUWDc4auNBMaz/HkB0Zvl9h8+ss5g5yZy8D+AqYBpH3u2OBt97XkPEj xH2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature; bh=JGVe9PW+tTDsQAAqGjQ8ritTdegK9mneovtsPPAvGdU=; b=jG7LsEv+fWUevh8ipAm7DQwawrFmoA6RtYktbBIjbCM2EUEMDIbly/P1ZIRoOrIF+I +QQPB2M0Hi20OJo0UAqrFC1v3lPnzl3Iu0Ot7673PEaFPo3hpCQRC2wPBQjTdzwo4nfn oz5xO9UYa+dk49Mnpkw3mHJOI4JmYW6LWSe6ojc+9zBLMewhvdLKcOQv61Bbn1CT++28 ClDAReZYGORlkjHFGUt/kYH3Udw7SXIx105ho/xsZLvRz682AA+YXM4zOcutBo4oT8PT Tz24OartejBD72VbT+4mvH2NoKms+92CQ6Gc02L3ygX3g9I13/U2Tx+AfhJSLC0OnDQy UiPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=RluLe+Sm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si11988439edg.164.2020.08.17.05.53.53; Mon, 17 Aug 2020 05:54:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=RluLe+Sm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728508AbgHQMwp (ORCPT + 99 others); Mon, 17 Aug 2020 08:52:45 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:45980 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbgHQMwm (ORCPT ); Mon, 17 Aug 2020 08:52:42 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1597668762; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=JGVe9PW+tTDsQAAqGjQ8ritTdegK9mneovtsPPAvGdU=; b=RluLe+SmuQH1y41/KBqJt+nn02DGm+Oz+Q6ZCfmZvuRFJW6IRQ4jtJLtrt1YP46eDYPbveTd efplYXQwLruG5ue+vGQUOKDywtqSdOaPwkoGPACLVatPEP71z6FvkED7gPnh5E4+Xsoyx9Xn WmdKYmKZqaWHVH10qCjdfLUFaDk= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n10.prod.us-east-1.postgun.com with SMTP id 5f3a7d6eba4c2cd36711cb35 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 17 Aug 2020 12:51:58 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id DAD9BC43387; Mon, 17 Aug 2020 12:51:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.6 required=2.0 tests=ALL_TRUSTED,NICE_REPLY_A, SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [192.168.1.7] (unknown [117.217.239.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: akhilpo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3ABC4C433CA; Mon, 17 Aug 2020 12:51:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3ABC4C433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=akhilpo@codeaurora.org Subject: Re: [RESEND PATCH] drm/msm/a6xx: fix frequency not always being restored on GMU resume To: Jonathan Marek , freedreno@lists.freedesktop.org Cc: David Airlie , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Sharat Masetty , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Christophe JAILLET , Sean Paul , open list References: <20200813185450.19387-1-jonathan@marek.ca> From: Akhil P Oommen Message-ID: <270c4efd-8524-c389-3347-2f9c4e246b6d@codeaurora.org> Date: Mon, 17 Aug 2020 18:21:50 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200813185450.19387-1-jonathan@marek.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Why don't we move the early return in a6xx_gmu_set_freq() to msm_devfreq_target() instead? -Akhil. On 8/14/2020 12:24 AM, Jonathan Marek wrote: > The patch reorganizing the set_freq function made it so the gmu resume > doesn't always set the frequency, because a6xx_gmu_set_freq() exits early > when the frequency hasn't been changed. Note this always happens when > resuming GMU after recovering from a hang. > > Use a simple workaround to prevent this from happening. > > Fixes: 1f60d11423db ("drm: msm: a6xx: send opp instead of a frequency") > > Signed-off-by: Jonathan Marek > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c > index b67b38c8fadf..bbbd00020f92 100644 > --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c > +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c > @@ -845,6 +845,7 @@ static void a6xx_gmu_set_initial_freq(struct msm_gpu *gpu, struct a6xx_gmu *gmu) > if (IS_ERR_OR_NULL(gpu_opp)) > return; > > + gmu->freq = 0; /* so a6xx_gmu_set_freq() doesn't exit early */ > a6xx_gmu_set_freq(gpu, gpu_opp); > dev_pm_opp_put(gpu_opp); > } >