aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2015-03-20 10:18:15 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-27 05:01:48 -0400
commit679dacd430cac3f58fc80db69c1694621ede00fc (patch)
tree2d8eda374a7de3ed629b14991a4afefa40634718
parent72744cb13c9ccc248331462f35468398160338bf (diff)
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: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 256369f29975..f80edab9e6cc 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -555,7 +555,7 @@ struct drm_i915_display_funcs {
555 struct drm_crtc *crtc, 555 struct drm_crtc *crtc,
556 uint32_t sprite_width, uint32_t sprite_height, 556 uint32_t sprite_width, uint32_t sprite_height,
557 int pixel_size, bool enable, bool scaled); 557 int pixel_size, bool enable, bool scaled);
558 void (*modeset_global_resources)(struct drm_device *dev); 558 void (*modeset_global_resources)(struct drm_atomic_state *state);
559 /* Returns the active state of the crtc, and if the crtc is active, 559 /* Returns the active state of the crtc, and if the crtc is active,
560 * fills out the pipe-config with the hw state. */ 560 * fills out the pipe-config with the hw state. */
561 bool (*get_pipe_config)(struct intel_crtc *, 561 bool (*get_pipe_config)(struct intel_crtc *,
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 034aa7e8e683..871c61b1f7af 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4930,8 +4930,9 @@ static unsigned long get_crtc_power_domains(struct drm_crtc *crtc)
4930 return mask; 4930 return mask;
4931} 4931}
4932 4932
4933static void modeset_update_crtc_power_domains(struct drm_device *dev) 4933static void modeset_update_crtc_power_domains(struct drm_atomic_state *state)
4934{ 4934{
4935 struct drm_device *dev = state->dev;
4935 struct drm_i915_private *dev_priv = dev->dev_private; 4936 struct drm_i915_private *dev_priv = dev->dev_private;
4936 unsigned long pipe_domains[I915_MAX_PIPES] = { 0, }; 4937 unsigned long pipe_domains[I915_MAX_PIPES] = { 0, };
4937 struct intel_crtc *crtc; 4938 struct intel_crtc *crtc;
@@ -4953,7 +4954,7 @@ static void modeset_update_crtc_power_domains(struct drm_device *dev)
4953 } 4954 }
4954 4955
4955 if (dev_priv->display.modeset_global_resources) 4956 if (dev_priv->display.modeset_global_resources)
4956 dev_priv->display.modeset_global_resources(dev); 4957 dev_priv->display.modeset_global_resources(state);
4957 4958
4958 for_each_intel_crtc(dev, crtc) { 4959 for_each_intel_crtc(dev, crtc) {
4959 enum intel_display_power_domain domain; 4960 enum intel_display_power_domain domain;
@@ -5201,8 +5202,9 @@ static void vlv_program_pfi_credits(struct drm_i915_private *dev_priv)
5201 WARN_ON(I915_READ(GCI_CONTROL) & PFI_CREDIT_RESEND); 5202 WARN_ON(I915_READ(GCI_CONTROL) & PFI_CREDIT_RESEND);
5202} 5203}
5203 5204
5204static void valleyview_modeset_global_resources(struct drm_device *dev) 5205static void valleyview_modeset_global_resources(struct drm_atomic_state *state)
5205{ 5206{
5207 struct drm_device *dev = state->dev;
5206 struct drm_i915_private *dev_priv = dev->dev_private; 5208 struct drm_i915_private *dev_priv = dev->dev_private;
5207 int max_pixclk = intel_mode_max_pixclk(dev_priv); 5209 int max_pixclk = intel_mode_max_pixclk(dev_priv);
5208 int req_cdclk = valleyview_calc_cdclk(dev_priv, max_pixclk); 5210 int req_cdclk = valleyview_calc_cdclk(dev_priv, max_pixclk);
@@ -11506,7 +11508,7 @@ static int __intel_set_mode(struct drm_crtc *crtc,
11506 * update the the output configuration. */ 11508 * update the the output configuration. */
11507 intel_modeset_update_state(dev, prepare_pipes); 11509 intel_modeset_update_state(dev, prepare_pipes);
11508 11510
11509 modeset_update_crtc_power_domains(dev); 11511 modeset_update_crtc_power_domains(pipe_config->base.state);
11510 11512
11511 /* Set up the DPLL and any encoders state that needs to adjust or depend 11513 /* Set up the DPLL and any encoders state that needs to adjust or depend
11512 * on the DPLL. 11514 * on the DPLL.