Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-17 16:59:18 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-17 16:59:54 +0200
commit97b8dd671fc7d444e3a9aeab907053c3ad7d0afb (patch)
tree96c2aaac728f4d0ec67f9ab7b2da57c75e05704e
parent8a37efe023be54e207bd09969eaf43f20ffe3522 (diff)
drm/pl111: Initialize clock spinlock early (bsc#1111666).
-rw-r--r--patches.drm/drm-pl111-Initialize-clock-spinlock-early.patch67
-rw-r--r--series.conf1
2 files changed, 68 insertions, 0 deletions
diff --git a/patches.drm/drm-pl111-Initialize-clock-spinlock-early.patch b/patches.drm/drm-pl111-Initialize-clock-spinlock-early.patch
new file mode 100644
index 0000000000..19e11bb2e1
--- /dev/null
+++ b/patches.drm/drm-pl111-Initialize-clock-spinlock-early.patch
@@ -0,0 +1,67 @@
+From 3e01ae2612bdd7975c74ec7123d7f8f5e6eed795 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Mon, 13 May 2019 07:46:21 -0700
+Subject: [PATCH] drm/pl111: Initialize clock spinlock early
+Git-commit: 3e01ae2612bdd7975c74ec7123d7f8f5e6eed795
+Patch-mainline: v5.2-rc1
+References: bsc#1111666
+
+The following warning is seen on systems with broken clock divider.
+
+Info: trying to register non-static key.
+the code is fine but needs lockdep annotation.
+turning off the locking correctness validator.
+Cpu: 0 PID: 1 Comm: swapper Not tainted 5.1.0-09698-g1fb3b52 #1
+Hardware name: ARM Integrator/CP (Device Tree)
+[<c0011be8>] (unwind_backtrace) from [<c000ebb8>] (show_stack+0x10/0x18)
+[<c000ebb8>] (show_stack) from [<c07d3fd0>] (dump_stack+0x18/0x24)
+[<c07d3fd0>] (dump_stack) from [<c0060d48>] (register_lock_class+0x674/0x6f8)
+[<c0060d48>] (register_lock_class) from [<c005de2c>]
+ (__lock_acquire+0x68/0x2128)
+[<c005de2c>] (__lock_acquire) from [<c0060408>] (lock_acquire+0x110/0x21c)
+[<c0060408>] (lock_acquire) from [<c07f755c>] (_raw_spin_lock+0x34/0x48)
+[<c07f755c>] (_raw_spin_lock) from [<c0536c8c>]
+ (pl111_display_enable+0xf8/0x5fc)
+[<c0536c8c>] (pl111_display_enable) from [<c0502f54>]
+ (drm_atomic_helper_commit_modeset_enables+0x1ec/0x244)
+
+Since commit eedd6033b4c8 ("drm/pl111: Support variants with broken clock
+divider"), the spinlock is not initialized if the clock divider is broken.
+Initialize it earlier to fix the problem.
+
+Fixes: eedd6033b4c8 ("drm/pl111: Support variants with broken clock divider")
+Cc: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Link: https://patchwork.freedesktop.org/patch/msgid/1557758781-23586-1-git-send-email-linux@roeck-us.net
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/pl111/pl111_display.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c
+index 0c5d391f0a8f..4501597f30ab 100644
+--- a/drivers/gpu/drm/pl111/pl111_display.c
++++ b/drivers/gpu/drm/pl111/pl111_display.c
+@@ -531,14 +531,15 @@ pl111_init_clock_divider(struct drm_device *drm)
+ dev_err(drm->dev, "CLCD: unable to get clcdclk.\n");
+ return PTR_ERR(parent);
+ }
++
++ spin_lock_init(&priv->tim2_lock);
++
+ /* If the clock divider is broken, use the parent directly */
+ if (priv->variant->broken_clockdivider) {
+ priv->clk = parent;
+ return 0;
+ }
+ parent_name = __clk_get_name(parent);
+-
+- spin_lock_init(&priv->tim2_lock);
+ div->init = &init;
+
+ ret = devm_clk_hw_register(drm->dev, div);
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 9eab24a33d..3b9781158c 100644
--- a/series.conf
+++ b/series.conf
@@ -45885,6 +45885,7 @@
patches.drivers/PCI-Mark-Atheros-AR9462-to-avoid-bus-reset.patch
patches.drivers/backlight-lm3630a-Return-0-on-success-in-update_stat.patch
patches.fixes/ACPI-PM-Set-enable_for_wake-for-wakeup-GPEs-during-s.patch
+ patches.drm/drm-pl111-Initialize-clock-spinlock-early.patch
# dhowells/linux-fs keys-uefi
patches.suse/0001-KEYS-Allow-unrestricted-boot-time-addition-of-keys-t.patch