aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0309-drm-amdgpu-fix-coding-style-in-amdgpu_ctx.c.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0309-drm-amdgpu-fix-coding-style-in-amdgpu_ctx.c.patch')
-rw-r--r--common/recipes-kernel/linux/files/0309-drm-amdgpu-fix-coding-style-in-amdgpu_ctx.c.patch73
1 files changed, 0 insertions, 73 deletions
diff --git a/common/recipes-kernel/linux/files/0309-drm-amdgpu-fix-coding-style-in-amdgpu_ctx.c.patch b/common/recipes-kernel/linux/files/0309-drm-amdgpu-fix-coding-style-in-amdgpu_ctx.c.patch
deleted file mode 100644
index c7466755..00000000
--- a/common/recipes-kernel/linux/files/0309-drm-amdgpu-fix-coding-style-in-amdgpu_ctx.c.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From b6cdba4bc3d2897462b23b85706beed535bdd602 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
-Date: Thu, 11 Feb 2016 10:20:53 +0100
-Subject: [PATCH 0309/1110] drm/amdgpu: fix coding style in amdgpu_ctx.c
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Don't use pointer arithmetic and fix the indentation.
-
-Signed-off-by: Christian K├Ânig <christian.koenig@amd.com>
-Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
----
- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 31 +++++++++++++++----------------
- 1 file changed, 15 insertions(+), 16 deletions(-)
-
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
-index 3b99282..17e1362 100644
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
-@@ -34,15 +34,14 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev, struct amdgpu_ctx *ctx)
- ctx->adev = adev;
- kref_init(&ctx->refcount);
- spin_lock_init(&ctx->ring_lock);
-- ctx->fences = kzalloc(sizeof(struct fence *) * amdgpu_sched_jobs *
-- AMDGPU_MAX_RINGS, GFP_KERNEL);
-+ ctx->fences = kcalloc(amdgpu_sched_jobs * AMDGPU_MAX_RINGS,
-+ sizeof(struct fence*), GFP_KERNEL);
- if (!ctx->fences)
- return -ENOMEM;
-
- for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
- ctx->rings[i].sequence = 1;
-- ctx->rings[i].fences = (void *)ctx->fences + sizeof(struct fence *) *
-- amdgpu_sched_jobs * i;
-+ ctx->rings[i].fences = &ctx->fences[amdgpu_sched_jobs * i];
- }
- /* create context entity for each ring */
- for (i = 0; i < adev->num_rings; i++) {
-@@ -192,18 +191,18 @@ int amdgpu_ctx_ioctl(struct drm_device *dev, void *data,
- id = args->in.ctx_id;
-
- switch (args->in.op) {
-- case AMDGPU_CTX_OP_ALLOC_CTX:
-- r = amdgpu_ctx_alloc(adev, fpriv, &id);
-- args->out.alloc.ctx_id = id;
-- break;
-- case AMDGPU_CTX_OP_FREE_CTX:
-- r = amdgpu_ctx_free(fpriv, id);
-- break;
-- case AMDGPU_CTX_OP_QUERY_STATE:
-- r = amdgpu_ctx_query(adev, fpriv, id, &args->out);
-- break;
-- default:
-- return -EINVAL;
-+ case AMDGPU_CTX_OP_ALLOC_CTX:
-+ r = amdgpu_ctx_alloc(adev, fpriv, &id);
-+ args->out.alloc.ctx_id = id;
-+ break;
-+ case AMDGPU_CTX_OP_FREE_CTX:
-+ r = amdgpu_ctx_free(fpriv, id);
-+ break;
-+ case AMDGPU_CTX_OP_QUERY_STATE:
-+ r = amdgpu_ctx_query(adev, fpriv, id, &args->out);
-+ break;
-+ default:
-+ return -EINVAL;
- }
-
- return r;
---
-2.7.4
-