diff options
Diffstat (limited to '0008-drm-i915-Add-distrust_bios_wm-flag-to-dev_priv-v2.patch')
-rw-r--r-- | 0008-drm-i915-Add-distrust_bios_wm-flag-to-dev_priv-v2.patch | 74 |
1 files changed, 32 insertions, 42 deletions
diff --git a/0008-drm-i915-Add-distrust_bios_wm-flag-to-dev_priv-v2.patch b/0008-drm-i915-Add-distrust_bios_wm-flag-to-dev_priv-v2.patch index 7a45a28a4..9131a60da 100644 --- a/0008-drm-i915-Add-distrust_bios_wm-flag-to-dev_priv-v2.patch +++ b/0008-drm-i915-Add-distrust_bios_wm-flag-to-dev_priv-v2.patch @@ -1,39 +1,29 @@ -From 0126336af286ea85c1137ad13882f8c93d74c6c3 Mon Sep 17 00:00:00 2001 -From: Fedora Kernel Team <kernel-team@fedoraproject.org> -Date: Mon, 20 Jun 2016 12:40:13 +0200 +From 7207eecfcb3095442bce30227b551003edc7b908 Mon Sep 17 00:00:00 2001 +From: Matt Roper <matthew.d.roper@intel.com> +Date: Thu, 12 May 2016 07:06:02 -0700 Subject: [PATCH 08/17] drm/i915: Add distrust_bios_wm flag to dev_priv (v2) -Upstream: since drm-intel-next-2016-05-22 -commit 279e99d76e6097ee7b531114777fa9b030496d81 +SKL-style platforms can't fully trust the watermark/DDB settings +programmed by the BIOS and need to do extra sanitization on their first +atomic update. Add a flag to dev_priv that is set during hardware +readout and cleared at the end of the first commit. -Author: Matt Roper <matthew.d.roper@intel.com> -AuthorDate: Thu May 12 07:06:02 2016 -0700 -Commit: Matt Roper <matthew.d.roper@intel.com> -CommitDate: Fri May 13 07:33:54 2016 -0700 +Note that for the somewhat common case where everything is turned off +when the driver starts up, we don't need to bother with a recompute...we +know exactly what the DDB should be (all zero's) so just setup the DDB +directly in that case. - drm/i915: Add distrust_bios_wm flag to dev_priv (v2) +v2: + - Move clearing of distrust_bios_wm up below the swap_state call since + it's a more natural / self-explanatory location. (Maarten) + - Use dev_priv->active_crtcs to test whether any CRTC's are turned on + during HW WM readout rather than trying to count the active CRTC's + again ourselves. (Maarten) - SKL-style platforms can't fully trust the watermark/DDB settings - programmed by the BIOS and need to do extra sanitization on their first - atomic update. Add a flag to dev_priv that is set during hardware - readout and cleared at the end of the first commit. - - Note that for the somewhat common case where everything is turned off - when the driver starts up, we don't need to bother with a recompute...we - know exactly what the DDB should be (all zero's) so just setup the DDB - directly in that case. - - v2: - - Move clearing of distrust_bios_wm up below the swap_state call since - it's a more natural / self-explanatory location. (Maarten) - - Use dev_priv->active_crtcs to test whether any CRTC's are turned on - during HW WM readout rather than trying to count the active CRTC's - again ourselves. (Maarten) - - Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - Signed-off-by: Matt Roper <matthew.d.roper@intel.com> - Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-9-git-send-email-matthew.d.roper@intel.com +Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> +Signed-off-by: Matt Roper <matthew.d.roper@intel.com> +Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> +Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-9-git-send-email-matthew.d.roper@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 7 +++++++ drivers/gpu/drm/i915/intel_display.c | 1 + @@ -41,13 +31,13 @@ CommitDate: Fri May 13 07:33:54 2016 -0700 3 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h -index 804af6f..ae7932a 100644 +index 611c128..e21960d 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h -@@ -1986,6 +1986,13 @@ struct drm_i915_private { - }; - - uint8_t max_level; +@@ -1981,6 +1981,13 @@ struct drm_i915_private { + * cstate->wm.need_postvbl_update. + */ + struct mutex wm_mutex; + + /* + * Set during HW readout of watermarks/DDB. Some platforms @@ -59,22 +49,22 @@ index 804af6f..ae7932a 100644 struct i915_runtime_pm pm; diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c -index f53df81..786f3d9 100644 +index f26d1c5..a9d2e30 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c -@@ -13516,6 +13516,7 @@ static int intel_atomic_commit(struct drm_device *dev, +@@ -13621,6 +13621,7 @@ static int intel_atomic_commit(struct drm_device *dev, drm_atomic_helper_swap_state(dev, state); - dev_priv->wm.config = to_intel_atomic_state(state)->wm_config; + dev_priv->wm.config = intel_state->wm_config; + dev_priv->wm.distrust_bios_wm = false; + intel_shared_dpll_commit(state); if (intel_state->modeset) { - memcpy(dev_priv->min_pixclk, intel_state->min_pixclk, diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c -index ee82b1f..6a09d7a 100644 +index f009d43..a49faa7 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c -@@ -3967,6 +3967,14 @@ void skl_wm_get_hw_state(struct drm_device *dev) +@@ -4026,6 +4026,14 @@ void skl_wm_get_hw_state(struct drm_device *dev) list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) skl_pipe_wm_get_hw_state(crtc); |