From patchwork Mon Sep 28 07:14:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 7275691 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AF5C7BEEA4 for ; Mon, 28 Sep 2015 07:11:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE58C206D7 for ; Mon, 28 Sep 2015 07:11:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 06B9F20694 for ; Mon, 28 Sep 2015 07:11:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 023D96E983; Mon, 28 Sep 2015 00:11:10 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 630806E983 for ; Mon, 28 Sep 2015 00:11:08 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 28 Sep 2015 00:11:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,602,1437462000"; d="scan'208";a="814296406" Received: from jnikula-mobl.fi.intel.com (HELO localhost) ([10.237.72.67]) by fmsmga002.fm.intel.com with ESMTP; 28 Sep 2015 00:10:44 -0700 From: Jani Nikula To: Brian Norris , intel-gfx@lists.freedesktop.org In-Reply-To: <1443234373-107752-1-git-send-email-briannorris@chromium.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <1443234373-107752-1-git-send-email-briannorris@chromium.org> User-Agent: Notmuch/0.20.2+58~g39779b9 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Mon, 28 Sep 2015 10:14:04 +0300 Message-ID: <874mifm2wz.fsf@intel.com> MIME-Version: 1.0 Cc: Brian Norris , Rodrigo Vivi , linux-kernel@vger.kernel.org, Daniel Vetter , Brian Norris , Duncan Laurie Subject: Re: [Intel-gfx] [RFC PATCH] drm/i915: PSR regressions on Broadwell X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sat, 26 Sep 2015, Brian Norris wrote: > When using PSR, I see the screen freeze after only a few frames (sometimes a > split second; sometimes it seems like practically the first frame). Bisecting > led me to commit 3301d4092106 ("drm/i915: PSR: Fix DP_PSR_NO_TRAIN_ON_EXIT > logic") in v4.2. This patch is the simplest fix that gets it working again for > me, but it's probably wrong. > > Random thought: perhaps my panel's DPCD is programmed incorrectly? > > Anyway, any tips on fixing this properly? Here's a thought: We do clamp the VBT value to range 0..15, but then go on to add to it. Otherwise, up to Rodrigo I guess. BR, Jani. > > Seen on Chromebook Pixel 2. > > Also required this patch to get PSR properly running on 4.3-rc2: > > https://patchwork.freedesktop.org/patch/57698/ > > Signed-off-by: Brian Norris > --- > drivers/gpu/drm/i915/intel_psr.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c > index 7e335a8546f6..4cd33b76b8a6 100644 > --- a/drivers/gpu/drm/i915/intel_psr.c > +++ b/drivers/gpu/drm/i915/intel_psr.c > @@ -261,7 +261,8 @@ static void hsw_psr_enable_source(struct intel_dp *intel_dp) > uint32_t val = 0x0; > const uint32_t link_entry_time = EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES; > > - if (intel_dp->psr_dpcd[1] & DP_PSR_NO_TRAIN_ON_EXIT) { > + if ((intel_dp->psr_dpcd[1] & DP_PSR_NO_TRAIN_ON_EXIT) && > + !IS_BROADWELL(dev)) { > /* It doesn't mean we shouldn't send TPS patters, so let's > send the minimal TP1 possible and skip TP2. */ > val |= EDP_PSR_TP1_TIME_100us; > -- > 2.6.0.rc2.230.g3dd15c0 > Acked-by: Brian Norris diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index a04b4dc5ed9b..3a911d4a2308 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -274,6 +274,8 @@ static void hsw_psr_enable_source(struct intel_dp *intel_dp) idle_frames += 4; } + idle_frames = clamp(idle_frames, 0, 15); + I915_WRITE(EDP_PSR_CTL(dev), val | (IS_BROADWELL(dev) ? 0 : link_entry_time) | max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT |