summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhen Chen <chenzhen@rock-chips.com>2019-01-07 20:33:20 +0800
committerGuochun Huang <hero.huang@rock-chips.com>2019-04-12 15:25:20 +0800
commit81624807282fdb6a2e8cea1a83060ec6b5391eed (patch)
tree7a4ae9ae7e34fc8b02530a7c5f600ce39f6b2b3e
parentd8c65325a2b45395dccddf7bb90dcf73274dcb59 (diff)
Mali: midgard: changes to enlarge BASE_JD_ATOM_COUNT to 512, for defect 184210
The source code of mali_so must be modified correspondingly. Change-Id: I3f4bd03fa2d369d912e6bc05c53d2d3abefb92d3 Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
-rw-r--r--drivers/gpu/arm/midgard/mali_base_kernel.h4
-rw-r--r--drivers/gpu/arm/midgard/mali_kbase_jd.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/arm/midgard/mali_base_kernel.h b/drivers/gpu/arm/midgard/mali_base_kernel.h
index d5c8cbc2aed3..ea5e473caef6 100644
--- a/drivers/gpu/arm/midgard/mali_base_kernel.h
+++ b/drivers/gpu/arm/midgard/mali_base_kernel.h
@@ -64,7 +64,7 @@ typedef struct base_mem_handle {
* we decide to make the number of semaphores a configurable
* option.
*/
-#define BASE_JD_ATOM_COUNT 256
+#define BASE_JD_ATOM_COUNT 512
#define BASEP_JD_SEM_PER_WORD_LOG2 5
#define BASEP_JD_SEM_PER_WORD (1 << BASEP_JD_SEM_PER_WORD_LOG2)
@@ -831,7 +831,7 @@ enum kbase_jd_atom_state {
KBASE_JD_ATOM_STATE_COMPLETED
};
-typedef u8 base_atom_id; /**< Type big enough to store an atom number in */
+typedef u16 base_atom_id; /**< Type big enough to store an atom number in */
struct base_dependency {
base_atom_id atom_id; /**< An atom number */
diff --git a/drivers/gpu/arm/midgard/mali_kbase_jd.c b/drivers/gpu/arm/midgard/mali_kbase_jd.c
index f39f1b084fbf..25c768a5ca07 100644
--- a/drivers/gpu/arm/midgard/mali_kbase_jd.c
+++ b/drivers/gpu/arm/midgard/mali_kbase_jd.c
@@ -1384,7 +1384,7 @@ int kbase_jd_submit(struct kbase_context *kctx,
#define compiletime_assert(x, msg) do { switch (0) { case 0: case (x):; } } \
while (false)
#endif
- compiletime_assert((1 << (8*sizeof(user_atom.atom_number))) ==
+ compiletime_assert((1 << (8*sizeof(user_atom.atom_number))) >=
BASE_JD_ATOM_COUNT,
"BASE_JD_ATOM_COUNT and base_atom_id type out of sync");
compiletime_assert(sizeof(user_atom.pre_dep[0].atom_id) ==