From b5000422a34832cf9d016fe6a37fb7823171c4c5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 4 Jun 2016 14:21:47 -0700 Subject: [PATCH] 4.4-stable patches added patches: drm-i915-don-t-leave-old-junk-in-ilk-active-watermarks-on-readout.patch drm-imx-match-imx-ipuv3-crtc-components-using-device-node-in-platform-data.patch --- ...-in-ilk-active-watermarks-on-readout.patch | 45 +++++++ ...s-using-device-node-in-platform-data.patch | 124 ++++++++++++++++++ queue-4.4/series | 2 + 3 files changed, 171 insertions(+) create mode 100644 queue-4.4/drm-i915-don-t-leave-old-junk-in-ilk-active-watermarks-on-readout.patch create mode 100644 queue-4.4/drm-imx-match-imx-ipuv3-crtc-components-using-device-node-in-platform-data.patch diff --git a/queue-4.4/drm-i915-don-t-leave-old-junk-in-ilk-active-watermarks-on-readout.patch b/queue-4.4/drm-i915-don-t-leave-old-junk-in-ilk-active-watermarks-on-readout.patch new file mode 100644 index 00000000000..74a24815ef5 --- /dev/null +++ b/queue-4.4/drm-i915-don-t-leave-old-junk-in-ilk-active-watermarks-on-readout.patch @@ -0,0 +1,45 @@ +From 7045c3689f148a0c95f42bae8ef3eb2829ac7de9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= +Date: Fri, 13 May 2016 17:55:17 +0300 +Subject: drm/i915: Don't leave old junk in ilk active watermarks on readout +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ville Syrjälä + +commit 7045c3689f148a0c95f42bae8ef3eb2829ac7de9 upstream. + +When we read out the watermark state from the hardware we're supposed to +transfer that into the active watermarks, but currently we fail to any +part of the active watermarks that isn't explicitly written. Let's clear +it all upfront. + +Looks like this has been like this since the beginning, when I added the +readout. No idea why I didn't clear it up. + +Cc: Matt Roper +Fixes: 243e6a44b9ca ("drm/i915: Init HSW watermark tracking in intel_modeset_setup_hw_state()") +Signed-off-by: Ville Syrjälä +Reviewed-by: Matt Roper +Signed-off-by: Matt Roper +Link: http://patchwork.freedesktop.org/patch/msgid/1463151318-14719-2-git-send-email-ville.syrjala@linux.intel.com +(cherry picked from commit 15606534bf0a65d8a74a90fd57b8712d147dbca6) +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_pm.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_pm.c ++++ b/drivers/gpu/drm/i915/intel_pm.c +@@ -3880,6 +3880,8 @@ static void ilk_pipe_wm_get_hw_state(str + if (IS_HASWELL(dev) || IS_BROADWELL(dev)) + hw->wm_linetime[pipe] = I915_READ(PIPE_WM_LINETIME(pipe)); + ++ memset(active, 0, sizeof(*active)); ++ + active->pipe_enabled = intel_crtc->active; + + if (active->pipe_enabled) { diff --git a/queue-4.4/drm-imx-match-imx-ipuv3-crtc-components-using-device-node-in-platform-data.patch b/queue-4.4/drm-imx-match-imx-ipuv3-crtc-components-using-device-node-in-platform-data.patch new file mode 100644 index 00000000000..5a47b7de8ca --- /dev/null +++ b/queue-4.4/drm-imx-match-imx-ipuv3-crtc-components-using-device-node-in-platform-data.patch @@ -0,0 +1,124 @@ +From 310944d148e3600dcff8b346bee7fa01d34903b1 Mon Sep 17 00:00:00 2001 +From: Philipp Zabel +Date: Thu, 12 May 2016 15:00:44 +0200 +Subject: drm/imx: Match imx-ipuv3-crtc components using device node in platform data +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Philipp Zabel + +commit 310944d148e3600dcff8b346bee7fa01d34903b1 upstream. + +The component master driver imx-drm-core matches component devices using +their of_node. Since commit 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc +module autoloading"), the imx-ipuv3-crtc dev->of_node is not set during +probing. Before that, of_node was set and caused an of: modalias to be +used instead of the platform: modalias, which broke module autoloading. + +On the other hand, if dev->of_node is not set yet when the imx-ipuv3-crtc +probe function calls component_add, component matching in imx-drm-core +fails. While dev->of_node will be set once the next component tries to +bring up the component master, imx-drm-core component binding will never +succeed if one of the crtc devices is probed last. + +Add of_node to the component platform data and match against the +pdata->of_node instead of dev->of_node in imx-drm-core to work around +this problem. + +Fixes: 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading") +Signed-off-by: Philipp Zabel +Tested-by: Fabio Estevam +Tested-by: Lothar Waßmann +Tested-by: Heiko Schocher +Tested-by: Chris Ruehl +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/imx/imx-drm-core.c | 8 ++++++++ + drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +- + drivers/gpu/ipu-v3/ipu-common.c | 5 +++-- + include/video/imx-ipu-v3.h | 2 ++ + 4 files changed, 14 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/imx/imx-drm-core.c ++++ b/drivers/gpu/drm/imx/imx-drm-core.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include