From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84C81C31E4D for ; Fri, 14 Jun 2019 14:12:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6732B21537 for ; Fri, 14 Jun 2019 14:12:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728218AbfFNOMA (ORCPT ); Fri, 14 Jun 2019 10:12:00 -0400 Received: from mga14.intel.com ([192.55.52.115]:39727 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727123AbfFNOL7 (ORCPT ); Fri, 14 Jun 2019 10:11:59 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2019 07:11:58 -0700 X-ExtLoop1: 1 Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga001.fm.intel.com with SMTP; 14 Jun 2019 07:11:55 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 14 Jun 2019 17:11:55 +0300 Date: Fri, 14 Jun 2019 17:11:55 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Jian-Hong Pan Cc: Abhay Kumar , Imre Deak , Clint Taylor , stable@vger.kernel.org, Linux Upstreaming Team , Hui Wang , Greg KH , Takashi Iwai Subject: Re: [PATCH stable-5.1 0/3] drm/i915: Prevent screen from flickering when the CDCLK changes Message-ID: <20190614141155.GZ5942@intel.com> References: <20190603100938.5414-1-jian-hong@endlessm.com> <20190610060141.5377-1-jian-hong@endlessm.com> <20190613075256.GF19685@kroah.com> <20190613100547.GW5942@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, Jun 14, 2019 at 01:59:51PM +0800, Jian-Hong Pan wrote: > Ville Syrjälä 於 2019年6月13日 週四 下午6:05寫道: > > > > On Thu, Jun 13, 2019 at 04:37:48PM +0800, Jian-Hong Pan wrote: > > > Greg KH 於 2019年6月13日 週四 下午3:52寫道: > > > > > > > > On Mon, Jun 10, 2019 at 02:01:39PM +0800, Jian-Hong Pan wrote: > > > > > Hi, > > > > > > > > > > After apply the commit "drm/i915: Force 2*96 MHz cdclk on glk/cnl when audio > > > > > power is enabled", it induces the screen to flicker when the CDCLK changes on > > > > > the laptop like ASUS E406MA. [1] > > > > > > > > > > So, we need these commits to prevent that: > > > > > commit 48d9f87ddd21 drm/i915: Save the old CDCLK atomic state > > > > > commit 2b21dfbeee72 drm/i915: Remove redundant store of logical CDCLK state > > > > > commit 59f9e9cab3a1 drm/i915: Skip modeset for cdclk changes if possible > > > > > > > > > > [1]: https://bugzilla.kernel.org/show_bug.cgi?id=203623#c12 > > > > > > > > > > Jian-Hong Pan > > > > > > > > > > Imre Deak (2): > > > > > drm/i915: Save the old CDCLK atomic state > > > > > drm/i915: Remove redundant store of logical CDCLK state > > > > > > > > > > Ville Syrjälä (1): > > > > > drm/i915: Skip modeset for cdclk changes if possible > > > > > > > > > > drivers/gpu/drm/i915/i915_drv.h | 3 +- > > > > > drivers/gpu/drm/i915/intel_cdclk.c | 155 ++++++++++++++++++++++----- > > > > > drivers/gpu/drm/i915/intel_display.c | 48 +++++++-- > > > > > drivers/gpu/drm/i915/intel_drv.h | 18 +++- > > > > > 4 files changed, 186 insertions(+), 38 deletions(-) > > > > > > > > These are all big patches, I would like to get an ack from the i915 > > > > developer(s) that these are acceptable for the stable tree before > > > > applying them... > > > > > > > > thanks, > > > > > > > > greg k-h > > > > > > Hi Intel friends, > > > > > > We have laptops like ASUS E406MA, which hits the issue: The audio > > > playback does not work anymore after suspend & resume [1] > > > Thanks for your contribution. We found the commit "drm/i915: Force > > > 2*96 MHz cdclk on glk/cnl when audio power is enabled" can fix it. > > > But, it induces the screen to flicker when the CDCLK changes on. So, > > > we need these commits to be back ported to Linux stable 5.1.x tree to > > > prevent flickering: > > > > Pardon the delay. > > > > Now that I refreshed my memory a bit I can't really see how > > this could fix anything, except by luck. Before these patches > > we always forced cdclk to be >=2*96 MHz so audio should never > > have hit this particular problem. > > > > The reason for adding this extra complexity was to claw back > > a few milliwatts of power by allowing cdclk to drop below that > > magic limit when audio isn't needed. > > > > I *think* these patches should probably work in 5.1, but for > > now I don't see this as anything more than bandaid for an > > unknown issue somewhere else. So I'd rather like a new bug > > filed at https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel > > with a full dmesg with drm.debug=0xe (+ some audio debug > > knob(s) which show when it's trying to poke the hw during > > suspend/resume) attached. > > Thanks for your attention! > I have filed the bug on freedesktop's bugzilla. > https://bugs.freedesktop.org/show_bug.cgi?id=110916 > > I can upload more log information with guidance. OK, I think I see what's going on. We would just need to change a few lines of code to fix that (basically just s/0/2*96000/ in two places) but we don't want that upstream anymore due to these patches. So I guess we need to go ahead with the backport. I read through them and checked the 5.1 baseline and couldn't spot any problems. So for the backport to 5.1: Acked-by: Ville Syrjälä -- Ville Syrjälä Intel