File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,11 @@ static int va_IsIntelDgpu(int fd)
114114}
115115static int va_SelectIntelDevice ()
116116{
117- int use_dgpu = 1 ;
117+ int use_dgpu;
118118#if defined(ANDROID)
119119 char value[PROPERTY_VALUE_MAX] = {};
120120
121- property_get (" video.hw.dgpu" , value, " 1" );
121+ property_get (" vendor. video.hw.dgpu" , value, " 1" );
122122 use_dgpu = atoi (value);
123123#endif
124124
@@ -138,11 +138,18 @@ static int va_SelectIntelDevice()
138138 if (strncmp (version->name , " i915" , strlen (" i915" )) == 0 ) {
139139 intel_gpu_index = i;
140140 // If specify to use dgpu and found dgpu, return the first found dgpu,
141+ // else if specify to use igpu and found igpu, return the first found igpu,
141142 // otherwise use the last available intel node for codec
142143 if (use_dgpu && va_IsIntelDgpu (temp)) {
143144 drmFreeVersion (version);
144145 close (temp);
145- va_logd (" %s:%d find dgpu" , __FUNCTION__, __LINE__);
146+ va_logd (" find dgpu" );
147+ break ;
148+ }
149+ if (!use_dgpu && !va_IsIntelDgpu (temp)) {
150+ va_logd (" find igpu" );
151+ drmFreeVersion (version);
152+ close (temp);
146153 break ;
147154 }
148155 }
You can’t perform that action at this time.
0 commit comments