Bug 93835 - "cl_get_gt_device(): error, unknown device: 0" on Dell XPS 13 Skylake with kernel 4.4
Summary: "cl_get_gt_device(): error, unknown device: 0" on Dell XPS 13 Skylake with ke...
Status: RESOLVED FIXED
Alias: None
Product: Beignet
Classification: Unclassified
Component: Beignet (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: rongyang
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-23 19:57 UTC by Cedric Nugteren
Modified: 2016-05-03 02:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Cedric Nugteren 2016-01-23 19:57:05 UTC
I run Debian Jessie (8.2) with Linux kernel 4.4 on a Dell XPS 13 Skylake laptop with an i5-6200U CPU and an "Intel Corporation Device 1916 (rev 07)" (from lspci). I compiled Beignet from the git repo (master branch), but obtain this when I run the unit tests (or clinfo for that matter):

----------------------------------------------------------

platform number 1
platform_profile "FULL_PROFILE"
platform_name "Intel Gen OCL Driver"
platform_vendor "Intel"
platform_version "OpenCL 1.2 beignet 1.2 (git-13f504c)"
platform_extensions "cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_image2d_from_buffer cl_khr_spir cl_khr_icd cl_intel_accelerator cl_intel_motion_estimation"
cl_get_gt_device(): error, unknown device: 0
error calling clGetDeviceIDs
Failed to initialize cl device.

summary:
----------
  total: 798
  run: 0
  pass: 0
  fail: 0
  pass rate: 0.000000

----------------------------------------------------------

I've recompiled a number of times (also version 1.1.1 instead of the git version) and installed all the dependencies. I am running in X as a normal user, but "sudo" doesn't help much.

Any ideas? Thanks!
Comment 1 Cedric Nugteren 2016-02-07 21:42:27 UTC
Any ideas? Let me know if more information or tests are required.
Comment 2 rongyang 2016-02-14 01:59:32 UTC
It seems fail when get device id.
Can list the device under /dev/dri and check the return value of function intel_driver_open in src/intel/intel_driver.c?
Comment 3 Cedric Nugteren 2016-02-14 10:18:16 UTC
Below is the requested information:

bash:~$ ls -l /dev/dri
total 0
crw-rw----+ 1 root video 226,   0 Feb 14 11:02 card0
crw-rw----  1 root video 226,  64 Feb 14 11:01 controlD64
crw-rw----+ 1 root video 226, 128 Feb 14 11:01 renderD128

I added a printf statement after each of the return statements in "intel_driver_open" and it turns out that it returns CL_SUCCESS.
Comment 4 rongyang 2016-02-15 01:29:48 UTC
Please also print out intel->device_id before return?
Comment 5 Cedric Nugteren 2016-02-15 18:34:16 UTC
The value of device_id is zero. I've printed the values of the other integers from that structure:

fd: 4
device_id: 0
gen_ver: 0
locked: 0
need_close: 0
atomic_test_result: 0

This just before return CL_SUCCESS;
Comment 6 rongyang 2016-02-24 03:31:58 UTC
Beignet check the device depends on the device id, and the device id is get from libdrm's api drm_intel_bufmgr_gem_get_devid in function intel_driver_memman_init. And libdrm get the device id from pci ids. It seems libdrm's issue.

Have you set environment variable "INTEL_DEVID_OVERRIDE"? It will override the device id of the pci id. Or can you set it to your pci id? Maybe you could also try to intel gpu tools.
Comment 7 Cedric Nugteren 2016-05-02 18:06:17 UTC
No, I didn't do anything of the above.

In the meantime I've updated to Linux kernel 4.5.1, the latest Intel drivers and the latest development version of Beignet, and now it is fixed. I am not sure which of the earlier mentioned 3 is responsible, perhaps it is a combination.
Comment 8 rongyang 2016-05-03 02:59:07 UTC
Thanks for your feedback, I will close it.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.