]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix dbuf slice mask when turning off all the pipes
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 18 May 2020 12:13:54 +0000 (15:13 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 18 May 2020 17:53:19 +0000 (20:53 +0300)
commit84eb86bf1c6b6fe2986e6cea3fd949cc1c419997
treea0cee8bc1a9bfbcf65a25348b82e3b227ba652ee
parent909f21659d5e2be51dc6e14e0bf74160414f07dd
drm/i915: Fix dbuf slice mask when turning off all the pipes

The current dbuf slice computation only happens when there are
active pipes. If we are turning off all the pipes we just leave
the dbuf slice mask at it's previous value, which may be something
other that BIT(S1). If runtime PM will kick in it will however
turn off everything but S1. Then on the next atomic commit (if
the new dbuf slice mask matches the stale value we left behind)
the code will not turn on the other slices we now need. This will
lead to underruns as the planes are trying to use a dbuf slice
that's not powered up.

To work around let's just just explicitly set the dbuf slice mask
to BIT(S1) when we are turning off all the pipes. Really the code
should just calculate this stuff the same way regardless whether
the pipes are on or off, but we're not quite there yet (need a
bit more work on the dbuf state for that).

v2: Let's not put the fix into dead code

Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 0f3bd64124d9 ("drm/i915: Introduce proper dbuf state")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200518121354.20401-1-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/intel_pm.c