|
@@ -1434,23 +1434,22 @@ static void i845_update_wm(struct drm_crtc *unused_crtc)
|
|
|
I915_WRITE(FW_BLC, fwater_lo);
|
|
|
}
|
|
|
|
|
|
-static uint32_t ilk_pipe_pixel_rate(struct drm_device *dev,
|
|
|
- struct drm_crtc *crtc)
|
|
|
+uint32_t ilk_pipe_pixel_rate(const struct intel_crtc_state *pipe_config)
|
|
|
{
|
|
|
- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
|
|
uint32_t pixel_rate;
|
|
|
|
|
|
- pixel_rate = intel_crtc->config->base.adjusted_mode.crtc_clock;
|
|
|
+ pixel_rate = pipe_config->base.adjusted_mode.crtc_clock;
|
|
|
|
|
|
/* We only use IF-ID interlacing. If we ever use PF-ID we'll need to
|
|
|
* adjust the pixel_rate here. */
|
|
|
|
|
|
- if (intel_crtc->config->pch_pfit.enabled) {
|
|
|
+ if (pipe_config->pch_pfit.enabled) {
|
|
|
uint64_t pipe_w, pipe_h, pfit_w, pfit_h;
|
|
|
- uint32_t pfit_size = intel_crtc->config->pch_pfit.size;
|
|
|
+ uint32_t pfit_size = pipe_config->pch_pfit.size;
|
|
|
+
|
|
|
+ pipe_w = pipe_config->pipe_src_w;
|
|
|
+ pipe_h = pipe_config->pipe_src_h;
|
|
|
|
|
|
- pipe_w = intel_crtc->config->pipe_src_w;
|
|
|
- pipe_h = intel_crtc->config->pipe_src_h;
|
|
|
pfit_w = (pfit_size >> 16) & 0xFFFF;
|
|
|
pfit_h = pfit_size & 0xFFFF;
|
|
|
if (pipe_w < pfit_w)
|
|
@@ -2066,7 +2065,7 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc,
|
|
|
|
|
|
p->active = true;
|
|
|
p->pipe_htotal = intel_crtc->config->base.adjusted_mode.crtc_htotal;
|
|
|
- p->pixel_rate = ilk_pipe_pixel_rate(dev, crtc);
|
|
|
+ p->pixel_rate = ilk_pipe_pixel_rate(intel_crtc->config);
|
|
|
|
|
|
if (crtc->primary->state->fb)
|
|
|
p->pri.bytes_per_pixel =
|