resource: process: Add checking support for PROCESS_ATTR_GPU_MEM 60/277260/3
authorDongwoo Lee <dwoo08.lee@samsung.com>
Mon, 4 Jul 2022 06:19:07 +0000 (15:19 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 7 Jul 2022 01:54:24 +0000 (01:54 +0000)
Change-Id: Icc7f49ee785f668f8e6afc68c6960a4d4c81c438
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
src/resource/resource-process.c

index b59c06b..1d9b39a 100644 (file)
@@ -209,6 +209,12 @@ static int process_get_context_data(const struct resource *res,
        return 0;
 }
 
+static bool process_check_gpu_support(const struct resource *resource,
+                                           const struct resource_attribute *attr)
+{
+       return kernel_check_gpu_support();
+}
+
 static const struct resource_attribute process_attrs[] = {
        {
                .name   = "PROCESS_ATTR_CPU_UTIL",
@@ -312,7 +318,7 @@ static const struct resource_attribute process_attrs[] = {
                .type   = DATA_TYPE_UINT64,
                .ops    = {
                        .get = process_get_mem_attrs,
-                       .is_supported = resource_attr_supported_always,
+                       .is_supported = process_check_gpu_support,
                },
        },
 };