Commit 50741abcd1b022c6555925837601624ca5a238cd
Committed by
Daniel Vetter
1 parent
7668851fec
Exists in
master
and in
13 other branches
drm/i915: Prepare to track new pipe config per pipe
Add a new_config pointer to intel_crtc which will point to the new pipe config for said crtc while intel_crtc.config will still contain the old config during first parts of the modeset operation. This is a step towards having the entire new state available during the compute phase, so that we can make accurate decisions about global resource usage. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Showing 2 changed files with 6 additions and 0 deletions Side-by-side Diff
drivers/gpu/drm/i915/intel_display.c
... | ... | @@ -9225,6 +9225,7 @@ |
9225 | 9225 | list_for_each_entry(intel_crtc, &dev->mode_config.crtc_list, |
9226 | 9226 | base.head) { |
9227 | 9227 | WARN_ON(intel_crtc->base.enabled != intel_crtc_in_use(&intel_crtc->base)); |
9228 | + WARN_ON(intel_crtc->new_config != &intel_crtc->config); | |
9228 | 9229 | } |
9229 | 9230 | |
9230 | 9231 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
... | ... | @@ -9656,6 +9657,7 @@ |
9656 | 9657 | } |
9657 | 9658 | intel_dump_pipe_config(to_intel_crtc(crtc), pipe_config, |
9658 | 9659 | "[modeset]"); |
9660 | + to_intel_crtc(crtc)->new_config = pipe_config; | |
9659 | 9661 | } |
9660 | 9662 | |
9661 | 9663 | /* |
... | ... | @@ -9689,6 +9691,7 @@ |
9689 | 9691 | /* mode_set/enable/disable functions rely on a correct pipe |
9690 | 9692 | * config. */ |
9691 | 9693 | to_intel_crtc(crtc)->config = *pipe_config; |
9694 | + to_intel_crtc(crtc)->new_config = &to_intel_crtc(crtc)->config; | |
9692 | 9695 | |
9693 | 9696 | /* |
9694 | 9697 | * Calculate and store various constants which |
... | ... | @@ -10260,6 +10263,8 @@ |
10260 | 10263 | dev_priv->plane_to_crtc_mapping[intel_crtc->plane] != NULL); |
10261 | 10264 | dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base; |
10262 | 10265 | dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = &intel_crtc->base; |
10266 | + | |
10267 | + intel_crtc->new_config = &intel_crtc->config; | |
10263 | 10268 | |
10264 | 10269 | drm_crtc_helper_add(&intel_crtc->base, &intel_helper_funcs); |
10265 | 10270 | } |