Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by tgummerer.tngl.sh and committed by

Jani Nikula 54da691d e2608180

+11 -13
+11 -13
drivers/gpu/drm/i915/intel_pm.c
··· 2045 2045 p->pipe_htotal = intel_crtc->config->base.adjusted_mode.crtc_htotal; 2046 2046 p->pixel_rate = ilk_pipe_pixel_rate(dev, crtc); 2047 2047 2048 - if (crtc->primary->state->fb) { 2049 - p->pri.enabled = true; 2048 + if (crtc->primary->state->fb) 2050 2049 p->pri.bytes_per_pixel = 2051 2050 crtc->primary->state->fb->bits_per_pixel / 8; 2052 - } else { 2053 - p->pri.enabled = false; 2054 - p->pri.bytes_per_pixel = 0; 2055 - } 2051 + else 2052 + p->pri.bytes_per_pixel = 4; 2056 2053 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 - } 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; 2061 + 2064 2062 p->pri.horiz_pixels = intel_crtc->config->pipe_src_w; 2065 2063 p->cur.horiz_pixels = intel_crtc->base.cursor->state->crtc_w; 2066 2064