Commit 679dacd4 authored by Ander Conselvan de Oliveira's avatar Ander Conselvan de Oliveira Committed by Daniel Vetter

drm/i915: Pass an atomic state to modeset_global_resources() functions

Follow up patches will convert some functions called from there to use
the atomic state, instead of directly accessing the new or current
config. This patch just changes the parameters, but shouldn't have any
functional changes.
Signed-off-by: default avatarAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 72744cb1
...@@ -555,7 +555,7 @@ struct drm_i915_display_funcs { ...@@ -555,7 +555,7 @@ struct drm_i915_display_funcs {
struct drm_crtc *crtc, struct drm_crtc *crtc,
uint32_t sprite_width, uint32_t sprite_height, uint32_t sprite_width, uint32_t sprite_height,
int pixel_size, bool enable, bool scaled); int pixel_size, bool enable, bool scaled);
void (*modeset_global_resources)(struct drm_device *dev); void (*modeset_global_resources)(struct drm_atomic_state *state);
/* Returns the active state of the crtc, and if the crtc is active, /* Returns the active state of the crtc, and if the crtc is active,
* fills out the pipe-config with the hw state. */ * fills out the pipe-config with the hw state. */
bool (*get_pipe_config)(struct intel_crtc *, bool (*get_pipe_config)(struct intel_crtc *,
......
...@@ -4930,8 +4930,9 @@ static unsigned long get_crtc_power_domains(struct drm_crtc *crtc) ...@@ -4930,8 +4930,9 @@ static unsigned long get_crtc_power_domains(struct drm_crtc *crtc)
return mask; return mask;
} }
static void modeset_update_crtc_power_domains(struct drm_device *dev) static void modeset_update_crtc_power_domains(struct drm_atomic_state *state)
{ {
struct drm_device *dev = state->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
unsigned long pipe_domains[I915_MAX_PIPES] = { 0, }; unsigned long pipe_domains[I915_MAX_PIPES] = { 0, };
struct intel_crtc *crtc; struct intel_crtc *crtc;
...@@ -4953,7 +4954,7 @@ static void modeset_update_crtc_power_domains(struct drm_device *dev) ...@@ -4953,7 +4954,7 @@ static void modeset_update_crtc_power_domains(struct drm_device *dev)
} }
if (dev_priv->display.modeset_global_resources) if (dev_priv->display.modeset_global_resources)
dev_priv->display.modeset_global_resources(dev); dev_priv->display.modeset_global_resources(state);
for_each_intel_crtc(dev, crtc) { for_each_intel_crtc(dev, crtc) {
enum intel_display_power_domain domain; enum intel_display_power_domain domain;
...@@ -5201,8 +5202,9 @@ static void vlv_program_pfi_credits(struct drm_i915_private *dev_priv) ...@@ -5201,8 +5202,9 @@ static void vlv_program_pfi_credits(struct drm_i915_private *dev_priv)
WARN_ON(I915_READ(GCI_CONTROL) & PFI_CREDIT_RESEND); WARN_ON(I915_READ(GCI_CONTROL) & PFI_CREDIT_RESEND);
} }
static void valleyview_modeset_global_resources(struct drm_device *dev) static void valleyview_modeset_global_resources(struct drm_atomic_state *state)
{ {
struct drm_device *dev = state->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int max_pixclk = intel_mode_max_pixclk(dev_priv); int max_pixclk = intel_mode_max_pixclk(dev_priv);
int req_cdclk = valleyview_calc_cdclk(dev_priv, max_pixclk); int req_cdclk = valleyview_calc_cdclk(dev_priv, max_pixclk);
...@@ -11506,7 +11508,7 @@ static int __intel_set_mode(struct drm_crtc *crtc, ...@@ -11506,7 +11508,7 @@ static int __intel_set_mode(struct drm_crtc *crtc,
* update the the output configuration. */ * update the the output configuration. */
intel_modeset_update_state(dev, prepare_pipes); intel_modeset_update_state(dev, prepare_pipes);
modeset_update_crtc_power_domains(dev); modeset_update_crtc_power_domains(pipe_config->base.state);
/* Set up the DPLL and any encoders state that needs to adjust or depend /* Set up the DPLL and any encoders state that needs to adjust or depend
* on the DPLL. * on the DPLL.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment