Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp794303ybh; Sat, 3 Aug 2019 09:56:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvDYO1hMWDyiTHbtgz3kr5HjcnBSQk2MNVkmkEgCzG/SoltAOjwdBp3mo1zgP6qtk8SDoM X-Received: by 2002:a62:e403:: with SMTP id r3mr62615155pfh.37.1564851412781; Sat, 03 Aug 2019 09:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564851412; cv=none; d=google.com; s=arc-20160816; b=xtJf5fcw4cocnrxHU2+9TMYHptnaFhSmieh7E5eWhCoPjI+dqipf/YQaFgXl0gnOqg 40kb4SKLKQR+sTFIrPDtLFrjChkg4h9iQTdmdcbmEsYMXMdOelG8yTBTs9XK+53wlZOU 7jTzs9i4Vx1+Aar2S1cLys5sFCrtMXcpii9psYRUjZAZj7u94P1W8zPW9N1t1xDIrsg1 qwVPYLNNeDWaOGtOk1yKqRyIfnIk59+gKwlwgAysYa8MhkdCwq43q7krThHjQp6Mmrr9 rDTXRip1dUi9EeUCBFROdXo0NkAvenEi/Sb1USJatnZXzFX1y6MkAsZExSjSXih1vWwS yfZA== 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=NIy8h5wSfDH2K7xzDnBEs97s43/jf77iM8+1t5qbcTA=; b=dEtZzC9wY03eC6cCcdiT5QoYuJmtonOiF0VjwxUwSfRedMsnIIU5zg67lCeUaG4a2j 143Cv5GzjWxGq7DWkQPC8ZqaizhCUJKhxXxKBFlrIaqjftRGAhCj7RzfAcIz9o1fWV6Q a2ryzQJt0xDgljBRxfSEIwl5pt3QXZeFRKNi/4C2/3moR1uOLiAjCKyw2UEUwJ5bZJ3d hK4pfWpuOR/mOvbra4Sbi8TTRgE03Yfhn0sNM20Zehmbu0bfUpm/CpqZqItkg+zFw1Am V6FWchczxB3FZJ+heqw0/PNReMMEhjSP8/feQa8z9aj7Y5AeNNNYeYBcaN3g0I3ImBQA 8EnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dM2JCKG4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i17si8947350pju.96.2019.08.03.09.56.38; Sat, 03 Aug 2019 09:56:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dM2JCKG4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727441AbfHBSqm (ORCPT + 99 others); Fri, 2 Aug 2019 14:46:42 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34411 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727163AbfHBSql (ORCPT ); Fri, 2 Aug 2019 14:46:41 -0400 Received: by mail-pl1-f196.google.com with SMTP id i2so33989967plt.1 for ; Fri, 02 Aug 2019 11:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NIy8h5wSfDH2K7xzDnBEs97s43/jf77iM8+1t5qbcTA=; b=dM2JCKG4ZUdCfNsWMCALyfKMUlMYXJR1Ny3J8w66b56pgCzx9krV9g/X89YcVbqo19 05Hw1m1UpMW0MmMsBYCojTQBt56r4WJImUvbKsmgjzA/PcpjOl/lII2MX/R4BfBJH5fG XEBK2PEP1UZjsjFqxDsMfeIoZ0TIeDfIePL1s= 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=NIy8h5wSfDH2K7xzDnBEs97s43/jf77iM8+1t5qbcTA=; b=Et87EUFWtwb2U7Ini2NKJQNmAq5qZwB6YCT+9lr0WDhMRh1xKoJnh4zp0tDyij+k4m LXCpa+5wr54/kOuon7IIJJbMKVkFBUP5ekcHtjajD2e9GEgf4cLAvgOH59xPdnbCQENU spT3lMJnSawdimvBnK8GthqivbxejJ+ivj992ry03BWEO9/4xQ8fpMKT0cXX4J3dsLaj 2NUt3zpMZf7EYibcSfKEzyGIR130ghDFebmP+ldyziaOJVnlazoX4x9Il62JHOpR+9eC ICyheD1KjLNdEgTJSy5lFllGFTn0q/dKux3SdPUT9FY3CRHcJGJCO2LJiVTJshuFh2jx bHOw== X-Gm-Message-State: APjAAAU0SxOT9ROHLOt6qWc7/+yIt7WvJ9XPqAEtUH9g+NR5R9DWbGBc PwefgDLcQdfs4ekcqiwb+g3P/Q== X-Received: by 2002:a17:902:2aa8:: with SMTP id j37mr126464818plb.316.1564771600984; Fri, 02 Aug 2019 11:46:40 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id f19sm112071104pfk.180.2019.08.02.11.46.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 11:46:40 -0700 (PDT) From: Douglas Anderson To: Heiko Stuebner , Tomeu Vizoso , seanpaul@chromium.org Cc: linux-rockchip@lists.infradead.org, mka@chromium.org, Douglas Anderson , Sandy Huang , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , linux-arm-kernel@lists.infradead.org, Daniel Vetter Subject: [PATCH] drm/rockchip: Suspend DP late Date: Fri, 2 Aug 2019 11:46:16 -0700 Message-Id: <20190802184616.44822-1-dianders@chromium.org> X-Mailer: git-send-email 2.22.0.770.g0f2c4a37fd-goog 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 In commit fe64ba5c6323 ("drm/rockchip: Resume DP early") we moved resume to be early but left suspend at its normal time. This seems like it could be OK, but casues problems if a suspend gets interrupted partway through. The OS only balances matching suspend/resume levels. ...so if suspend was called then resume will be called. If suspend late was called then resume early will be called. ...but if suspend was called resume early might not get called. This leads to an unbalance in the clock enables / disables. Lets take the simple fix and just move suspend to be late to match. This makes the PM core take proper care in keeping things balanced. Fixes: fe64ba5c6323 ("drm/rockchip: Resume DP early") Signed-off-by: Douglas Anderson --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 7d7cb57410fc..f38f5e113c6b 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -436,7 +436,7 @@ static int rockchip_dp_resume(struct device *dev) static const struct dev_pm_ops rockchip_dp_pm_ops = { #ifdef CONFIG_PM_SLEEP - .suspend = rockchip_dp_suspend, + .suspend_late = rockchip_dp_suspend, .resume_early = rockchip_dp_resume, #endif }; -- 2.22.0.770.g0f2c4a37fd-goog