diff options
author | Thomas Gummerer <t.gummerer@gmail.com> | 2015-05-14 03:16:39 -0400 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2015-05-19 03:28:34 -0400 |
commit | 54da691deb123c045259ebf4f5c67381244f58f1 (patch) | |
tree | 030b2b2fa563b62fdc47ea15ac330ace88ec9429 /drivers/gpu | |
parent | e26081808edadfd257c6c9d81014e3b25e9a6118 (diff) |
drm/i915: fix screen flickering
Commit c9f038a1a592 ("drm/i915: Don't assume primary & cursor are
always on for wm calculation (v4)") fixes a null pointer dereference.
Setting the primary and cursor panes to false in
ilk_compute_wm_parameters to false does however give the following
errors in the kernel log and causes the screen to flicker.
[ 101.133716] [drm:intel_set_cpu_fifo_underrun_reporting [i915]]
*ERROR* uncleared fifo underrun on pipe A
[ 101.133725] [drm:intel_cpu_fifo_underrun_irq_handler [i915]]
*ERROR* CPU pipe A FIFO underrun
Always setting the panes to enabled fixes this error.
Helped-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index fa4ccb346389..555b896d2bda 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -2045,22 +2045,20 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc, | |||
2045 | p->pipe_htotal = intel_crtc->config->base.adjusted_mode.crtc_htotal; | 2045 | p->pipe_htotal = intel_crtc->config->base.adjusted_mode.crtc_htotal; |
2046 | p->pixel_rate = ilk_pipe_pixel_rate(dev, crtc); | 2046 | p->pixel_rate = ilk_pipe_pixel_rate(dev, crtc); |
2047 | 2047 | ||
2048 | if (crtc->primary->state->fb) { | 2048 | if (crtc->primary->state->fb) |
2049 | p->pri.enabled = true; | ||
2050 | p->pri.bytes_per_pixel = | 2049 | p->pri.bytes_per_pixel = |
2051 | crtc->primary->state->fb->bits_per_pixel / 8; | 2050 | crtc->primary->state->fb->bits_per_pixel / 8; |
2052 | } else { | 2051 | else |
2053 | p->pri.enabled = false; | 2052 | p->pri.bytes_per_pixel = 4; |
2054 | p->pri.bytes_per_pixel = 0; | 2053 | |
2055 | } | 2054 | p->cur.bytes_per_pixel = 4; |
2055 | /* | ||
2056 | * TODO: for now, assume primary and cursor planes are always enabled. | ||
2057 | * Setting them to false makes the screen flicker. | ||
2058 | */ | ||
2059 | p->pri.enabled = true; | ||
2060 | p->cur.enabled = true; | ||
2056 | 2061 | ||
2057 | if (crtc->cursor->state->fb) { | ||
2058 | p->cur.enabled = true; | ||
2059 | p->cur.bytes_per_pixel = 4; | ||
2060 | } else { | ||
2061 | p->cur.enabled = false; | ||
2062 | p->cur.bytes_per_pixel = 0; | ||
2063 | } | ||
2064 | p->pri.horiz_pixels = intel_crtc->config->pipe_src_w; | 2062 | p->pri.horiz_pixels = intel_crtc->config->pipe_src_w; |
2065 | p->cur.horiz_pixels = intel_crtc->base.cursor->state->crtc_w; | 2063 | p->cur.horiz_pixels = intel_crtc->base.cursor->state->crtc_w; |
2066 | 2064 | ||