Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1583988pxa; Thu, 13 Aug 2020 11:47:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyC+pLNTM0FJRmWHFhwWK4VryWjR/UU9pm5MGsH9D7EJtR/VOykAbAdy6/6KhsCdfIzizx8 X-Received: by 2002:a17:906:845:: with SMTP id f5mr6012762ejd.34.1597344473171; Thu, 13 Aug 2020 11:47:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597344473; cv=none; d=google.com; s=arc-20160816; b=maoAGbnvxFJwXQvKzh4MTvv4BYyRJ0EwD43SVpuOeQTsgBZ0nUPaWUdN4waOLlsklA RmNWGga08vyrwFbT8NSs/xR1xl7McQ02EOgLLl/XKbXJJ/I8XVcO2CDdgAMVGJ8q4YBF Nl+fsQ46jPEar7CEYYlh7EVdr4koBcHibtq8LOuvXB59/nPF055xCnlH4tfqiN8Qs7kw cEG+i98XmeTEWfjD7W542yHQZ5aZb0zIR43f8xprg3QeneOZKHyd5xhuEkBO5dEBaDOz bMpVwk8C55ikMcAOQX9uWpZLiUc5bS0L496DUg7lFYI7MWGXYqCXQhUFFHDAY72K5O04 sOnw== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=i08DjFarJSioJFF+3BzXlzJrV3znYAwGrEz9J75FiX4=; b=nhYzNF6qH3+N81OsWnAtvv6+lZQGvAtHaqM7sPsFiv3w9rLiRsfszcGydyW6fuxGms 2XgqQJLKrR9k9VlG5Zwb6fwt+10Gbu6tAHsCKDgkErfr+z2IpZANbkNE3JUaoGy0iixA NKg9o61JkrqxoLhahu2EugSEmh5+OhAVcgoUb17X/4Or1NNh2XeyQvjfntUll8x13ecX MqtqSJGGj5nwgKkWR6ta6lR9ka5n0GPWjCbds6O/gQu2HOq406YqzJyWiZXtqaJDLR/m s/QV10++CCV4YCHZ++e06cXyH/COhT+LbxpunbnehPbuDSYtG0q0RRVkeJsU7HrH5gqM 7Ygg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marek-ca.20150623.gappssmtp.com header.s=20150623 header.b=Zey1i9YK; 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 dn20si5015997ejc.377.2020.08.13.11.47.28; Thu, 13 Aug 2020 11:47:53 -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=pass header.i=@marek-ca.20150623.gappssmtp.com header.s=20150623 header.b=Zey1i9YK; 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 S1726526AbgHMSoa (ORCPT + 99 others); Thu, 13 Aug 2020 14:44:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726249AbgHMSo2 (ORCPT ); Thu, 13 Aug 2020 14:44:28 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D687EC061383 for ; Thu, 13 Aug 2020 11:44:26 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id s16so5139724qtn.7 for ; Thu, 13 Aug 2020 11:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i08DjFarJSioJFF+3BzXlzJrV3znYAwGrEz9J75FiX4=; b=Zey1i9YKtQygbzUDBlnW/AKCXPLBGNuzu5QshFKXWVoQGiehGBZWCktZt7P3kmrpyp etLXXJqJYrSLasI6L4DL57cfA+jq+WuaWJ/dPEgm2kOqm3bplNfFZIpdLzM7qO2fNPq7 SI5LUPLrMuHlHu1uf/aInNBO05dHYBMtKk/hlVAFeX3t786TTYiuZEzAx4LXnEkK7I0e 1p8k2gLsGsdxA6VIzuicHGDlI6A8b4Epw4DAlh/QfTuf/VfScE0xJyabJHg11CBxZeHE H0gbHy7e4Q3PbTQZ4meSA/pFmvsFfvHNyNKZ3BFuZp2OZnw9nKiJwvbWyHbdD+hYFFnb 6FpQ== 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:mime-version :content-transfer-encoding; bh=i08DjFarJSioJFF+3BzXlzJrV3znYAwGrEz9J75FiX4=; b=TaICjO97X06WQTCz82rHxMwq27khSLcmk0duN2xZleL0uemZO+lMeITUsE/rOdX3tm ECNk0UqpFiMlANLJna4/18vve0d6f0UmSeY9ZeciJAX+z2hi3ztV7Qm2q1/v0lUSces/ Y8yziYwNihoq8ebffo4MGAkTtFiM5ZcJQNVBsRUBf4XZITNNmqgafTfRG2cDji5qa8Sl n2ld9SLCz4Ox1y78VwKZzhZ7aJrJrKJMeNgSJjMgQOVdxNkURG9DIIzQwZXh5gMVv6xC l7jTE27yCZHgitQ9AZIZqbhAA030EsnPVeg2f6spUSAefqTDRZiLcV1/NQ13qgEaeDu0 fp3Q== X-Gm-Message-State: AOAM5304m+8a52m0n9UMVnHe1ZGYdxIFWBPYcKpTqrglKB+mZgEv8+X3 nbmJLxM4hu4Kjw+bvhVMByVHug== X-Received: by 2002:aed:2946:: with SMTP id s64mr6816571qtd.204.1597344266044; Thu, 13 Aug 2020 11:44:26 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id k5sm6415227qke.18.2020.08.13.11.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2020 11:44:25 -0700 (PDT) From: Jonathan Marek To: freedreno@lists.freedesktop.org Cc: Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Jordan Crouse , Sharat Masetty , Akhil P Oommen , linux-arm-msm@vger.kernel.org (open list:DRM DRIVER FOR MSM ADRENO GPU), dri-devel@lists.freedesktop.org (open list:DRM DRIVER FOR MSM ADRENO GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] drm/msm/a6xx: fix frequency not always being restored on GMU resume Date: Thu, 13 Aug 2020 14:44:18 -0400 Message-Id: <20200813184420.18448-1-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") --- 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); } -- 2.26.1