]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gen9+: Preserve old allocation from crtc_state.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 8 Nov 2016 12:55:34 +0000 (13:55 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 15 Nov 2016 10:23:11 +0000 (11:23 +0100)
commita52e8e20430b1a911ebcfc88ce33b11640badc05
treeb2156569552882253a4cca17eb635638150e2d73
parent52b3ef21e9c1e3a8638574c1879163dd6d19c25c
drm/i915/gen9+: Preserve old allocation from crtc_state.

This is the last bit required for making nonblocking modesets work
correctly. The state in intel_crtc->hw_ddb is updated in the
nonblocking part of a nonblocking commit.

This means that even attempting a commit before a nonblocking modeset
completes will fail, because intel_crtc->hw_ddb still has stale values.
The stale values are 0 if the crtc is being enabled resulting in a
failure during atomic check, but it may also result in double use of
ddb allocations.

Fix this by explicitly copying the ddb allocation from the old state.
This has to be done explicitly, because a modeset that doesn't change
active pipes, or a modeset converted to a fastset will will clear the
current state.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1478609742-13603-4-git-send-email-maarten.lankhorst@linux.intel.com
[mlankhorst: Reword commit message.]
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_pm.c