diff options
author | Dave Airlie <airlied@redhat.com> | 2015-05-21 23:31:03 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-05-21 23:31:03 -0400 |
commit | bb4358973ae2c0b7ead1fdd36e0e75943009e60c (patch) | |
tree | 1db8570e224e72388a6c3365fdbc7b1fd08a7412 /drivers/gpu | |
parent | 755c814a7d826257d5488cfaa801ec19377c472a (diff) | |
parent | 54da691deb123c045259ebf4f5c67381244f58f1 (diff) |
Merge tag 'drm-intel-fixes-2015-05-21' of git://anongit.freedesktop.org/drm-intel into drm-fixes
There's a stable backport from Ander [1] that combines this and a few
other commits to fix the flickering on v4.0, reported in [2] among
others. Having this upstream is obviously a requirement for stable.
* tag 'drm-intel-fixes-2015-05-21' of git://anongit.freedesktop.org/drm-intel:
drm/i915: fix screen flickering
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index fa4ccb346389..555b896d2bda 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -2045,22 +2045,20 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc, | |||
2045 | p->pipe_htotal = intel_crtc->config->base.adjusted_mode.crtc_htotal; | 2045 | p->pipe_htotal = intel_crtc->config->base.adjusted_mode.crtc_htotal; |
2046 | p->pixel_rate = ilk_pipe_pixel_rate(dev, crtc); | 2046 | p->pixel_rate = ilk_pipe_pixel_rate(dev, crtc); |
2047 | 2047 | ||
2048 | if (crtc->primary->state->fb) { | 2048 | if (crtc->primary->state->fb) |
2049 | p->pri.enabled = true; | ||
2050 | p->pri.bytes_per_pixel = | 2049 | p->pri.bytes_per_pixel = |
2051 | crtc->primary->state->fb->bits_per_pixel / 8; | 2050 | crtc->primary->state->fb->bits_per_pixel / 8; |
2052 | } else { | 2051 | else |
2053 | p->pri.enabled = false; | 2052 | p->pri.bytes_per_pixel = 4; |
2054 | p->pri.bytes_per_pixel = 0; | 2053 | |
2055 | } | 2054 | p->cur.bytes_per_pixel = 4; |
2055 | /* | ||
2056 | * TODO: for now, assume primary and cursor planes are always enabled. | ||
2057 | * Setting them to false makes the screen flicker. | ||
2058 | */ | ||
2059 | p->pri.enabled = true; | ||
2060 | p->cur.enabled = true; | ||
2056 | 2061 | ||
2057 | if (crtc->cursor->state->fb) { | ||
2058 | p->cur.enabled = true; | ||
2059 | p->cur.bytes_per_pixel = 4; | ||
2060 | } else { | ||
2061 | p->cur.enabled = false; | ||
2062 | p->cur.bytes_per_pixel = 0; | ||
2063 | } | ||
2064 | p->pri.horiz_pixels = intel_crtc->config->pipe_src_w; | 2062 | p->pri.horiz_pixels = intel_crtc->config->pipe_src_w; |
2065 | p->cur.horiz_pixels = intel_crtc->base.cursor->state->crtc_w; | 2063 | p->cur.horiz_pixels = intel_crtc->base.cursor->state->crtc_w; |
2066 | 2064 | ||