Your message dated Mon, 03 Nov 2014 15:19:11 +0000
with message-id <[email protected]>
and subject line Bug#745363: fixed in beignet 0.9.3~dfsg-1
has caused the Debian Bug report #745363,
regarding No way to check whether the hardware is present
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
745363: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745363
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: beignet
Version: 0.8-1
Tags: patch
As discussed earlier [0-1], if no compatible hardware is present
clGetDeviceIDs should report this to the caller (allowing it to try
another ICD if more than one is installed, or to continue without using
OpenCL), but in beignet it instead calls exit(-1). This fixes this.
Warning: I don't have any Intel GPUs to test whether it still works when
the hardware is present.
[0]
http://lists.alioth.debian.org/pipermail/pkg-opencl-devel/Week-of-Mon-20140217/000096.html
[1]
http://lists.alioth.debian.org/pipermail/pkg-opencl-devel/Week-of-Mon-20140217/000100.html
Description: If no device, return CL_DEVICE_NOT_FOUND instead of exiting
If no Intel GPU is present, beignet currently exits on
clGetDeviceIDs. This patch instead returns CL_DEVICE_NOT_FOUND,
allowing the calling application to decide what to do
(e.g. try a different platform).
Author: Rebecca Palmer
Forwarded: no
--- beignet-0.8.orig/src/cl_api.c
+++ beignet-0.8/src/cl_api.c
@@ -167,6 +167,7 @@ cl_check_device_type(cl_device_type devi
static cl_int
cl_device_id_is_ok(const cl_device_id device)
{
+ if(UNLIKELY(device == NULL)) return CL_FALSE;
return device != cl_get_gt_device() ? CL_FALSE : CL_TRUE;
}
--- beignet-0.8.orig/src/cl_device_id.c
+++ beignet-0.8/src/cl_device_id.c
@@ -184,7 +184,7 @@ ivb_gt2_break:
break;
default:
printf("cl_get_gt_device(): error, unknown device\n");
- exit(1);
+ ret = NULL;
}
return ret;
--- beignet-0.8.orig/src/cl_device_data.h
+++ beignet-0.8/src/cl_device_data.h
@@ -20,6 +20,8 @@
#ifndef __CL_DEVICE_DATA_H__
#define __CL_DEVICE_DATA_H__
+#define INVALID_CHIP_ID -1 //returned by intel_get_device_id if no device found
+
#define PCI_CHIP_GM45_GM 0x2A42
#define PCI_CHIP_IGD_E_G 0x2E02
#define PCI_CHIP_Q45_G 0x2E12
--- beignet-0.8.orig/src/intel/intel_driver.c
+++ beignet-0.8/src/intel/intel_driver.c
@@ -175,7 +175,7 @@ intel_driver_init(intel_driver_t *driver
#endif /* EMULATE_GEN */
}
-static void
+static cl_int
intel_driver_open(intel_driver_t *intel, cl_context_prop props)
{
int cardi;
@@ -185,7 +185,7 @@ intel_driver_open(intel_driver_t *intel,
&& props->gl_type != CL_GL_GLX_DISPLAY
&& props->gl_type != CL_GL_EGL_DISPLAY) {
printf("Unsupported gl share type %d.\n", props->gl_type);
- exit(-1);
+ return CL_INVALID_OPERATION;
}
intel->x11_display = XOpenDisplay(NULL);
@@ -216,7 +216,7 @@ intel_driver_open(intel_driver_t *intel,
}
if(!intel_driver_is_active(intel)) {
printf("Device open failed\n");
- exit(-1);
+ return CL_DEVICE_NOT_FOUND;
}
#ifdef HAS_EGL
@@ -224,6 +224,7 @@ intel_driver_open(intel_driver_t *intel,
assert(props->egl_display);
}
#endif
+ return CL_SUCCESS;
}
static void
@@ -361,7 +362,7 @@ intel_get_device_id(void)
driver = intel_driver_new();
assert(driver != NULL);
- intel_driver_open(driver, NULL);
+ if(UNLIKELY(intel_driver_open(driver, NULL) != CL_SUCCESS)) return INVALID_CHIP_ID;
intel_device_id = driver->device_id;
intel_driver_close(driver);
intel_driver_terminate(driver);
@@ -385,7 +386,7 @@ cl_intel_driver_new(cl_context_prop prop
{
intel_driver_t *driver = NULL;
TRY_ALLOC_NO_ERR (driver, intel_driver_new());
- intel_driver_open(driver, props);
+ if(UNLIKELY(intel_driver_open(driver, props) != CL_SUCCESS)) goto error;
/* We use the first 2 slots(0,1) for all the bufs.
* Notify the gbe this base index, thus gbe can avoid conflicts
* when it allocates slots for images*/
--- End Message ---
--- Begin Message ---
Source: beignet
Source-Version: 0.9.3~dfsg-1
We believe that the bug you reported is fixed in the latest version of
beignet, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andreas Beckmann <[email protected]> (supplier of updated beignet package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Mon, 03 Nov 2014 14:23:48 +0100
Source: beignet
Binary: beignet-dev beignet
Architecture: source
Version: 0.9.3~dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Debian OpenCL Maintainers <[email protected]>
Changed-By: Andreas Beckmann <[email protected]>
Description:
beignet - Intel OpenCL library
beignet-dev - Intel OpenCL library (development files)
Closes: 745363 745767 759707 764930 767387
Changes:
beignet (0.9.3~dfsg-1) unstable; urgency=medium
.
[ Julian Wollrath ]
* New upstream release. (Closes: #759707, #745363, #745767) (LP: #1372889)
+ Supports llvm 3.5. (Closes: #764930) (LP: #1350773)
* Add B-D on libedit-dev and zlib1g-dev.
* Add debian/watch file.
* Update debian/copyright.
.
[ Andreas Beckmann ]
* Set Maintainer to "Debian OpenCL Maintainers" with Simon's permission.
* Add Simon Richter, Rebecca N. Palmer and myself to Uploaders.
* Repack upstream tarball to remove non-distributable Len(n)a images and
CC-BY-NC-SA licensed parts from the test suite. (Closes: #767387)
* 0001-fix-some-typos.patch: New.
* 0002-use-env-to-set-environment-variables-for-GBE_BIN_GEN.patch: New, fix
FTBFS of "~dfsg" versions in pbuilder etc.
* 0003-GBE-fix-one-compilation-warning.patch: New. Cherry-picked from
upstream 0.9.x branch.
* Skip-deleted-tests.patch: New. Thanks to Rebecca N. Palmer.
* Simplify using system OpenCL headers.
* Use-Khronos-Group-headers.patch: Removed.
* d/control: Fix some issues found by lintian.
* Bump Standards-Version to 3.9.6 (no changes needed).
* Import debian/ packaging history into GIT. Add Vcs-* URLs.
Checksums-Sha1:
6e32bb6b9f30aac35071ae963da0834b73b2a86b 2504 beignet_0.9.3~dfsg-1.dsc
a56e123dc6925784cd01f571d7acc7081de4dfab 490068 beignet_0.9.3~dfsg.orig.tar.xz
a90ab60d15c02ecd96dc0c1d2aeae51da21a6f0a 9116
beignet_0.9.3~dfsg-1.debian.tar.xz
Checksums-Sha256:
ad17710e6a8ebc4fc6fdb236695b729fe3af5f9ca837bb902bc339bbf228c1e7 2504
beignet_0.9.3~dfsg-1.dsc
ba4a067337f546a5a99bd986abe18e0b12ffaa296e9d8d4648ea39fe24eda42c 490068
beignet_0.9.3~dfsg.orig.tar.xz
96c2cf2c18b9865cce1c60bd684b85fa9d20b057b8290b4db073f76bbabf8efc 9116
beignet_0.9.3~dfsg-1.debian.tar.xz
Files:
3d2e0337dbb039d72ea916acc7c35557 2504 libs extra beignet_0.9.3~dfsg-1.dsc
7e34c55de76553a38dad643dc4a0d5a2 490068 libs extra
beignet_0.9.3~dfsg.orig.tar.xz
532cf4c770e2b7bc4a7afc1c28b5e69b 9116 libs extra
beignet_0.9.3~dfsg-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJUV5nLAAoJEF+zP5NZ6e0I1kMQAIoOxWt6bUfdmvs9frD5B27v
q3Y8r1NYps53V8JGQbHEJPEhbJDze4GkMYnZMUDI+bqX2O/8iwCel6Xgx4npqhs7
5Mvkl3CvgvXZhki5eRknncWE9gkPUXR7CHcvJj9sVzoi8iBNgaCitb3+jZeKZBmD
HOdCT1Z6TREzjsQhoEiaudm3mmtEv6xno1Zt42FKs8PesZw5bvMD5q04/1WZjXw+
3Y/UCNpujO2ryawyOTat8GDbsqHuAI8lz5xR5cKUdOiZXMR7fSVi8ZnS5498b4Hd
reGpBG9hW8g9f9JCsACQcKblFQmJuDSl7Z36IewZQJvcJ/Z5PQUnLgfRxpccB4IM
uFgVdHBJDjcb0DYi2kyiDnXLzxuCK1wuJJBY8vGB/MvImnSvmuiw+OG7++/6UqjQ
B2mp5H3Q57MaI/vPq9mczVYekDxqaaNLYMtmM85c8Si1SWO12LjXZhIywzWI+0Ni
mFqN7vSN30SyU3RStsaQMo9CTHwSWzdYgvF/Fzsi+DkKHupqcPSFEXIvoIDbj4Cg
cWCU6dSug6ZH+s2tz9UONg2DuZqspscy2WnyvrkhmKof+JqXKHAWdSsejkkfgV9z
+rrerwdzgnAZUynMwqn4RiVJYOgd8Gt33g4AlBGSZHLc6fRwJjDZSXlGExOgTq6D
+bJ1jVMhGlcbbO1skS5n
=8HEf
-----END PGP SIGNATURE-----
--- End Message ---