diff options
author | Imre Deak <imre.deak@intel.com> | 2016-02-29 15:10:33 -0500 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2016-03-01 05:40:08 -0500 |
commit | 1d5bf5d9d9ef0c1e639d36178a224d83888c5a29 (patch) | |
tree | c130a56bcd2f15b75940f395d820b83cb716c7a1 /drivers/gpu/drm/i915/intel_display.c | |
parent | c6a2ac712d7dee13c13e44c4c4184478853dcb37 (diff) |
drm/i915: Add missing NULL check before calling initial_watermarks
Not all platforms set this callback, so NULL check it before calling it.
v2:
- Call intel_update_watermarks() on HSW+ where the callback is not set.
(Matt)
CC: Matt Roper <matthew.d.roper@intel.com>
Fixes: commit ed4a6a7ca853 ("drm/i915: Add two-stage ILK-style watermark programming (v11)")
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1456776633-3401-1-git-send-email-imre.deak@intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c803690293d7..368d24728b16 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4957,7 +4957,8 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) | |||
4957 | */ | 4957 | */ |
4958 | intel_crtc_load_lut(crtc); | 4958 | intel_crtc_load_lut(crtc); |
4959 | 4959 | ||
4960 | dev_priv->display.initial_watermarks(intel_crtc->config); | 4960 | if (dev_priv->display.initial_watermarks != NULL) |
4961 | dev_priv->display.initial_watermarks(intel_crtc->config); | ||
4961 | intel_enable_pipe(intel_crtc); | 4962 | intel_enable_pipe(intel_crtc); |
4962 | 4963 | ||
4963 | if (intel_crtc->config->has_pch_encoder) | 4964 | if (intel_crtc->config->has_pch_encoder) |
@@ -5056,7 +5057,10 @@ static void haswell_crtc_enable(struct drm_crtc *crtc) | |||
5056 | if (!intel_crtc->config->has_dsi_encoder) | 5057 | if (!intel_crtc->config->has_dsi_encoder) |
5057 | intel_ddi_enable_transcoder_func(crtc); | 5058 | intel_ddi_enable_transcoder_func(crtc); |
5058 | 5059 | ||
5059 | dev_priv->display.initial_watermarks(pipe_config); | 5060 | if (dev_priv->display.initial_watermarks != NULL) |
5061 | dev_priv->display.initial_watermarks(pipe_config); | ||
5062 | else | ||
5063 | intel_update_watermarks(crtc); | ||
5060 | intel_enable_pipe(intel_crtc); | 5064 | intel_enable_pipe(intel_crtc); |
5061 | 5065 | ||
5062 | if (intel_crtc->config->has_pch_encoder) | 5066 | if (intel_crtc->config->has_pch_encoder) |