Skip to content

Commit 7a19c8b

Browse files
committed
merge with nvdla/sw
1 parent 8fd1b70 commit 7a19c8b

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

drivers/nvdla/include/opendla.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
#ifndef __OPENDLA_H_
3030
#define __OPENDLA_H_
3131

32+
#ifdef DLA_2_CONFIG
3233
#include <opendla_small.h>
34+
#else
35+
#include <opendla_initial.h>
36+
#endif
3337

3438
#endif

drivers/nvdla/nvdla_core_callbacks.c

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,51 +64,50 @@ static struct nvdla_config nvdla_config_os_initial = {
6464
};
6565

6666
static struct nvdla_config nvdla_config_small = {
67-
//.atom_size = 8,
68-
.atom_size = 32, // nv_large config
67+
.atom_size = 8,
6968
.bdma_enable = false,
7069
.rubik_enable = false,
7170
.weight_compress_support = false,
7271
};
7372

73+
static struct nvdla_config nvdla_config_large = {
74+
.atom_size = 32,
75+
.bdma_enable = false,
76+
.rubik_enable = false,
77+
.weight_compress_support = false,
78+
};
79+
80+
7481
void dla_debug(const char *str, ...)
7582
{
76-
/*
7783
va_list args;
7884
va_start(args, str);
7985
vprintk(pr_fmt(str), args);
8086
va_end(args);
81-
*/
8287
}
8388

8489
void dla_info(const char *str, ...)
8590
{
86-
/*
8791
va_list args;
8892
va_start(args, str);
8993
vprintk(str, args);
9094
va_end(args);
91-
*/
9295
}
9396

9497
void dla_warn(const char *str, ...)
9598
{
96-
/*
9799
va_list args;
98100
va_start(args, str);
99101
vprintk(str, args);
100102
va_end(args);
101-
*/
102103
}
103104

104105
void dla_error(const char *str, ...)
105106
{
106-
/*
107107
va_list args;
108108
va_start(args, str);
109109
vprintk(str, args);
110110
va_end(args);
111-
*/
112111
}
113112

114113
void *dla_memset(void *src, int ch, uint64_t len)
@@ -313,7 +312,6 @@ int32_t nvdla_task_submit(struct nvdla_device *nvdla_dev, struct nvdla_task *tas
313312
int32_t err = 0;
314313
uint32_t task_complete = 0;
315314

316-
//trace_printk("__nvdla_task_submit_entry\n");
317315
nvdla_dev->task = task;
318316

319317
err = dla_execute_task(nvdla_dev->engine_context, (void *)task, nvdla_dev->config_data);
@@ -341,7 +339,6 @@ int32_t nvdla_task_submit(struct nvdla_device *nvdla_dev, struct nvdla_task *tas
341339

342340
pr_debug("Task complete\n");
343341
dla_clear_task(nvdla_dev->engine_context);
344-
//trace_printk("__nvdla_task_submit_exit\n");
345342

346343
return err;
347344
}
@@ -353,9 +350,13 @@ static const struct of_device_id nvdla_of_match[] = {
353350
.data = &nvdla_config_os_initial,
354351
},
355352
{
356-
.compatible = "nvidia,nvdla_2",
353+
.compatible = "nvidia,nv_small",
357354
.data = &nvdla_config_small,
358355
},
356+
{
357+
.compatible = "nvidia,nv_large",
358+
.data = &nvdla_config_large,
359+
},
359360
{ },
360361
};
361362

@@ -376,6 +377,8 @@ static int32_t nvdla_probe(struct platform_device *pdev)
376377
return -EINVAL;
377378
}
378379

380+
pr_err("Probe NVDLA config %s\n", match->compatible);
381+
379382
nvdla_dev = devm_kzalloc(dev, sizeof(*nvdla_dev), GFP_KERNEL);
380383
if (!nvdla_dev)
381384
return -ENOMEM;

0 commit comments

Comments
 (0)