Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1588750pxa; Thu, 13 Aug 2020 11:56:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGzfS2PFlm3qf1hPNSKncOPD9ENvS1QKmshRBgSbNSY61fvhIyzyZaNNx3PANUIectffcc X-Received: by 2002:aa7:cd6c:: with SMTP id ca12mr5824380edb.365.1597345004558; Thu, 13 Aug 2020 11:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597345004; cv=none; d=google.com; s=arc-20160816; b=pun0ijGwOSsKIb+zXoUk7q3J+EU7UQEkV3+7EL+zD/mmkM7yT8pjakwvidjUaDy+LF V1SCX2vt7nc/PFjja4p3pFVVTTPci84MIGgIdnNOAOBB8Z8rqJwjMcsSCJIYXFHM2twh sMfWw/gSZCYtELvGInY96MmEtwVBl4JPMViaRyK4yE2lPotat/9rJO0dAn5xGWTIziVX AcYFTsjLbMjHPp+YZ0MeJndRuO8qDyBCPuhvv6EWcN8aSXQelnytn4zMDexWoE4pRtqe XSvrtlfpSb4jzqkrpSijDoNKWu7aKajQccT5EKBgqQ2HySMLJDxSyykVla93V2guY2n9 0PmQ== 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=+Jgraj+114QRBzFXPeF3FuYfVHOWKZNgIZ9aTNenrPE=; b=jHDAWNyLRglDGdnmlgGZjaAmMgtRyJE8flUFhCrLxUHUOuZQ1agpqdcvzriAxX6F9B Oo+n49o1OymxVgGL52NoC5Wov4xafrgHdSb92Vnp6ppo92JXiqyBbEjCP4d8kYSyzKeh F0mps47iJps7bMmssXIgRxfGsi9NDdx1ygPHNIKUbltOnI3evP8U88Yd3+gl8rHlFB+x /Q4syeiQsUn15DIfqXYl5IDMGhxSZt9+s17omSITgAN73lWE/BRxC5w+X9GlYhRnR4FR qbHaLetXERlk2Y5syOTBTOobeO/7edlIaojZ+HqQbS0T5pU/gnOp846Vs9jJEiL47igm 23PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marek-ca.20150623.gappssmtp.com header.s=20150623 header.b=K5ZUHZoT; 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 e7si4575747ejm.580.2020.08.13.11.56.20; Thu, 13 Aug 2020 11:56:44 -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=K5ZUHZoT; 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 S1726568AbgHMSzM (ORCPT + 99 others); Thu, 13 Aug 2020 14:55:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbgHMSzL (ORCPT ); Thu, 13 Aug 2020 14:55:11 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B9FDC061383 for ; Thu, 13 Aug 2020 11:55:11 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id o22so5145272qtt.13 for ; Thu, 13 Aug 2020 11:55:11 -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=+Jgraj+114QRBzFXPeF3FuYfVHOWKZNgIZ9aTNenrPE=; b=K5ZUHZoTVkZ0tY5PKep0FfWqPe292MdYUK7XrGfQT5bPLzimznrpCsHYK7epjlHC1i xXd7fNIrqvF8K/M1sfQ6jyqPzwslt0B3Bhwb3q3FK+qBiYQjOk/3kdnaLrq5qlsdroFs fWiJWg9CRP/lrcvc4QOg8w5q5NCJzb1qqdFsgGhM3jmgGBMWerAeW8B+uXBhXF3qHHn5 Vcr0kS3wh8MN9ZCjiI+FPVOtUIcllhV4748X8W50DajAZ5duXbgS1buXOExgWl8aY9eQ lOj5Y5M+FGSlVFkyntXue9hSAx9OlmmTv8dHjt1lUn8MHgV7guNNProl0yGA34GMCbGP 30Yw== 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=+Jgraj+114QRBzFXPeF3FuYfVHOWKZNgIZ9aTNenrPE=; b=tB+dSauKmC41nwbizrB8rEQWLCzgiBEOvi0xY/HBbVY2rH6WVU7TMdhQJ7sBwGeTxx 8CpOxzYl2JfGvPp+JbmN9Gkr5EK42BympVRCG9/6RgvELfaWiuzSenptH1QW4ZgziZoY hwvMU8NnMsQV4MBdCE6rUsW1Ck7NIWY6nKXOZb3G9dabnZuyaYryrxpwrT2AlJgKEwUb znbzHXa/MjVPlPT7Q4bact08lcJ2VksUqUiCYee3aHNszl4ePzH9oyWkh23Nlo4VtV0d kbrDzOKd1i9lH+MnSMN+8lhX1txq2/4Jpl+slOZ5MwgKSGE9TKjqnpBZtMpMUKljCi79 kTLA== X-Gm-Message-State: AOAM532Afomw3FBHvnpcxbG1aha6Lsws4bZmlCfChAhWxqzuadM5KHtl ydPHKpESIctrqRH+cUde25brPg== X-Received: by 2002:ac8:4e51:: with SMTP id e17mr6954689qtw.173.1597344910414; Thu, 13 Aug 2020 11:55:10 -0700 (PDT) Received: from localhost.localdomain ([147.253.86.153]) by smtp.gmail.com with ESMTPSA id l64sm5816733qkc.21.2020.08.13.11.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2020 11:55:09 -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 , Christophe JAILLET , 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: [RESEND PATCH] drm/msm/a6xx: fix frequency not always being restored on GMU resume Date: Thu, 13 Aug 2020 14:54:48 -0400 Message-Id: <20200813185450.19387-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") 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); } -- 2.26.1