diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2017-03-26 12:22:27 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2017-03-26 12:23:19 +0200 |
commit | fb7ea71c15d2bccb8cc6383d3a08921b79713712 (patch) | |
tree | 402344f7b2dc8600fb8b8d1ae60eb05f1e3458a8 /target/linux/brcm2708/patches-4.9 | |
parent | 88b125e9a46dd8793aa5eaef8c148e851ceb7463 (diff) | |
download | mtk-20170518-fb7ea71c15d2bccb8cc6383d3a08921b79713712.zip mtk-20170518-fb7ea71c15d2bccb8cc6383d3a08921b79713712.tar.gz mtk-20170518-fb7ea71c15d2bccb8cc6383d3a08921b79713712.tar.bz2 |
kernel: update kernel 4.9 to 4.9.17
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/brcm2708/patches-4.9')
5 files changed, 5 insertions, 238 deletions
diff --git a/target/linux/brcm2708/patches-4.9/950-0105-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch b/target/linux/brcm2708/patches-4.9/950-0105-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch index 88952dc..789f001 100644 --- a/target/linux/brcm2708/patches-4.9/950-0105-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch +++ b/target/linux/brcm2708/patches-4.9/950-0105-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch @@ -26,7 +26,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net> vc4_hdmi.o \ --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c -@@ -163,6 +163,9 @@ int vc4_crtc_get_scanoutpos(struct drm_d +@@ -162,6 +162,9 @@ int vc4_crtc_get_scanoutpos(struct drm_d int vblank_lines; int ret = 0; @@ -36,7 +36,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net> /* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */ /* Get optional system timestamp before query. */ -@@ -656,6 +659,11 @@ int vc4_enable_vblank(struct drm_device +@@ -655,6 +658,11 @@ int vc4_enable_vblank(struct drm_device struct vc4_dev *vc4 = to_vc4_dev(dev); struct vc4_crtc *vc4_crtc = vc4->crtc[crtc_id]; @@ -48,7 +48,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net> CRTC_WRITE(PV_INTEN, PV_INT_VFP_START); return 0; -@@ -666,6 +674,11 @@ void vc4_disable_vblank(struct drm_devic +@@ -665,6 +673,11 @@ void vc4_disable_vblank(struct drm_devic struct vc4_dev *vc4 = to_vc4_dev(dev); struct vc4_crtc *vc4_crtc = vc4->crtc[crtc_id]; @@ -82,7 +82,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net> struct vc4_hdmi *hdmi; struct vc4_hvs *hvs; struct vc4_crtc *crtc[3]; -@@ -460,6 +463,10 @@ void __iomem *vc4_ioremap_regs(struct pl +@@ -462,6 +465,10 @@ void __iomem *vc4_ioremap_regs(struct pl extern struct platform_driver vc4_dpi_driver; int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused); diff --git a/target/linux/brcm2708/patches-4.9/950-0151-clk-bcm2835-Fix-fixed_divider-of-pllh_aux.patch b/target/linux/brcm2708/patches-4.9/950-0151-clk-bcm2835-Fix-fixed_divider-of-pllh_aux.patch deleted file mode 100644 index 82f4628..0000000 --- a/target/linux/brcm2708/patches-4.9/950-0151-clk-bcm2835-Fix-fixed_divider-of-pllh_aux.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b8ded4dca34feafd33f22eff47d19b17b7dd83f4 Mon Sep 17 00:00:00 2001 -From: Boris Brezillon <boris.brezillon@free-electrons.com> -Date: Tue, 22 Nov 2016 12:45:28 -0800 -Subject: [PATCH] clk: bcm2835: Fix ->fixed_divider of pllh_aux - -There is no fixed divider on pllh_aux. - -Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> -Signed-off-by: Eric Anholt <eric@anholt.net> -Reviewed-by: Eric Anholt <eric@anholt.net> -Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> -(cherry picked from commit f2a46926aba1f0c33944901d2420a6a887455ddc) ---- - drivers/clk/bcm/clk-bcm2835.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/clk/bcm/clk-bcm2835.c -+++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1607,7 +1607,7 @@ static const struct bcm2835_clk_desc clk - .a2w_reg = A2W_PLLH_AUX, - .load_mask = CM_PLLH_LOADAUX, - .hold_mask = 0, -- .fixed_divider = 10), -+ .fixed_divider = 1), - [BCM2835_PLLH_PIX] = REGISTER_PLL_DIV( - .name = "pllh_pix", - .source_pll = "pllh", diff --git a/target/linux/brcm2708/patches-4.9/950-0165-drm-vc4-Add-fragment-shader-threading-support.patch b/target/linux/brcm2708/patches-4.9/950-0165-drm-vc4-Add-fragment-shader-threading-support.patch index ea0f4f1..dd192b9 100644 --- a/target/linux/brcm2708/patches-4.9/950-0165-drm-vc4-Add-fragment-shader-threading-support.patch +++ b/target/linux/brcm2708/patches-4.9/950-0165-drm-vc4-Add-fragment-shader-threading-support.patch @@ -39,7 +39,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net> default: --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -384,6 +384,8 @@ struct vc4_validated_shader_info { +@@ -385,6 +385,8 @@ struct vc4_validated_shader_info { uint32_t num_uniform_addr_offsets; uint32_t *uniform_addr_offsets; diff --git a/target/linux/brcm2708/patches-4.9/950-0166-drm-vc4-Fix-race-between-page-flip-completion-event-.patch b/target/linux/brcm2708/patches-4.9/950-0166-drm-vc4-Fix-race-between-page-flip-completion-event-.patch deleted file mode 100644 index 3c66fef..0000000 --- a/target/linux/brcm2708/patches-4.9/950-0166-drm-vc4-Fix-race-between-page-flip-completion-event-.patch +++ /dev/null @@ -1,93 +0,0 @@ -From d7f32f81cf7579ac7d13127db88e789ea864824c Mon Sep 17 00:00:00 2001 -From: Derek Foreman <derekf@osg.samsung.com> -Date: Thu, 24 Nov 2016 12:11:55 -0600 -Subject: [PATCH] drm/vc4: Fix race between page flip completion event and - clean-up - -There was a small window where a userspace program could submit -a pageflip after receiving a pageflip completion event yet still -receive EBUSY. - -Signed-off-by: Derek Foreman <derekf@osg.samsung.com> -Signed-off-by: Eric Anholt <eric@anholt.net> -Reviewed-by: Eric Anholt <eric@anholt.net> -Reviewed-by: Daniel Stone <daniels@collabora.com> -(cherry picked from commit 26fc78f6fef39b9d7a15def5e7e9826ff68303f4) ---- - drivers/gpu/drm/vc4/vc4_crtc.c | 8 ++++++++ - drivers/gpu/drm/vc4/vc4_drv.h | 1 + - drivers/gpu/drm/vc4/vc4_kms.c | 33 +++++++++++++++++++++++++-------- - 3 files changed, 34 insertions(+), 8 deletions(-) - ---- a/drivers/gpu/drm/vc4/vc4_crtc.c -+++ b/drivers/gpu/drm/vc4/vc4_crtc.c -@@ -682,6 +682,14 @@ void vc4_disable_vblank(struct drm_devic - CRTC_WRITE(PV_INTEN, 0); - } - -+/* Must be called with the event lock held */ -+bool vc4_event_pending(struct drm_crtc *crtc) -+{ -+ struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); -+ -+ return !!vc4_crtc->event; -+} -+ - static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc) - { - struct drm_crtc *crtc = &vc4_crtc->base; ---- a/drivers/gpu/drm/vc4/vc4_drv.h -+++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -445,6 +445,7 @@ int vc4_bo_stats_debugfs(struct seq_file - extern struct platform_driver vc4_crtc_driver; - int vc4_enable_vblank(struct drm_device *dev, unsigned int crtc_id); - void vc4_disable_vblank(struct drm_device *dev, unsigned int crtc_id); -+bool vc4_event_pending(struct drm_crtc *crtc); - int vc4_crtc_debugfs_regs(struct seq_file *m, void *arg); - int vc4_crtc_get_scanoutpos(struct drm_device *dev, unsigned int crtc_id, - unsigned int flags, int *vpos, int *hpos, ---- a/drivers/gpu/drm/vc4/vc4_kms.c -+++ b/drivers/gpu/drm/vc4/vc4_kms.c -@@ -119,17 +119,34 @@ static int vc4_atomic_commit(struct drm_ - - /* Make sure that any outstanding modesets have finished. */ - if (nonblock) { -- ret = down_trylock(&vc4->async_modeset); -- if (ret) { -+ struct drm_crtc *crtc; -+ struct drm_crtc_state *crtc_state; -+ unsigned long flags; -+ bool busy = false; -+ -+ /* -+ * If there's an undispatched event to send then we're -+ * obviously still busy. If there isn't, then we can -+ * unconditionally wait for the semaphore because it -+ * shouldn't be contended (for long). -+ * -+ * This is to prevent a race where queuing a new flip -+ * from userspace immediately on receipt of an event -+ * beats our clean-up and returns EBUSY. -+ */ -+ spin_lock_irqsave(&dev->event_lock, flags); -+ for_each_crtc_in_state(state, crtc, crtc_state, i) -+ busy |= vc4_event_pending(crtc); -+ spin_unlock_irqrestore(&dev->event_lock, flags); -+ if (busy) { - kfree(c); - return -EBUSY; - } -- } else { -- ret = down_interruptible(&vc4->async_modeset); -- if (ret) { -- kfree(c); -- return ret; -- } -+ } -+ ret = down_interruptible(&vc4->async_modeset); -+ if (ret) { -+ kfree(c); -+ return ret; - } - - ret = drm_atomic_helper_prepare_planes(dev, state); diff --git a/target/linux/brcm2708/patches-4.9/950-0167-drm-vc4-Fix-clock_select-setting-for-the-VEC-encoder.patch b/target/linux/brcm2708/patches-4.9/950-0167-drm-vc4-Fix-clock_select-setting-for-the-VEC-encoder.patch deleted file mode 100644 index c2499c1..0000000 --- a/target/linux/brcm2708/patches-4.9/950-0167-drm-vc4-Fix-clock_select-setting-for-the-VEC-encoder.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 3b162fdf85d89829d58bbee2d7d79987aceaa595 Mon Sep 17 00:00:00 2001 -From: Boris Brezillon <boris.brezillon@free-electrons.com> -Date: Fri, 2 Dec 2016 14:48:07 +0100 -Subject: [PATCH] drm/vc4: Fix ->clock_select setting for the VEC encoder - -PV_CONTROL_CLK_SELECT_VEC is actually 2 and not 0. Fix the definition and -rework the vc4_set_crtc_possible_masks() to cover the full range of the -PV_CONTROL_CLK_SELECT field. - -Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> -Signed-off-by: Eric Anholt <eric@anholt.net> -(cherry picked from commit ab8df60e3a3b68420d0d4477c5f07c00fbfb078b) ---- - drivers/gpu/drm/vc4/vc4_crtc.c | 38 +++++++++++++++++++++++--------------- - drivers/gpu/drm/vc4/vc4_drv.h | 1 + - drivers/gpu/drm/vc4/vc4_regs.h | 3 ++- - 3 files changed, 26 insertions(+), 16 deletions(-) - ---- a/drivers/gpu/drm/vc4/vc4_crtc.c -+++ b/drivers/gpu/drm/vc4/vc4_crtc.c -@@ -83,8 +83,7 @@ struct vc4_crtc_data { - /* Which channel of the HVS this pixelvalve sources from. */ - int hvs_channel; - -- enum vc4_encoder_type encoder0_type; -- enum vc4_encoder_type encoder1_type; -+ enum vc4_encoder_type encoder_types[4]; - }; - - #define CRTC_WRITE(offset, val) writel(val, vc4_crtc->regs + (offset)) -@@ -880,20 +879,26 @@ static const struct drm_crtc_helper_func - - static const struct vc4_crtc_data pv0_data = { - .hvs_channel = 0, -- .encoder0_type = VC4_ENCODER_TYPE_DSI0, -- .encoder1_type = VC4_ENCODER_TYPE_DPI, -+ .encoder_types = { -+ [PV_CONTROL_CLK_SELECT_DSI] = VC4_ENCODER_TYPE_DSI0, -+ [PV_CONTROL_CLK_SELECT_DPI_SMI_HDMI] = VC4_ENCODER_TYPE_DPI, -+ }, - }; - - static const struct vc4_crtc_data pv1_data = { - .hvs_channel = 2, -- .encoder0_type = VC4_ENCODER_TYPE_DSI1, -- .encoder1_type = VC4_ENCODER_TYPE_SMI, -+ .encoder_types = { -+ [PV_CONTROL_CLK_SELECT_DSI] = VC4_ENCODER_TYPE_DSI1, -+ [PV_CONTROL_CLK_SELECT_DPI_SMI_HDMI] = VC4_ENCODER_TYPE_SMI, -+ }, - }; - - static const struct vc4_crtc_data pv2_data = { - .hvs_channel = 1, -- .encoder0_type = VC4_ENCODER_TYPE_VEC, -- .encoder1_type = VC4_ENCODER_TYPE_HDMI, -+ .encoder_types = { -+ [PV_CONTROL_CLK_SELECT_DPI_SMI_HDMI] = VC4_ENCODER_TYPE_HDMI, -+ [PV_CONTROL_CLK_SELECT_VEC] = VC4_ENCODER_TYPE_VEC, -+ }, - }; - - static const struct of_device_id vc4_crtc_dt_match[] = { -@@ -907,17 +912,20 @@ static void vc4_set_crtc_possible_masks( - struct drm_crtc *crtc) - { - struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); -+ const struct vc4_crtc_data *crtc_data = vc4_crtc->data; -+ const enum vc4_encoder_type *encoder_types = crtc_data->encoder_types; - struct drm_encoder *encoder; - - drm_for_each_encoder(encoder, drm) { - struct vc4_encoder *vc4_encoder = to_vc4_encoder(encoder); -+ int i; - -- if (vc4_encoder->type == vc4_crtc->data->encoder0_type) { -- vc4_encoder->clock_select = 0; -- encoder->possible_crtcs |= drm_crtc_mask(crtc); -- } else if (vc4_encoder->type == vc4_crtc->data->encoder1_type) { -- vc4_encoder->clock_select = 1; -- encoder->possible_crtcs |= drm_crtc_mask(crtc); -+ for (i = 0; i < ARRAY_SIZE(crtc_data->encoder_types); i++) { -+ if (vc4_encoder->type == encoder_types[i]) { -+ vc4_encoder->clock_select = i; -+ encoder->possible_crtcs |= drm_crtc_mask(crtc); -+ break; -+ } - } - } - } ---- a/drivers/gpu/drm/vc4/vc4_drv.h -+++ b/drivers/gpu/drm/vc4/vc4_drv.h -@@ -197,6 +197,7 @@ to_vc4_plane(struct drm_plane *plane) - } - - enum vc4_encoder_type { -+ VC4_ENCODER_TYPE_NONE, - VC4_ENCODER_TYPE_HDMI, - VC4_ENCODER_TYPE_VEC, - VC4_ENCODER_TYPE_DSI0, ---- a/drivers/gpu/drm/vc4/vc4_regs.h -+++ b/drivers/gpu/drm/vc4/vc4_regs.h -@@ -177,8 +177,9 @@ - # define PV_CONTROL_WAIT_HSTART BIT(12) - # define PV_CONTROL_PIXEL_REP_MASK VC4_MASK(5, 4) - # define PV_CONTROL_PIXEL_REP_SHIFT 4 --# define PV_CONTROL_CLK_SELECT_DSI_VEC 0 -+# define PV_CONTROL_CLK_SELECT_DSI 0 - # define PV_CONTROL_CLK_SELECT_DPI_SMI_HDMI 1 -+# define PV_CONTROL_CLK_SELECT_VEC 2 - # define PV_CONTROL_CLK_SELECT_MASK VC4_MASK(3, 2) - # define PV_CONTROL_CLK_SELECT_SHIFT 2 - # define PV_CONTROL_FIFO_CLR BIT(1) |