aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0272-drm-amdgpu-fix-num_ibs-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0272-drm-amdgpu-fix-num_ibs-check.patch')
-rw-r--r--common/recipes-kernel/linux/files/0272-drm-amdgpu-fix-num_ibs-check.patch78
1 files changed, 0 insertions, 78 deletions
diff --git a/common/recipes-kernel/linux/files/0272-drm-amdgpu-fix-num_ibs-check.patch b/common/recipes-kernel/linux/files/0272-drm-amdgpu-fix-num_ibs-check.patch
deleted file mode 100644
index 85777ac6..00000000
--- a/common/recipes-kernel/linux/files/0272-drm-amdgpu-fix-num_ibs-check.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From cc71dc022223c5d6d06d75ff61f91a5a0958b5eb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
-Date: Sun, 31 Jan 2016 11:32:04 +0100
-Subject: [PATCH 0272/1110] drm/amdgpu: fix num_ibs check
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Specifying no IBs on command submission is invalid, stop crashing
-badly when somebody tries it.
-
-Signed-off-by: Christian K├Ânig <christian.koenig@amd.com>
-Reviewed-by: Alex Deucher <alexander.deucer@amd.com>
-Cc: stable@vger.kernel.org
-Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-Signed-off-by: Kalyan Alle <kalyan.alle@amd.com>
----
- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 16 +++++-----------
- 1 file changed, 5 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
-index bd9a0be..58e115a 100644
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
-@@ -255,6 +255,10 @@ int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
- }
- }
-
-+ if (p->num_ibs == 0) {
-+ ret = -EINVAL;
-+ goto free_all_kdata;
-+ }
-
- p->ibs = kcalloc(p->num_ibs, sizeof(struct amdgpu_ib), GFP_KERNEL);
- if (!p->ibs) {
-@@ -594,9 +598,6 @@ static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev,
- struct amdgpu_ring *ring;
- int i, r;
-
-- if (parser->num_ibs == 0)
-- return 0;
--
- /* Only for UVD/VCE VM emulation */
- for (i = 0; i < parser->num_ibs; i++) {
- ring = parser->ibs[i].ring;
-@@ -703,9 +704,6 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,
- j++;
- }
-
-- if (!parser->num_ibs)
-- return 0;
--
- /* add GDS resources to first IB */
- if (parser->bo_list) {
- struct amdgpu_bo *gds = parser->bo_list->gds_obj;
-@@ -748,9 +746,6 @@ static int amdgpu_cs_dependencies(struct amdgpu_device *adev,
- struct amdgpu_ib *ib;
- int i, j, r;
-
-- if (!p->num_ibs)
-- return 0;
--
- /* Add dependencies to first IB */
- ib = &p->ibs[0];
- for (i = 0; i < p->nchunks; ++i) {
-@@ -909,8 +904,7 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
- if (r)
- goto out;
-
-- if (parser.num_ibs)
-- r = amdgpu_cs_submit(&parser, cs);
-+ r = amdgpu_cs_submit(&parser, cs);
-
- out:
- amdgpu_cs_parser_fini(&parser, r, reserved_buffers);
---
-2.7.4
-