|
@@ -1502,8 +1502,7 @@ static void i965_update_wm(struct drm_crtc *unused_crtc)
|
|
if (crtc) {
|
|
if (crtc) {
|
|
/* self-refresh has much higher latency */
|
|
/* self-refresh has much higher latency */
|
|
static const int sr_latency_ns = 12000;
|
|
static const int sr_latency_ns = 12000;
|
|
- const struct drm_display_mode *adjusted_mode =
|
|
|
|
- &to_intel_crtc(crtc)->config->base.adjusted_mode;
|
|
|
|
|
|
+ const struct drm_display_mode *adjusted_mode = &to_intel_crtc(crtc)->config->base.adjusted_mode;
|
|
int clock = adjusted_mode->crtc_clock;
|
|
int clock = adjusted_mode->crtc_clock;
|
|
int htotal = adjusted_mode->crtc_htotal;
|
|
int htotal = adjusted_mode->crtc_htotal;
|
|
int hdisplay = to_intel_crtc(crtc)->config->pipe_src_w;
|
|
int hdisplay = to_intel_crtc(crtc)->config->pipe_src_w;
|
|
@@ -1650,8 +1649,7 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc)
|
|
if (HAS_FW_BLC(dev) && enabled) {
|
|
if (HAS_FW_BLC(dev) && enabled) {
|
|
/* self-refresh has much higher latency */
|
|
/* self-refresh has much higher latency */
|
|
static const int sr_latency_ns = 6000;
|
|
static const int sr_latency_ns = 6000;
|
|
- const struct drm_display_mode *adjusted_mode =
|
|
|
|
- &to_intel_crtc(enabled)->config->base.adjusted_mode;
|
|
|
|
|
|
+ const struct drm_display_mode *adjusted_mode = &to_intel_crtc(enabled)->config->base.adjusted_mode;
|
|
int clock = adjusted_mode->crtc_clock;
|
|
int clock = adjusted_mode->crtc_clock;
|
|
int htotal = adjusted_mode->crtc_htotal;
|
|
int htotal = adjusted_mode->crtc_htotal;
|
|
int hdisplay = to_intel_crtc(enabled)->config->pipe_src_w;
|
|
int hdisplay = to_intel_crtc(enabled)->config->pipe_src_w;
|
|
@@ -2088,7 +2086,7 @@ hsw_compute_linetime_wm(struct drm_device *dev, struct drm_crtc *crtc)
|
|
{
|
|
{
|
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
|
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
|
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
|
- struct drm_display_mode *mode = &intel_crtc->config->base.adjusted_mode;
|
|
|
|
|
|
+ struct drm_display_mode *adjusted_mode = &intel_crtc->config->base.adjusted_mode;
|
|
u32 linetime, ips_linetime;
|
|
u32 linetime, ips_linetime;
|
|
|
|
|
|
if (!intel_crtc->active)
|
|
if (!intel_crtc->active)
|
|
@@ -2097,9 +2095,9 @@ hsw_compute_linetime_wm(struct drm_device *dev, struct drm_crtc *crtc)
|
|
/* The WM are computed with base on how long it takes to fill a single
|
|
/* The WM are computed with base on how long it takes to fill a single
|
|
* row at the given clock rate, multiplied by 8.
|
|
* row at the given clock rate, multiplied by 8.
|
|
* */
|
|
* */
|
|
- linetime = DIV_ROUND_CLOSEST(mode->crtc_htotal * 1000 * 8,
|
|
|
|
- mode->crtc_clock);
|
|
|
|
- ips_linetime = DIV_ROUND_CLOSEST(mode->crtc_htotal * 1000 * 8,
|
|
|
|
|
|
+ linetime = DIV_ROUND_CLOSEST(adjusted_mode->crtc_htotal * 1000 * 8,
|
|
|
|
+ adjusted_mode->crtc_clock);
|
|
|
|
+ ips_linetime = DIV_ROUND_CLOSEST(adjusted_mode->crtc_htotal * 1000 * 8,
|
|
dev_priv->cdclk_freq);
|
|
dev_priv->cdclk_freq);
|
|
|
|
|
|
return PIPE_WM_LINETIME_IPS_LINETIME(ips_linetime) |
|
|
return PIPE_WM_LINETIME_IPS_LINETIME(ips_linetime) |
|