From 4827bff5e4fb82aa1b9e09ebe423228307db3ddc Mon Sep 17 00:00:00 2001 From: Jia Chao Date: Fri, 29 Oct 2021 16:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20modetest=20=E5=8F=8A=20lib?= =?UTF-8?q?drm=5Futil;=E5=88=A0=E9=99=A4=20parttern.c=20=E4=B8=AD=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jia Chao --- BUILD.gn | 59 ++++++++++++++++++++++++++++++++++++++++++++ tests/util/pattern.c | 1 - 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index e3a6cad..74caebc 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -49,4 +49,63 @@ ohos_shared_library("libdrm") { part_name = "graphic_standard" subsystem_name = "graphic" } + ## Build libdrm.so }}} + +## Build libdrm_util.so {{{ +ohos_shared_library("libdrm_util") { + output_name = "libdrm_util" + output_extension = "so" + + sources = [ + "tests/util/format.c", + "tests/util/kms.c", + "tests/util/pattern.c", + ] + + include_dirs = [ "tests/util" ] + + install_images = [ + "system", + "updater", + ] + + deps = [ "//third_party/libdrm:libdrm" ] + + part_name = "graphic_standard" + subsystem_name = "graphic" +} + +## Build libdrm_util.so }}} + +## Build modetest {{{ +ohos_executable("modetest") { + install_enable = true + sources = [ + "tests/modetest/buffers.c", + "tests/modetest/buffers.h", + "tests/modetest/cursor.c", + "tests/modetest/cursor.h", + "tests/modetest/modetest.c", + ] + + include_dirs = [ + ".", + "include", + "include/drm", + "tests", + ] + + deps = [ + "//third_party/libdrm:libdrm", + "//third_party/libdrm:libdrm_util", + ] + + install_images = [ + "system", + "updater", + ] + part_name = "graphic_standard" + subsystem_name = "graphic" +} +## Build modetest }}} diff --git a/tests/util/pattern.c b/tests/util/pattern.c index bf1797d..5043523 100644 --- a/tests/util/pattern.c +++ b/tests/util/pattern.c @@ -985,7 +985,6 @@ static void fill_tiles_rgb16fp(const struct util_format_info *info, void *mem, unsigned int stride) { const struct util_rgb_info *rgb = &info->rgb; - void *mem_base = mem; unsigned int x, y; /* TODO: Give this actual fp16 precision */ -- Gitee