overlay: Use new i915_frequency_info in fallback code
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 30 Apr 2014 17:38:26 +0000 (18:38 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 30 Apr 2014 17:44:48 +0000 (18:44 +0100)
Actually use the new location to get frequency information when perf is
not available.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
overlay/gpu-freq.c

index 6b3f867..08b1bff 100644 (file)
@@ -124,8 +124,12 @@ int gpu_freq_update(struct gpu_freq *gf)
                char buf[4096], *s;
                int fd, len = -1;
 
-               sprintf(buf, "%s/i915_cur_delayinfo", debugfs_dri_path);
+               sprintf(buf, "%s/i915_frequency_info", debugfs_dri_path);
                fd = open(buf, 0);
+               if (fd < 0) {
+                       sprintf(buf, "%s/i915_cur_delayinfo", debugfs_dri_path);
+                       fd = open(buf, 0);
+               }
                if (fd < 0)
                        return gf->error = errno;