Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit 281aa80

Browse files
committed
Change to check the app name
Some app has error while setting the gfx defined property using the process name. Tracked-On: OAM-130663 Signed-off-by: HeYue <yue.he@intel.com>
1 parent 288045b commit 281aa80

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/intel/common/intel_check.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use_dgpu_render(char *target)
4242
{
4343
char dGPU_prop[BUF_SIZE];
4444
char vendor_buf[PROPERTY_VALUE_MAX];
45-
sprintf(dGPU_prop, "persist.vendor.intel.dGPU.%s", target);
45+
sprintf(dGPU_prop, "persist.vendor.intel.dGPU%s", target);
4646
if (property_get(dGPU_prop, vendor_buf, NULL) > 0) {
4747
if (vendor_buf[0] == '1') {
4848
return true;
@@ -82,18 +82,26 @@ bool intel_is_dgpu_render(void)
8282
char process_name[BUF_SIZE];
8383

8484
get_pid_name(process_id, process_name);
85-
return (use_dgpu_render(process_name) || is_target_process(process_name));
85+
char *app_name = strrchr(process_name, '.');
86+
if (app_name == NULL)
87+
app_name = process_name;
88+
89+
return (use_dgpu_render(app_name) || is_target_process(process_name));
8690
}
8791

8892
bool intel_lower_ctx_priority(void)
8993
{
9094
pid_t process_id = getpid();
9195
char process_name[BUF_SIZE];
9296
get_pid_name(process_id, process_name);
97+
char *app_name = strrchr(process_name, '.');
98+
if (app_name == NULL)
99+
app_name = process_name;
100+
93101

94102
char lower_pri[BUF_SIZE];
95103
char vendor_buf[PROPERTY_VALUE_MAX];
96-
sprintf(lower_pri, "persist.vendor.intel.lowPir.%s",process_name);
104+
sprintf(lower_pri, "persist.vendor.intel.lowPir%s", app_name);
97105
if (property_get(lower_pri, vendor_buf, NULL) > 0) {
98106
if (vendor_buf[0] == '1') {
99107
return true;

0 commit comments

Comments
 (0)