diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-16 16:06:30 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-16 16:06:30 -0500 |
commit | 0d9d349d8788d30f3fc3bb39279c370f94d9dbec (patch) | |
tree | 874f301d180bd2a80dee68ec4caf79ff64f9bed9 /drivers/gpu/drm/i915/intel_pm.c | |
parent | cba1c07377132fb87b2c73b395ef386da7e03f60 (diff) | |
parent | 145830dfb005961cb507a578c9d2e7622f0b3716 (diff) |
Merge commit origin/master into drm-intel-next
Conflicts are getting out of hand, and now we have to shuffle even
more in -next which was also shuffled in -fixes (the call for
drm_mode_config_reset needs to move yet again).
So do a proper backmerge. I wanted to wait with this for the 3.13
relaese, but alas let's just do this now.
Conflicts:
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_pm.c
Besides the conflict around the forcewake get/put (where we chaged the
called function in -fixes and added a new parameter in -next) code all
the current conflicts are of the adjacent lines changed type.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 9998185fdb22..d77cc81900f9 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -1113,7 +1113,7 @@ static bool g4x_compute_wm0(struct drm_device *dev, | |||
1113 | 1113 | ||
1114 | adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; | 1114 | adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; |
1115 | clock = adjusted_mode->crtc_clock; | 1115 | clock = adjusted_mode->crtc_clock; |
1116 | htotal = adjusted_mode->htotal; | 1116 | htotal = adjusted_mode->crtc_htotal; |
1117 | hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; | 1117 | hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; |
1118 | pixel_size = crtc->fb->bits_per_pixel / 8; | 1118 | pixel_size = crtc->fb->bits_per_pixel / 8; |
1119 | 1119 | ||
@@ -1200,7 +1200,7 @@ static bool g4x_compute_srwm(struct drm_device *dev, | |||
1200 | crtc = intel_get_crtc_for_plane(dev, plane); | 1200 | crtc = intel_get_crtc_for_plane(dev, plane); |
1201 | adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; | 1201 | adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; |
1202 | clock = adjusted_mode->crtc_clock; | 1202 | clock = adjusted_mode->crtc_clock; |
1203 | htotal = adjusted_mode->htotal; | 1203 | htotal = adjusted_mode->crtc_htotal; |
1204 | hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; | 1204 | hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; |
1205 | pixel_size = crtc->fb->bits_per_pixel / 8; | 1205 | pixel_size = crtc->fb->bits_per_pixel / 8; |
1206 | 1206 | ||
@@ -1431,7 +1431,7 @@ static void i965_update_wm(struct drm_crtc *unused_crtc) | |||
1431 | const struct drm_display_mode *adjusted_mode = | 1431 | const struct drm_display_mode *adjusted_mode = |
1432 | &to_intel_crtc(crtc)->config.adjusted_mode; | 1432 | &to_intel_crtc(crtc)->config.adjusted_mode; |
1433 | int clock = adjusted_mode->crtc_clock; | 1433 | int clock = adjusted_mode->crtc_clock; |
1434 | int htotal = adjusted_mode->htotal; | 1434 | int htotal = adjusted_mode->crtc_htotal; |
1435 | int hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; | 1435 | int hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; |
1436 | int pixel_size = crtc->fb->bits_per_pixel / 8; | 1436 | int pixel_size = crtc->fb->bits_per_pixel / 8; |
1437 | unsigned long line_time_us; | 1437 | unsigned long line_time_us; |
@@ -1557,7 +1557,7 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc) | |||
1557 | const struct drm_display_mode *adjusted_mode = | 1557 | const struct drm_display_mode *adjusted_mode = |
1558 | &to_intel_crtc(enabled)->config.adjusted_mode; | 1558 | &to_intel_crtc(enabled)->config.adjusted_mode; |
1559 | int clock = adjusted_mode->crtc_clock; | 1559 | int clock = adjusted_mode->crtc_clock; |
1560 | int htotal = adjusted_mode->htotal; | 1560 | int htotal = adjusted_mode->crtc_htotal; |
1561 | int hdisplay = to_intel_crtc(enabled)->config.pipe_src_w; | 1561 | int hdisplay = to_intel_crtc(enabled)->config.pipe_src_w; |
1562 | int pixel_size = enabled->fb->bits_per_pixel / 8; | 1562 | int pixel_size = enabled->fb->bits_per_pixel / 8; |
1563 | unsigned long line_time_us; | 1563 | unsigned long line_time_us; |
@@ -1985,8 +1985,9 @@ hsw_compute_linetime_wm(struct drm_device *dev, struct drm_crtc *crtc) | |||
1985 | /* The WM are computed with base on how long it takes to fill a single | 1985 | /* The WM are computed with base on how long it takes to fill a single |
1986 | * row at the given clock rate, multiplied by 8. | 1986 | * row at the given clock rate, multiplied by 8. |
1987 | * */ | 1987 | * */ |
1988 | linetime = DIV_ROUND_CLOSEST(mode->htotal * 1000 * 8, mode->clock); | 1988 | linetime = DIV_ROUND_CLOSEST(mode->crtc_htotal * 1000 * 8, |
1989 | ips_linetime = DIV_ROUND_CLOSEST(mode->htotal * 1000 * 8, | 1989 | mode->crtc_clock); |
1990 | ips_linetime = DIV_ROUND_CLOSEST(mode->crtc_htotal * 1000 * 8, | ||
1990 | intel_ddi_get_cdclk_freq(dev_priv)); | 1991 | intel_ddi_get_cdclk_freq(dev_priv)); |
1991 | 1992 | ||
1992 | return PIPE_WM_LINETIME_IPS_LINETIME(ips_linetime) | | 1993 | return PIPE_WM_LINETIME_IPS_LINETIME(ips_linetime) | |
@@ -5722,10 +5723,19 @@ int vlv_freq_opcode(struct drm_i915_private *dev_priv, int val) | |||
5722 | return DIV_ROUND_CLOSEST(4 * mul * val, dev_priv->mem_freq) + 0xbd - 6; | 5723 | return DIV_ROUND_CLOSEST(4 * mul * val, dev_priv->mem_freq) + 0xbd - 6; |
5723 | } | 5724 | } |
5724 | 5725 | ||
5725 | void intel_pm_init(struct drm_device *dev) | 5726 | void intel_pm_setup(struct drm_device *dev) |
5726 | { | 5727 | { |
5727 | struct drm_i915_private *dev_priv = dev->dev_private; | 5728 | struct drm_i915_private *dev_priv = dev->dev_private; |
5728 | 5729 | ||
5730 | mutex_init(&dev_priv->rps.hw_lock); | ||
5731 | |||
5732 | mutex_init(&dev_priv->pc8.lock); | ||
5733 | dev_priv->pc8.requirements_met = false; | ||
5734 | dev_priv->pc8.gpu_idle = false; | ||
5735 | dev_priv->pc8.irqs_disabled = false; | ||
5736 | dev_priv->pc8.enabled = false; | ||
5737 | dev_priv->pc8.disable_count = 2; /* requirements_met + gpu_idle */ | ||
5738 | INIT_DELAYED_WORK(&dev_priv->pc8.enable_work, hsw_enable_pc8_work); | ||
5729 | INIT_DELAYED_WORK(&dev_priv->rps.delayed_resume_work, | 5739 | INIT_DELAYED_WORK(&dev_priv->rps.delayed_resume_work, |
5730 | intel_gen6_powersave_work); | 5740 | intel_gen6_powersave_work); |
5731 | } | 5741 | } |