All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: Thomas Gummerer <t.gummerer@gmail.com>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, David Airlie <airlied@linux.ie>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	jan@gondor.com, Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
	Michael Leuchtenburg <michael@slashhome.org>
Subject: Re: [BUG/REGRESSION] Screen flickering
Date: Wed, 13 May 2015 20:21:18 -0700	[thread overview]
Message-ID: <20150514032118.GD25648@intel.com> (raw)
In-Reply-To: <87pp65efmo.fsf@hank.tgummerer.com>

On Tue, May 12, 2015 at 09:54:07PM +0200, Thomas Gummerer wrote:
> 
> Hi,
> 
> I noticed that on my machine the screen starts to flicker after I
> suspend and resume my machine, on the main laptop display if an external
> display is attached with kernel v4.1-rc1.  I tracked the regression down
> to commit c9f038a1a592 ("drm/i915: Don't assume primary & cursor are
> always on for wm calculation (v4)"), and sent a patch that fixes that
> behavior at [1] about two weeks ago, although I'm not sure it's the
> right thing to do, as I'm not very familiar with the code.  The same bug
> still exists in vv4.1-rc3.
> 
> Jan Niehusmann confirmed the behavior, but there has been no further
> discussion on the topic.  I also forgot to cc the people that were
> involved in the patch that caused the regression (sorry about that).
> 
> Is there anything else that I can do to help fixing this issue?
> 
> Thanks,
> Thomas
> 
> [1] http://lists.freedesktop.org/archives/intel-gfx/2015-April/065494.html

Sorry, I missed your patch when you first sent it.  That type of fix
looks like an okay workaround while we do a more in-depth rework of the
watermark system.  However I think your patch could cause a crash if we
disable the primary plane via the universal plane interface; if we do
that, p->pri.bytes_per_pixel is set to 0, but since we're now pretending
the primary plane is always enabled, ilk_wm_fbc() can eventually get
called and use that 0 in the denominator of a division operation.

If you just squash the following change into your patch, I think it should be
safe:

        diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
        index eb97cbe..99fa8ee 100644
        --- a/drivers/gpu/drm/i915/intel_pm.c
        +++ b/drivers/gpu/drm/i915/intel_pm.c
        @@ -2076,7 +2076,7 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc,
                        p->pri.bytes_per_pixel =
                                crtc->primary->state->fb->bits_per_pixel / 8;
                else
        -               p->pri.bytes_per_pixel = 0;
        +               p->pri.bytes_per_pixel = 4;
         
                p->cur.bytes_per_pixel = 4;
                /*


Matt

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795

  parent reply	other threads:[~2015-05-14  3:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 19:54 [BUG/REGRESSION] Screen flickering Thomas Gummerer
2015-05-12 19:54 ` Thomas Gummerer
2015-05-13  9:14 ` Jani Nikula
2015-05-13  9:14   ` Jani Nikula
2015-05-13  9:53   ` Jan Niehusmann
2015-05-13  9:53     ` Jan Niehusmann
2015-05-13 10:32     ` Sudip Mukherjee
2015-05-13 10:32       ` Sudip Mukherjee
2015-05-13 11:10       ` Jan Niehusmann
2015-05-13 11:10         ` Jan Niehusmann
2015-05-13 11:28         ` Sudip Mukherjee
2015-05-13 11:28           ` Sudip Mukherjee
2015-05-13 11:27       ` Thomas Gummerer
2015-05-13 11:27         ` Thomas Gummerer
2015-05-13 11:34         ` Sudip Mukherjee
2015-05-13 11:23     ` Thomas Gummerer
2015-05-13 11:23       ` Thomas Gummerer
2015-05-14  3:21 ` Matt Roper [this message]
2015-05-14  7:16   ` [PATCH v2] drm/i915: fix screen flickering Thomas Gummerer
2015-05-14  7:16     ` Thomas Gummerer
2015-05-14 14:28     ` Matt Roper
2015-05-14 14:28       ` Matt Roper
2015-05-19  7:37       ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150514032118.GD25648@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jan@gondor.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@slashhome.org \
    --cc=t.gummerer@gmail.com \
    --cc=tvrtko.ursulin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.