From 7b68749d1612492e8f8d23156c6fcb029173cbcd Mon Sep 17 00:00:00 2001 From: huyx Date: Fri, 14 Jun 2024 19:04:55 +0800 Subject: [PATCH 1/8] =?UTF-8?q?cde=E5=91=8A=E8=AD=A6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- framework/support/platform/src/hdmi/hdmi_dfm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/support/platform/src/hdmi/hdmi_dfm.c b/framework/support/platform/src/hdmi/hdmi_dfm.c index ffc89fe7a..daf299498 100644 --- a/framework/support/platform/src/hdmi/hdmi_dfm.c +++ b/framework/support/platform/src/hdmi/hdmi_dfm.c @@ -91,7 +91,7 @@ static void HdmiDfmBaseInfoInit(struct HdmiDfmInfo *info, const struct HdmiDfmPa info->minFrlCharRate = info->minBitRate / 18; info->maxFrlCharRate = info->maxBitRate / 18; - /* 5. Determine the Total FRL Characters per line Period. */ + /* 5. Determine the Total FRL Characters per line Period. the coefficient for converting from Mbps to bps. 1000000000000*/ info->minFrlCharsPerLine = (uint32_t)(info->lineMinTime * info->minFrlCharRate * param->laneNum / 1000000000000); info->maxFrlCharsPerLine = (uint32_t)(info->lineMaxTime * info->maxFrlCharRate * param->laneNum / 1000000000000); -- Gitee From f860a67cada543f30c6a76618096c59ff749c270 Mon Sep 17 00:00:00 2001 From: huyx Date: Mon, 17 Jun 2024 08:54:23 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- framework/support/platform/src/hdmi/hdmi_dfm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/support/platform/src/hdmi/hdmi_dfm.c b/framework/support/platform/src/hdmi/hdmi_dfm.c index daf299498..2e083d5cd 100644 --- a/framework/support/platform/src/hdmi/hdmi_dfm.c +++ b/framework/support/platform/src/hdmi/hdmi_dfm.c @@ -79,7 +79,7 @@ static void HdmiDfmBaseInfoInit(struct HdmiDfmInfo *info, const struct HdmiDfmPa return; } - /* 2. Determine the minimum Video Line period. the coefficient for converting from Mbps to bps. 1000000000000*/ + /* 2. Determine the minimum Video Line period. the coefficient for converting from Mbps to bps.1000000000000*/ info->lineMinTime = (uint64_t)info->htotal * 1000000000000 / info->maxPixelClk; info->lineMaxTime = (uint64_t)info->htotal * 1000000000000 / info->minPixelClk; @@ -91,7 +91,8 @@ static void HdmiDfmBaseInfoInit(struct HdmiDfmInfo *info, const struct HdmiDfmPa info->minFrlCharRate = info->minBitRate / 18; info->maxFrlCharRate = info->maxBitRate / 18; - /* 5. Determine the Total FRL Characters per line Period. the coefficient for converting from Mbps to bps. 1000000000000*/ + /* 5. Determine the Total FRL Characters per line Period. the coefficient for converting from Mbps to bps. + 1000000000000*/ info->minFrlCharsPerLine = (uint32_t)(info->lineMinTime * info->minFrlCharRate * param->laneNum / 1000000000000); info->maxFrlCharsPerLine = (uint32_t)(info->lineMaxTime * info->maxFrlCharRate * param->laneNum / 1000000000000); -- Gitee From a3f460f99320ea0717f33eaa782c9b1e82624b4f Mon Sep 17 00:00:00 2001 From: huyx Date: Mon, 17 Jun 2024 12:07:00 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- framework/include/osal/osal_cdev.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/framework/include/osal/osal_cdev.h b/framework/include/osal/osal_cdev.h index ac1d67d74..ec1ddab12 100644 --- a/framework/include/osal/osal_cdev.h +++ b/framework/include/osal/osal_cdev.h @@ -15,10 +15,6 @@ extern "C" { #endif /* __cplusplus */ -#ifndef __user -#define __user -#endif - struct OsalCdev; struct file; -- Gitee From 763d57d6813a05e5150f1ba9dbd1436e604d0c53 Mon Sep 17 00:00:00 2001 From: huyx Date: Mon, 17 Jun 2024 13:43:44 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- framework/include/osal/osal_cdev.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/include/osal/osal_cdev.h b/framework/include/osal/osal_cdev.h index ec1ddab12..ac1d67d74 100644 --- a/framework/include/osal/osal_cdev.h +++ b/framework/include/osal/osal_cdev.h @@ -15,6 +15,10 @@ extern "C" { #endif /* __cplusplus */ +#ifndef __user +#define __user +#endif + struct OsalCdev; struct file; -- Gitee From 6277e3a379008e542f493695330abaa42cbbfa5f Mon Sep 17 00:00:00 2001 From: huyx Date: Mon, 17 Jun 2024 15:02:53 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- adapter/khdf/linux/osal/include/osal_cdev_adapter.h | 1 + framework/include/osal/osal_cdev.h | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/adapter/khdf/linux/osal/include/osal_cdev_adapter.h b/adapter/khdf/linux/osal/include/osal_cdev_adapter.h index ef06aa5ab..eab8d65d1 100644 --- a/adapter/khdf/linux/osal/include/osal_cdev_adapter.h +++ b/adapter/khdf/linux/osal/include/osal_cdev_adapter.h @@ -24,6 +24,7 @@ #include #include #include +#include #endif /* OSAL_CDEV_ADAPTER_DEF_H */ diff --git a/framework/include/osal/osal_cdev.h b/framework/include/osal/osal_cdev.h index ac1d67d74..ec1ddab12 100644 --- a/framework/include/osal/osal_cdev.h +++ b/framework/include/osal/osal_cdev.h @@ -15,10 +15,6 @@ extern "C" { #endif /* __cplusplus */ -#ifndef __user -#define __user -#endif - struct OsalCdev; struct file; -- Gitee From 2d982018e49b294202a4839ae6e0a7d10d245ab0 Mon Sep 17 00:00:00 2001 From: huyx Date: Mon, 17 Jun 2024 15:23:13 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- adapter/khdf/linux/osal/include/osal_cdev_adapter.h | 1 - framework/include/osal/osal_cdev.h | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/adapter/khdf/linux/osal/include/osal_cdev_adapter.h b/adapter/khdf/linux/osal/include/osal_cdev_adapter.h index eab8d65d1..ef06aa5ab 100644 --- a/adapter/khdf/linux/osal/include/osal_cdev_adapter.h +++ b/adapter/khdf/linux/osal/include/osal_cdev_adapter.h @@ -24,7 +24,6 @@ #include #include #include -#include #endif /* OSAL_CDEV_ADAPTER_DEF_H */ diff --git a/framework/include/osal/osal_cdev.h b/framework/include/osal/osal_cdev.h index ec1ddab12..ac1d67d74 100644 --- a/framework/include/osal/osal_cdev.h +++ b/framework/include/osal/osal_cdev.h @@ -15,6 +15,10 @@ extern "C" { #endif /* __cplusplus */ +#ifndef __user +#define __user +#endif + struct OsalCdev; struct file; -- Gitee From e3d3cbd7824b2df8446d4eac6c2aec9809c41692 Mon Sep 17 00:00:00 2001 From: huyx Date: Mon, 17 Jun 2024 20:54:34 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- framework/tools/hdi-gen/util/options.cpp | 17 ++++++++++++++++- framework/tools/hdi-gen/util/options.h | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/framework/tools/hdi-gen/util/options.cpp b/framework/tools/hdi-gen/util/options.cpp index 2e7e42657..4c21873e5 100644 --- a/framework/tools/hdi-gen/util/options.cpp +++ b/framework/tools/hdi-gen/util/options.cpp @@ -86,7 +86,7 @@ bool Options::Parse(int argc, char *argv[]) ret = AddPackagePath(optarg); break; case 'o': - outPutFile = optarg; + outPutFile = CheckOutPutFile(optarg); break; default: doShowUsage = true; @@ -175,6 +175,21 @@ void Options::AddSources(const std::string &sourceFile) doCompile = true; } +std::string Options::CheckOutPutFile(const std::string &sourceFile) +{ + std::string realPath = File::AdapterRealPath(sourceFile); + if (realPath.empty()) { + Logger::E(TAG, "invalid idl file path:%s", sourceFile.c_str()); + return; + } + + if (!File::VerifyRealPath(realPath)) { + Logger::E(TAG, "verify path failed, path:%s", realPath.c_str()); + return; + } + return realPath; +} + void Options::AddSourcesByDir(const std::string &dir) { std::set files = File::FindFiles(dir); diff --git a/framework/tools/hdi-gen/util/options.h b/framework/tools/hdi-gen/util/options.h index 8ba364deb..1eb393e86 100644 --- a/framework/tools/hdi-gen/util/options.h +++ b/framework/tools/hdi-gen/util/options.h @@ -160,6 +160,8 @@ private: void AddSources(const std::string &sourceFile); + std::string CheckOutPutFile(const std::string &sourceFile); + void AddSourcesByDir(const std::string &dir); void SetOutDir(const std::string &dir); -- Gitee From 440cd82526f7f57280593c3bda523181ccd17ac4 Mon Sep 17 00:00:00 2001 From: huyx Date: Mon, 17 Jun 2024 21:11:37 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyx --- framework/tools/hdi-gen/util/options.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/tools/hdi-gen/util/options.cpp b/framework/tools/hdi-gen/util/options.cpp index 4c21873e5..d1479f700 100644 --- a/framework/tools/hdi-gen/util/options.cpp +++ b/framework/tools/hdi-gen/util/options.cpp @@ -180,12 +180,12 @@ std::string Options::CheckOutPutFile(const std::string &sourceFile) std::string realPath = File::AdapterRealPath(sourceFile); if (realPath.empty()) { Logger::E(TAG, "invalid idl file path:%s", sourceFile.c_str()); - return; + return ""; } if (!File::VerifyRealPath(realPath)) { Logger::E(TAG, "verify path failed, path:%s", realPath.c_str()); - return; + return ""; } return realPath; } -- Gitee