mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-17 10:04:14 +08:00
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>
This commit is contained in:
parent
7668851fec
commit
50741abcd1
@ -9225,6 +9225,7 @@ intel_modeset_update_state(struct drm_device *dev, unsigned prepare_pipes)
|
|||||||
list_for_each_entry(intel_crtc, &dev->mode_config.crtc_list,
|
list_for_each_entry(intel_crtc, &dev->mode_config.crtc_list,
|
||||||
base.head) {
|
base.head) {
|
||||||
WARN_ON(intel_crtc->base.enabled != intel_crtc_in_use(&intel_crtc->base));
|
WARN_ON(intel_crtc->base.enabled != intel_crtc_in_use(&intel_crtc->base));
|
||||||
|
WARN_ON(intel_crtc->new_config != &intel_crtc->config);
|
||||||
}
|
}
|
||||||
|
|
||||||
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
|
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
|
||||||
@ -9656,6 +9657,7 @@ static int __intel_set_mode(struct drm_crtc *crtc,
|
|||||||
}
|
}
|
||||||
intel_dump_pipe_config(to_intel_crtc(crtc), pipe_config,
|
intel_dump_pipe_config(to_intel_crtc(crtc), pipe_config,
|
||||||
"[modeset]");
|
"[modeset]");
|
||||||
|
to_intel_crtc(crtc)->new_config = pipe_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -9689,6 +9691,7 @@ static int __intel_set_mode(struct drm_crtc *crtc,
|
|||||||
/* mode_set/enable/disable functions rely on a correct pipe
|
/* mode_set/enable/disable functions rely on a correct pipe
|
||||||
* config. */
|
* config. */
|
||||||
to_intel_crtc(crtc)->config = *pipe_config;
|
to_intel_crtc(crtc)->config = *pipe_config;
|
||||||
|
to_intel_crtc(crtc)->new_config = &to_intel_crtc(crtc)->config;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate and store various constants which
|
* Calculate and store various constants which
|
||||||
@ -10261,6 +10264,8 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
|
|||||||
dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base;
|
dev_priv->plane_to_crtc_mapping[intel_crtc->plane] = &intel_crtc->base;
|
||||||
dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = &intel_crtc->base;
|
dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = &intel_crtc->base;
|
||||||
|
|
||||||
|
intel_crtc->new_config = &intel_crtc->config;
|
||||||
|
|
||||||
drm_crtc_helper_add(&intel_crtc->base, &intel_helper_funcs);
|
drm_crtc_helper_add(&intel_crtc->base, &intel_helper_funcs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,6 +359,7 @@ struct intel_crtc {
|
|||||||
bool cursor_visible;
|
bool cursor_visible;
|
||||||
|
|
||||||
struct intel_crtc_config config;
|
struct intel_crtc_config config;
|
||||||
|
struct intel_crtc_config *new_config;
|
||||||
bool new_enabled;
|
bool new_enabled;
|
||||||
|
|
||||||
uint32_t ddi_pll_sel;
|
uint32_t ddi_pll_sel;
|
||||||
|
Loading…
Reference in New Issue
Block a user