Browse Source

wave511: strictly treat building warning as error and fix warning

And remove unused file

Signed-off-by: Andy Hu <andy.hu@starfivetech.com>
Andy Hu 2 years ago
parent
commit
e7abc92d4c

+ 1 - 1
soft_3rdpart/wave511/code/WaveDecDriver_buildroot.mak

@@ -13,7 +13,7 @@ export SUBARCH=riscv
 export CROSS_COMPILE=riscv64-buildroot-linux-gnu-
 
 DRV_PATH  := $(shell pwd)/vdi/linux/driver
-EXTRA_CFLAGS +=	$(DEBFLAGS) -I$(LDDINCDIR) -Wno-unused-function
+EXTRA_CFLAGS +=	$(DEBFLAGS) -I$(LDDINCDIR) -Wall
 
 ifneq ($(KERNELRELEASE),)
 # call from kernel build system

+ 1 - 1
soft_3rdpart/wave511/code/WaveDecode_buildroot.mak

@@ -75,7 +75,7 @@ DEFINES += -D$(PRODUCT) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 endif	# USE_SIM_PLATFORM
 DEFINES += -DUSE_FEEDING_METHOD_BUFFER
 
-CFLAGS  += -g -I. -Wno-implicit-function-declaration -Wno-format -Wl,--fatal-warning $(INCLUDES) $(DEFINES) $(PLATFORM_FLAGS)
+CFLAGS  += -g -I. -Wl,--fatal-warning $(INCLUDES) $(DEFINES) $(PLATFORM_FLAGS)
 ifeq ($(USE_RTL_SIM), yes)
 ifeq ($(IUS), 1)
 CFLAGS  += -fPIC # ncverilog is 64bit version

+ 17 - 1
soft_3rdpart/wave511/code/sample_v2/helper/main_helper.h

@@ -1420,7 +1420,23 @@ void ReleaseVideoMemory(
     Uint32        count
     );
 
