From 66d082174669a8c7f311572e8922d2ba396cc07f Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Tue, 26 Mar 2019 10:20:25 -0700 Subject: Update to internal Signed-off-by: Ed Tanous --- .../0038-media-aspeed-backport-ikvm-patches.patch | 49 ++++++++++++++-------- 1 file changed, 31 insertions(+), 18 deletions(-) (limited to 'meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0038-media-aspeed-backport-ikvm-patches.patch') diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0038-media-aspeed-backport-ikvm-patches.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0038-media-aspeed-backport-ikvm-patches.patch index b618c49da..02e423057 100644 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0038-media-aspeed-backport-ikvm-patches.patch +++ b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0038-media-aspeed-backport-ikvm-patches.patch @@ -1,4 +1,4 @@ -From ba52b9e7f76879f888afce1f8e7e5ff180b7849b Mon Sep 17 00:00:00 2001 +From feb75b023dfd0ebe3e8ca46f0e74603f07542c29 Mon Sep 17 00:00:00 2001 From: Jae Hyun Yoo Date: Fri, 9 Nov 2018 11:32:27 -0800 Subject: [PATCH] Add Aspeed Video Engine Driver @@ -11,8 +11,20 @@ the host processor graphics output. Add a V4L2 driver to capture video data and compress it to JPEG images. Make the video frames available through the V4L2 streaming interface. +media: platform: Fix missing spin_lock_init() + +The driver allocates the spinlock but not initialize it. +Use spin_lock_init() on it to initialize it correctly. + +This is detected by Coccinelle semantic patch. + +Fixes: d2b4387f3bdf ("media: platform: Add Aspeed Video Engine driver") + Signed-off-by: Eddie James +Signed-off-by: Wei Yongjun Reviewed-by: Rob Herring +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jae Hyun Yoo --- .../devicetree/bindings/media/aspeed-video.txt | 26 + @@ -21,9 +33,9 @@ Signed-off-by: Jae Hyun Yoo drivers/clk/clk-aspeed.c | 41 +- drivers/media/platform/Kconfig | 9 + drivers/media/platform/Makefile | 1 + - drivers/media/platform/aspeed-video.c | 1729 ++++++++++++++++++++ + drivers/media/platform/aspeed-video.c | 1730 ++++++++++++++++++++ include/dt-bindings/clock/aspeed-clock.h | 1 + - 8 files changed, 1824 insertions(+), 2 deletions(-) + 8 files changed, 1825 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/aspeed-video.txt create mode 100644 drivers/media/platform/aspeed-video.c @@ -60,10 +72,10 @@ index 000000000000..78b464ae2672 + interrupts = <7>; +}; diff --git a/MAINTAINERS b/MAINTAINERS -index 9e9b19ecf6f7..fd4fdb3e6474 100644 +index b98a5763f6c1..cdd8f824b6da 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -2350,6 +2350,14 @@ S: Maintained +@@ -2358,6 +2358,14 @@ S: Maintained F: Documentation/hwmon/asc7621 F: drivers/hwmon/asc7621.c @@ -79,7 +91,7 @@ index 9e9b19ecf6f7..fd4fdb3e6474 100644 M: Corentin Chary L: acpi4asus-user@lists.sourceforge.net diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi -index 0144d8bfa3fb..e55da933a70b 100644 +index 69330ae2efd3..946c13eaa1d4 100644 --- a/arch/arm/boot/dts/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed-g5.dtsi @@ -243,6 +243,17 @@ @@ -101,10 +113,10 @@ index 0144d8bfa3fb..e55da933a70b 100644 compatible = "aspeed,ast2500-adc"; reg = <0x1e6e9000 0xb0>; diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c -index 61d41645e4fe..2429a2464556 100644 +index 3bbb4fbf00c9..6cea55de485f 100644 --- a/drivers/clk/clk-aspeed.c +++ b/drivers/clk/clk-aspeed.c -@@ -96,7 +96,7 @@ struct aspeed_clk_gate { +@@ -95,7 +95,7 @@ struct aspeed_clk_gate { /* TODO: ask Aspeed about the actual parent data */ static const struct aspeed_gate_data aspeed_gates[] = { /* clk rst name parent flags */ @@ -113,7 +125,7 @@ index 61d41645e4fe..2429a2464556 100644 [ASPEED_CLK_GATE_GCLK] = { 1, 7, "gclk-gate", NULL, 0 }, /* 2D engine */ [ASPEED_CLK_GATE_MCLK] = { 2, -1, "mclk-gate", "mpll", CLK_IS_CRITICAL }, /* SDRAM */ [ASPEED_CLK_GATE_VCLK] = { 3, 6, "vclk-gate", NULL, 0 }, /* Video Capture */ -@@ -122,6 +122,24 @@ static const struct aspeed_gate_data aspeed_gates[] = { +@@ -121,6 +121,24 @@ static const struct aspeed_gate_data aspeed_gates[] = { [ASPEED_CLK_GATE_LHCCLK] = { 28, -1, "lhclk-gate", "lhclk", 0 }, /* LPC master/LPC+ */ }; @@ -138,7 +150,7 @@ index 61d41645e4fe..2429a2464556 100644 static const struct clk_div_table ast2500_mac_div_table[] = { { 0x0, 4 }, /* Yep, really. Aspeed confirmed this is correct */ { 0x1, 4 }, -@@ -201,18 +219,21 @@ static struct clk_hw *aspeed_ast2500_calc_pll(const char *name, u32 val) +@@ -200,18 +218,21 @@ static struct clk_hw *aspeed_ast2500_calc_pll(const char *name, u32 val) struct aspeed_clk_soc_data { const struct clk_div_table *div_table; @@ -160,7 +172,7 @@ index 61d41645e4fe..2429a2464556 100644 .mac_div_table = ast2400_div_table, .calc_pll = aspeed_ast2400_calc_pll, }; -@@ -326,6 +347,7 @@ static const u8 aspeed_resets[] = { +@@ -325,6 +346,7 @@ static const u8 aspeed_resets[] = { [ASPEED_RESET_PECI] = 10, [ASPEED_RESET_I2C] = 2, [ASPEED_RESET_AHB] = 1, @@ -168,7 +180,7 @@ index 61d41645e4fe..2429a2464556 100644 /* * SCUD4 resets start at an offset to separate them from -@@ -548,6 +570,22 @@ static int aspeed_clk_probe(struct platform_device *pdev) +@@ -538,6 +560,22 @@ static int aspeed_clk_probe(struct platform_device *pdev) return PTR_ERR(hw); aspeed_clk_data->hws[ASPEED_CLK_24M] = hw; @@ -191,14 +203,14 @@ index 61d41645e4fe..2429a2464556 100644 /* * TODO: There are a number of clocks that not included in this driver * as more information is required: -@@ -557,7 +595,6 @@ static int aspeed_clk_probe(struct platform_device *pdev) +@@ -547,7 +585,6 @@ static int aspeed_clk_probe(struct platform_device *pdev) * RGMII * RMII * UART[1..5] clock source mux - * Video Engine (ECLK) mux and clock divider */ - for (i = 0; i < ARRAY_SIZE(aspeed_gates); i++) { + /* Get the uart clock source configuration from SCU4C*/ diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 54fe90acb5b2..d6edf2d28f9b 100644 --- a/drivers/media/platform/Kconfig @@ -233,10 +245,10 @@ index 41322ab65802..205c33a004fc 100644 obj-$(CONFIG_VIDEO_CAFE_CCIC) += marvell-ccic/ diff --git a/drivers/media/platform/aspeed-video.c b/drivers/media/platform/aspeed-video.c new file mode 100644 -index 000000000000..dfec813f50a9 +index 000000000000..692e08ef38c0 --- /dev/null +++ b/drivers/media/platform/aspeed-video.c -@@ -0,0 +1,1729 @@ +@@ -0,0 +1,1730 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include @@ -1900,6 +1912,7 @@ index 000000000000..dfec813f50a9 + + video->frame_rate = 30; + video->dev = &pdev->dev; ++ spin_lock_init(&video->lock); + mutex_init(&video->video_lock); + init_waitqueue_head(&video->wait); + INIT_DELAYED_WORK(&video->res_work, aspeed_video_resolution_work); @@ -1967,10 +1980,10 @@ index 000000000000..dfec813f50a9 +MODULE_AUTHOR("Eddie James"); +MODULE_LICENSE("GPL v2"); diff --git a/include/dt-bindings/clock/aspeed-clock.h b/include/dt-bindings/clock/aspeed-clock.h -index f43738607d77..15a9059d0303 100644 +index 335879505a72..0b0f3a0ebe9b 100644 --- a/include/dt-bindings/clock/aspeed-clock.h +++ b/include/dt-bindings/clock/aspeed-clock.h -@@ -50,5 +50,6 @@ +@@ -52,5 +52,6 @@ #define ASPEED_RESET_I2C 7 #define ASPEED_RESET_AHB 8 #define ASPEED_RESET_CRT1 9 -- cgit v1.2.3