drm/i915: Readout initial hw mode.
drm/i915: Readout initial hw mode, v2. Atomic requires a mode blob when crtc_state->enable is true, or you get a huge warn_on. With a few tweaks the mode we read out from hardware could be used as the real mode without a modeset, but this requires too much testing, so for now force a modeset the first time the mode blob's updated. This preserves the old behavior, because previously we never set the initial mode, which always meant that a modeset happened when the mode was first set. Changes since v1: - Add a description in intel_modeset_readout_hw_state of how the recalculation is done. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:

committed by
Daniel Vetter

parent
3a03dfb057
commit
5c1e342619
@@ -483,18 +483,13 @@ retry:
|
||||
* IMPORTANT: We want to use the adjusted mode (i.e.
|
||||
* after the panel fitter upscaling) as the initial
|
||||
* config, not the input mode, which is what crtc->mode
|
||||
* usually contains. But since our current fastboot
|
||||
* usually contains. But since our current
|
||||
* code puts a mode derived from the post-pfit timings
|
||||
* into crtc->mode this works out correctly. We don't
|
||||
* use hwmode anywhere right now, so use it for this
|
||||
* since the fb helper layer wants a pointer to
|
||||
* something we own.
|
||||
* into crtc->mode this works out correctly.
|
||||
*/
|
||||
DRM_DEBUG_KMS("looking for current mode on connector %s\n",
|
||||
connector->name);
|
||||
intel_mode_from_pipe_config(&encoder->crtc->hwmode,
|
||||
to_intel_crtc(encoder->crtc)->config);
|
||||
modes[i] = &encoder->crtc->hwmode;
|
||||
modes[i] = &encoder->crtc->mode;
|
||||
}
|
||||
crtcs[i] = new_crtc;
|
||||
|
||||
|
Reference in New Issue
Block a user