-void *AllocateDecFrameBuffer2(DecHandle decHandle, TestDecConfig* config, Uint32 size, FrameBuffer* retFbArray, vpu_buffer_t* retFbAddrs);
+void *AllocateDecFrameBuffer2(
+    DecHandle decHandle,
+    TestDecConfig* config,
+    Uint32 size,
+    FrameBuffer* retFbArray,
+    vpu_buffer_t* retFbAddrs
+    );
+
+BOOL AttachDecDMABuffer(
+    DecHandle decHandle,
+    TestDecConfig* config,
+    Uint64 virtAddress,
+    Uint32 size,
+    FrameBuffer* retFbArray,
+    vpu_buffer_t* retFbAddrs
+    );
+
 BOOL AllocateDecFrameBuffer(
     DecHandle       decHandle,
     TestDecConfig*  config,

File diff suppressed because it is too large
+ 0 - 1
soft_3rdpart/wave511/code/vdi/linux/driver/.cache.mk


+ 0 - 0
soft_3rdpart/wave511/code/vdi/linux/driver/Module.symvers


+ 15 - 7
soft_3rdpart/wave511/code/vdi/linux/driver/vdec.c

@@ -127,7 +127,10 @@ static vpu_drv_context_t s_vpu_drv_context;
 static int s_vpu_major;
 static struct cdev s_vpu_cdev;
 
-static struct clk *s_vpu_clk;
+#ifndef VPU_SUPPORT_CLOCK_CONTROL
+static struct clk *s_vpu_clk = NULL;
+#endif
+
 static int s_vpu_open_ref_count;
 #ifdef VPU_SUPPORT_ISR
 static int s_vpu_irq = VPU_IRQ_NUM;
@@ -649,7 +652,12 @@ static long vpu_ioctl(struct file *filp, u_int cmd, u_long arg)
     switch (cmd) {
     case VDI_IOCTL_GET_PHYSICAL_MEMORY:
         {
-            vpudrv_buffer_pool_t *vbp;
+            vpudrv_buffer_pool_t *vbp = NULL;
+            void *user_address = NULL;
+            struct task_struct *my_struct = NULL;
+            struct mm_struct *mm = NULL;
+            unsigned long address = 0;
+            pgd_t *pgd = NULL;
             if ((ret = down_interruptible(&s_vpu_sem)) == 0) {
                 vbp = kzalloc(sizeof(*vbp), GFP_KERNEL);
                 if (!vbp) {
@@ -663,11 +671,11 @@ static long vpu_ioctl(struct file *filp, u_int cmd, u_long arg)
                     return -EFAULT;
                 }
 
-                void *user_address = (void *)vbp->vb.virt_addr;
-                struct task_struct *my_struct = get_current();
-                struct mm_struct *mm = my_struct->mm;
-                unsigned long address = (unsigned long)user_address;
-                pgd_t *pgd = pgd_offset(mm, address);
+                user_address = (void *)vbp->vb.virt_addr;
+                my_struct = get_current();
+                mm = my_struct->mm;
+                address = (unsigned long)user_address;
+                pgd = pgd_offset(mm, address);
 
                 if (!pgd_none(*pgd) && !pgd_bad(*pgd)) {
                     p4d_t *p4d = p4d_offset(pgd, address);

+ 0 - 2
soft_3rdpart/wave511/code/vdi/linux/driver/vdec.mod

@@ -1,2 +0,0 @@
-/home/samin/data/startlight/freedom-u-sdk/soft_3rdparty/wave511/code/vdi/linux/driver/vdec.o
-

+ 0 - 0
soft_3rdpart/wave511/code/vdi/linux/driver_test/Module.symvers


+ 1 - 0
soft_3rdpart/wave511/code/vdi/linux/vdi_osal.c

@@ -25,6 +25,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 #include <string.h>
 #include <stdarg.h>
 #include <errno.h>

+ 1 - 0
soft_3rdpart/wave511/code/vdi/vdi.h

@@ -116,6 +116,7 @@ extern "C" {
     int vdi_get_sram_memory(unsigned long core_idx, vpu_buffer_t *vb);
     int vdi_dettach_dma_memory(unsigned long core_idx, vpu_buffer_t *vb);
     void* vdi_map_virt2(unsigned long core_idx, int size, PhysicalAddress bufY);
+    int vdi_virt_to_phys(unsigned long core_idx, vpu_buffer_t *vb);
 
 #ifdef SUPPORT_MULTI_INST_INTR
     int vdi_wait_interrupt(unsigned long coreIdx, unsigned int instIdx, int timeout);

+ 1 - 0
soft_3rdpart/wave511/code/vpuapi/coda9/coda9.c

@@ -26,6 +26,7 @@
 #include "coda9_vpuconfig.h"
 #include "product.h"
 #include "coda9_regdefine.h"
+#include "misc/debug.h"
 
 static void LoadBitCode(Uint32 coreIdx, PhysicalAddress codeBase, const Uint16 *codeWord, int codeSize)
 {

+ 1 - 1
soft_3rdpart/wave511/code/vpuapi/vpuapi.c

@@ -27,7 +27,7 @@
 #include "product.h"
 #include "wave/wave5_regdefine.h"
 #include "wave/wave5.h"
-
+#include "misc/debug.h"
 
 
 #define W5_RET_DEC_DISPLAY_SIZE (W5_REG_BASE + 0x01D8)      // [FIX ME] delete ? or not?

+ 1 - 1
soft_3rdpart/wave511/code/vpuapi/vpuapifunc.c

@@ -29,7 +29,7 @@
 #include "coda9/coda9_regdefine.h"
 #include "coda9/coda9_vpuconfig.h"
 #include "wave/wave5_regdefine.h"
-
+#include "misc/debug.h"
 
 #ifndef MIN
 #define MIN(a, b)       (((a) < (b)) ? (a) : (b))

+ 1 - 0
soft_3rdpart/wave511/code/vpuapi/wave/wave5.c

@@ -27,6 +27,7 @@
 #include "wave/wave5.h"
 #include "vpuerror.h"
 #include "wave/wave5_regdefine.h"
+#include "misc/debug.h"
 
 Uint32 Wave5VpuIsInit(Uint32 coreIdx)
 {

Some files were not shown because too many files changed in this diff