]> git.ipfire.org Git - people/ms/linux.git/commit
drm/i915: Workaround broken BIOS DBUF configuration on TGL/RKL
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 4 Feb 2022 14:18:18 +0000 (16:18 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 7 Feb 2022 09:10:32 +0000 (11:10 +0200)
commit15512021eb3975a8c2366e3883337e252bb0eee5
treefdd5ad24fdfe320f7592b3c05d388d4b1d54f384
parentb3dcc6dc0f32612d04839c2fb32e94d0ebf92c98
drm/i915: Workaround broken BIOS DBUF configuration on TGL/RKL

On TGL/RKL the BIOS likes to use some kind of bogus DBUF layout
that doesn't match what the spec recommends. With a single active
pipe that is not going to be a problem, but with multiple pipes
active skl_commit_modeset_enables() goes into an infinite loop
since it can't figure out any order in which it can commit the
pipes without causing DBUF overlaps between the planes.

We'd need some kind of extra DBUF defrag stage in between to
make the transition possible. But that is clearly way too complex
a solution, so in the name of simplicity let's just sanitize the
DBUF state by simply turning off all planes when we detect a
pipe encroaching on its neighbours' DBUF slices. We only have
to disable the primary planes as all other planes should have
already been disabled (if they somehow were enabled) by
earlier sanitization steps.

And for good measure let's also sanitize in case the DBUF
allocations of the pipes already seem to overlap each other.

Cc: <stable@vger.kernel.org> # v5.14+
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4762
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220204141818.1900-3-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/i915/intel_pm.h