aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.9
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2017-04-02 10:29:55 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2017-04-02 12:47:55 +0200
commitb26e34214c3d3aea9792c950d5e7fdb5bc5412b1 (patch)
tree13d996bbc90294072e7e07c41ae68241ac2c538d /target/linux/brcm2708/patches-4.9
parent97e6b67291036451683cb94ee6b91d07fdd10af5 (diff)
downloadupstream-b26e34214c3d3aea9792c950d5e7fdb5bc5412b1.tar.gz
upstream-b26e34214c3d3aea9792c950d5e7fdb5bc5412b1.tar.bz2
upstream-b26e34214c3d3aea9792c950d5e7fdb5bc5412b1.zip
kernel: update kernel 4.9 to 4.9.20
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/brcm2708/patches-4.9')
-rw-r--r--target/linux/brcm2708/patches-4.9/950-0105-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch2
-rw-r--r--target/linux/brcm2708/patches-4.9/950-0162-drm-vc4-Fix-termination-of-the-initial-scan-for-bran.patch68
-rw-r--r--target/linux/brcm2708/patches-4.9/950-0163-drm-vc4-Add-support-for-rendering-with-ETC1-textures.patch4
-rw-r--r--target/linux/brcm2708/patches-4.9/950-0164-drm-vc4-Use-runtime-autosuspend-to-avoid-thrashing-V.patch78
4 files changed, 3 insertions, 149 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 789f0013a5..f95d5aab16 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
@@ -62,7 +62,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net>
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
-@@ -292,6 +292,7 @@ static struct platform_driver *const com
+@@ -295,6 +295,7 @@ static struct platform_driver *const com
&vc4_dpi_driver,
&vc4_hvs_driver,
&vc4_crtc_driver,
diff --git a/target/linux/brcm2708/patches-4.9/950-0162-drm-vc4-Fix-termination-of-the-initial-scan-for-bran.patch b/target/linux/brcm2708/patches-4.9/950-0162-drm-vc4-Fix-termination-of-the-initial-scan-for-bran.patch
deleted file mode 100644
index 3326dca659..0000000000
--- a/target/linux/brcm2708/patches-4.9/950-0162-drm-vc4-Fix-termination-of-the-initial-scan-for-bran.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 57b0774967d7ea8d4173f82387100a84e4ba05d8 Mon Sep 17 00:00:00 2001
-From: Eric Anholt <eric@anholt.net>
-Date: Thu, 20 Oct 2016 16:48:12 -0700
-Subject: [PATCH] drm/vc4: Fix termination of the initial scan for branch
- targets.
-
-The loop is scanning until the original max_ip (size of the BO), but
-we want to not examine any code after the PROG_END's delay slots.
-There was a block trying to do that, except that we had some early
-continue statements if the signal wasn't a PROG_END or a BRANCH.
-
-The failure mode would be that a valid shader is rejected because some
-undefined memory after the PROG_END slots is parsed as a branch and
-the rest of its setup is illegal. I haven't seen this in the wild,
-but valgrind was complaining when about this up in the userland
-simulator mode.
-
-Signed-off-by: Eric Anholt <eric@anholt.net>
-(cherry picked from commit 457e67a728696c4f8e6423c64e93def50530db9a)
----
- drivers/gpu/drm/vc4/vc4_validate_shaders.c | 19 ++++++++-----------
- 1 file changed, 8 insertions(+), 11 deletions(-)
-
---- a/drivers/gpu/drm/vc4/vc4_validate_shaders.c
-+++ b/drivers/gpu/drm/vc4/vc4_validate_shaders.c
-@@ -608,9 +608,7 @@ static bool
- vc4_validate_branches(struct vc4_shader_validation_state *validation_state)
- {
- uint32_t max_branch_target = 0;
-- bool found_shader_end = false;
- int ip;
-- int shader_end_ip = 0;
- int last_branch = -2;
-
- for (ip = 0; ip < validation_state->max_ip; ip++) {
-@@ -621,8 +619,13 @@ vc4_validate_branches(struct vc4_shader_
- uint32_t branch_target_ip;
-
- if (sig == QPU_SIG_PROG_END) {
-- shader_end_ip = ip;
-- found_shader_end = true;
-+ /* There are two delay slots after program end is
-+ * signaled that are still executed, then we're
-+ * finished. validation_state->max_ip is the
-+ * instruction after the last valid instruction in the
-+ * program.
-+ */
-+ validation_state->max_ip = ip + 3;
- continue;
- }
-
-@@ -676,15 +679,9 @@ vc4_validate_branches(struct vc4_shader_
- }
- set_bit(after_delay_ip, validation_state->branch_targets);
- max_branch_target = max(max_branch_target, after_delay_ip);
--
-- /* There are two delay slots after program end is signaled
-- * that are still executed, then we're finished.
-- */
-- if (found_shader_end && ip == shader_end_ip + 2)
-- break;
- }
-
-- if (max_branch_target > shader_end_ip) {
-+ if (max_branch_target > validation_state->max_ip - 3) {
- DRM_ERROR("Branch landed after QPU_SIG_PROG_END");
- return false;
- }
diff --git a/target/linux/brcm2708/patches-4.9/950-0163-drm-vc4-Add-support-for-rendering-with-ETC1-textures.patch b/target/linux/brcm2708/patches-4.9/950-0163-drm-vc4-Add-support-for-rendering-with-ETC1-textures.patch
index 2b81578768..bb472b34b2 100644
--- a/target/linux/brcm2708/patches-4.9/950-0163-drm-vc4-Add-support-for-rendering-with-ETC1-textures.patch
+++ b/target/linux/brcm2708/patches-4.9/950-0163-drm-vc4-Add-support-for-rendering-with-ETC1-textures.patch
@@ -19,8 +19,8 @@ Signed-off-by: Eric Anholt <eric@anholt.net>
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
-@@ -78,6 +78,7 @@ static int vc4_get_param_ioctl(struct dr
- pm_runtime_put(&vc4->v3d->pdev->dev);
+@@ -81,6 +81,7 @@ static int vc4_get_param_ioctl(struct dr
+ pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
break;
case DRM_VC4_PARAM_SUPPORTS_BRANCHES:
+ case DRM_VC4_PARAM_SUPPORTS_ETC1:
diff --git a/target/linux/brcm2708/patches-4.9/950-0164-drm-vc4-Use-runtime-autosuspend-to-avoid-thrashing-V.patch b/target/linux/brcm2708/patches-4.9/950-0164-drm-vc4-Use-runtime-autosuspend-to-avoid-thrashing-V.patch
deleted file mode 100644
index f6d738d941..0000000000
--- a/target/linux/brcm2708/patches-4.9/950-0164-drm-vc4-Use-runtime-autosuspend-to-avoid-thrashing-V.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 936dc8b00ccd5072c5d610b97199402275bfdf26 Mon Sep 17 00:00:00 2001
-From: Eric Anholt <eric@anholt.net>
-Date: Fri, 4 Nov 2016 15:58:38 -0700
-Subject: [PATCH] drm/vc4: Use runtime autosuspend to avoid thrashing V3D power
- state.
-
-The pm_runtime_put() we were using immediately released power on the
-device, which meant that we were generally turning the device off and
-on once per frame. In many profiles I've looked at, that added up to
-about 1% of CPU time, but this could get worse in the case of frequent
-rendering and readback (as may happen in X rendering). By keeping the
-device on until we've been idle for a couple of frames, we drop the
-overhead of runtime PM down to sub-.1%.
-
-Signed-off-by: Eric Anholt <eric@anholt.net>
-(cherry picked from commit 3a62234680d86efa0239665ed8a0e908f1aef147)
----
- drivers/gpu/drm/vc4/vc4_drv.c | 9 ++++++---
- drivers/gpu/drm/vc4/vc4_gem.c | 6 ++++--
- drivers/gpu/drm/vc4/vc4_v3d.c | 2 ++
- 3 files changed, 12 insertions(+), 5 deletions(-)
-
---- a/drivers/gpu/drm/vc4/vc4_drv.c
-+++ b/drivers/gpu/drm/vc4/vc4_drv.c
-@@ -61,21 +61,24 @@ static int vc4_get_param_ioctl(struct dr
- if (ret < 0)
- return ret;
- args->value = V3D_READ(V3D_IDENT0);
-- pm_runtime_put(&vc4->v3d->pdev->dev);
-+ pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev);
-+ pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
- break;
- case DRM_VC4_PARAM_V3D_IDENT1:
- ret = pm_runtime_get_sync(&vc4->v3d->pdev->dev);
- if (ret < 0)
- return ret;
- args->value = V3D_READ(V3D_IDENT1);
-- pm_runtime_put(&vc4->v3d->pdev->dev);
-+ pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev);
-+ pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
- break;
- case DRM_VC4_PARAM_V3D_IDENT2:
- ret = pm_runtime_get_sync(&vc4->v3d->pdev->dev);
- if (ret < 0)
- return ret;
- args->value = V3D_READ(V3D_IDENT2);
-- pm_runtime_put(&vc4->v3d->pdev->dev);
-+ pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev);
-+ pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
- break;
- case DRM_VC4_PARAM_SUPPORTS_BRANCHES:
- case DRM_VC4_PARAM_SUPPORTS_ETC1:
---- a/drivers/gpu/drm/vc4/vc4_gem.c
-+++ b/drivers/gpu/drm/vc4/vc4_gem.c
-@@ -711,8 +711,10 @@ vc4_complete_exec(struct drm_device *dev
- }
-
- mutex_lock(&vc4->power_lock);
-- if (--vc4->power_refcount == 0)
-- pm_runtime_put(&vc4->v3d->pdev->dev);
-+ if (--vc4->power_refcount == 0) {
-+ pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev);
-+ pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
-+ }
- mutex_unlock(&vc4->power_lock);
-
- kfree(exec);
---- a/drivers/gpu/drm/vc4/vc4_v3d.c
-+++ b/drivers/gpu/drm/vc4/vc4_v3d.c
-@@ -222,6 +222,8 @@ static int vc4_v3d_bind(struct device *d
- return ret;
- }
-
-+ pm_runtime_use_autosuspend(dev);
-+ pm_runtime_set_autosuspend_delay(dev, 40); /* a little over 2 frames. */
- pm_runtime_enable(dev);
-
- return 0;