FYI: Boiled it down to a simple ioctl() call.

===== Start code =====
/* Read an ioctl value */

#include <stdio.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#include <xf86drm.h>
#include <i915_drm.h>

int main(void) {
    
    int eu_total;
    drm_i915_getparam_t gp;

    gp.value = &eu_total;
    gp.param = I915_PARAM_EU_TOTAL;

    int dru = open("/dev/dri/renderD128", O_RDONLY);
    if (dru < 0) {
        perror("open renderD128");
        return errno;
    }
    int ret = ioctl(dru, DRM_IOCTL_I915_GETPARAM, &gp);
    if (ret < 0) {
        perror("ioctl");
        return errno;
    }
    
    printf("Got value: %d\n", eu_total);
    return 0;
}
===== End code =====

Compiled with:
  gcc -I /usr/include/drm gmltest.c -o gmltest
(needed the extra -I to get drm.h found by xf86drm.h, which is probably a bug, 
but I'll ignore that...)
This then reports:
>>   root@nuc:/local/users/gml4410/homework# ./gmltest 
>>   Got value: 24

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1800752

Title:
  Performance degraded in Cosmic

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/beignet/+bug/1800752/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to