Skip to content
Commits on Source (42)
......@@ -247,32 +247,6 @@ if test "x$ac_cv_header_X11_extensions_shmproto_h" != "xyes" -a "x$ac_cv_header_
fi
if test "x$shm" = "xyes"; then
AC_MSG_CHECKING(whether shmctl IPC_RMID allows subsequent attaches)
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
int main()
{
char *shmaddr;
int id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0600);
if (id == -1) return 2;
shmaddr = shmat (id, 0, 0);
shmctl (id, IPC_RMID, 0);
if ((char*) shmat (id, 0, 0) == (char*) -1) {
shmdt (shmaddr);
return 1;
}
shmdt (shmaddr);
shmdt (shmaddr);
return 0;
}
],
AC_DEFINE(IPC_RMID_DEFERRED_RELEASE, 1,
[Define to 1 if shared memory segments are released deferred.])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no),
AC_MSG_RESULT(assuming no))
AC_DEFINE([HAVE_MIT_SHM], 1, [Define to 1 if MIT-SHM is available])
fi
......@@ -342,9 +316,9 @@ AC_ARG_ENABLE(dri,
[DRI=auto])
AC_ARG_ENABLE(dri1,
AS_HELP_STRING([--disable-dri1],
[Disable DRI1 support [[default=yes]]]),
[Disable DRI1 support [[default=auto]]]),
[DRI1=$enableval],
[DRI1=yes])
[DRI1=auto])
AC_ARG_ENABLE(dri2,
AS_HELP_STRING([--disable-dri2],
[Disable DRI2 support [[default=yes]]]),
......
configure_file(input : 'intel.man',
output : 'intel.4',
command : [
'sed',
'-e',
's/__appmansuffix__/@0@/g'.format(man_config.get('appmansuffix')),
'-e',
's/__filemansuffix__/@0@/g'.format(man_config.get('filemansuffix')),
'-e',
's/__drivermansuffix__/@0@/g'.format(man_config.get('drivermansuffix')),
'-e',
's/__miscmansuffix__/@0@/g'.format(man_config.get('miscmansuffix')),
'-e',
's/__xservername__/@0@/g'.format(man_config.get('xservername')),
'-e',
's/__xconfigfile__/@0@/g'.format(man_config.get('xconfigfile')),
'-e',
's/__vendorversion__/@0@/g'.format(man_config.get('vendorversion')),
'@INPUT@'
],
capture : true,
install_dir: join_paths(get_option('mandir'), 'man4'),
install : true)
project('xf86-video-intel', 'c',
version : '2.99.917',
default_options: [
'warning_level=2',
'c_std=gnu99',
],
license : 'MIT',
meson_version : '>0.40.0')
config = configuration_data()
version = meson.project_version().split('.')
config.set('PACKAGE_VERSION_MAJOR', version[0])
config.set('PACKAGE_VERSION_MINOR', version[1])
config.set('PACKAGE_VERSION_PATCHLEVEL', version[2])
config.set_quoted('LIBEXEC_PATH', join_paths(get_option('prefix'),
get_option('libexecdir')))
cc = meson.get_compiler('c')
xorg = dependency('xorg-server', version : '>= 1.6', required : true)
pthreads = dependency('threads', required : true)
pciaccess = dependency('pciaccess', version : '>= 0.10', required : true)
x11 = dependency('x11', required : false)
xfixes = dependency('xfixes', required : false)
png = dependency('libpng', required : false)
if not cc.has_function('clock_gettime', args : '-lrt')
error('clock_gettime() missing')
endif
if cc.has_function('getline')
config.set('HAVE_GETLINE', 1)
endif
if cc.has_function('strndup')
config.set('HAVE_STRNDUP', 1)
endif
if cc.has_function('strcasecmp')
config.set('HAVE_STRCASECMP', 1)
endif
dependency('xproto', required : true)
dependency('fontsproto', required : true)
dependency('damageproto', required : true)
if cc.has_header_symbol('xorg-server.h', 'RANDR',
dependencies : xorg)
dependency('randrproto', required : true)
endif
if cc.has_header_symbol('xorg-server.h', 'RENDER',
dependencies : xorg)
dependency('renderproto', required : true)
endif
if cc.has_header_symbol('xorg-server.h', 'DPMSExtension',
dependencies : xorg)
dependency('xextproto', required : true)
endif
with_tools = get_option('tools')
config.set('USE_GIT_DESCRIBE', 1)
config.set('BUILDER_DESCRIPTION', 1)
atomic_primitives = 'none'
atomic_primitives_code = '''
int atomic_add(int i) {
return __sync_fetch_and_add (&i, 1);
}
int atomic_cmpxchg(int i, int j, int k) {
return __sync_val_compare_and_swap (&i, j, k);
}
int main(void) {
return 0;
}'''
if cc.links(atomic_primitives_code, name : 'atomic primitives')
atomic_primitives = 'intel'
config.set('HAVE_ATOMIC_PRIMITIVES', 1)
endif
if atomic_primitives == 'none' and cc.has_header('atomic_ops.h')
atomic_primitives = 'libatomic-ops'
config.set('HAVE_LIB_ATOMIC_OPS', 1)
endif
if atomic_primitives == 'none'
error('xf86-video-intel depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or install the libatomics-op-dev package.')
endif
libudev = dependency('libudev', required : false)
if libudev.found()
config.set('HAVE_UDEV', 1)
endif
cpuid_code = '''
#include <cpuid.h>
#include <stddef.h>
int main(void) {
int eax, ebx, ecx, edx;
if (__get_cpuid_max(0, NULL) < 4)
return 0;
__cpuid_count(4, 0, eax, ebx, ecx, edx);
return 0;
}'''
if cc.links(cpuid_code, name : '__cpuid()')
config.set('HAVE_CPUID_H', 1)
endif
has_shm = (cc.has_header('sys/ipc.h') and
cc.has_header('X11/extensions/XShm.h') and
cc.has_header('X11/extensions/shmproto.h') and
cc.has_header('X11/extensions/shmstr.h'))
if has_shm
config.set('HAVE_MIT_SHM', 1)
config.set('HAVE_X11_EXTENSIONS_SHMPROTO_H', 1)
config.set('HAVE_X11_EXTENSIONS_SHMSTR_H', 1)
endif
if cc.has_header('X11/extensions/Xinerama.h')
config.set('HAVE_X11_EXTENSIONS_XINERAMA_H', 1)
endif
if cc.has_header('X11/extensions/dpmsconst.h')
config.set('HAVE_X11_EXTENSIONS_DPMSCONST_H', 1)
endif
pixman = dependency('pixman-1', version : '>= 0.16.0', required : true)
if pixman.version() >= '0.24.0'
config.set('HAS_PIXMAN_TRIANGLES', 1)
endif
if pixman.version() >= '0.27.1'
config.set('HAS_PIXMAN_GLYPHS', 1)
endif
with_kms = get_option('kms')
if with_kms
config.set('KMS', 1)
endif
with_ums = get_option('ums')
if with_ums
has_ums = cc.has_header('vgaHW.h',
dependencies : xorg)
# Currently 'required' doesn't work for cc.has_header() & co.
if not has_ums
error('UMS dependencies not met')
endif
config.set('UMS', 1)
endif
with_xvmc = get_option('xvmc')
if with_xvmc
dependency('xvmc', required : true)
dependency('dri2proto', required : true)
dependency('x11', required : true)
dependency('x11-xcb', required : true)
dependency('xcb-dri2', required : true)
dependency('xcb-aux', required : true)
dependency('libdrm_intel', required : true)
config.set('ENABLE_XVMC', 1)
endif
with_valgrind = get_option('valgrind')
if with_valgrind
message('Checking Valgrind support')
valgrind = dependency('valgrind', required : true)
config.set('HAVE_VALGRIND', 1)
endif
inc = include_directories([ '.', 'src', 'xvmc', 'src/render_program', ])
add_project_arguments('-include', 'config.h', language : 'c')
man_config = configuration_data()
man_config.set('appmansuffix', '1')
man_config.set('filemansuffix', '5')
man_config.set('drivermansuffix', '4')
man_config.set('miscmansuffix', '7')
man_config.set('xservername',
cc.get_define('__XSERVERNAME__',
prefix : '#include <xorg-server.h>',
dependencies : xorg))
man_config.set('xconfigfile',
cc.get_define('__XCONFIGFILE____',
prefix : '#include <xorg-server.h>',
dependencies : xorg))
man_config.set('vendorversion', '"@0@ @1@" "@2@"'.format(meson.project_name(),
meson.project_version(),
'X Version 11'))
subdir('src')
subdir('tools')
if with_xvmc
subdir('xvmc')
endif
subdir('man')
configure_file(output: 'config.h', install: false, configuration: config)
option('sna', type : 'boolean', value : true,
description : 'Build with SNA support')
option('uxa', type : 'boolean', value : true,
description : 'Build with UXA support')
option('xaa', type : 'boolean', value : true,
description : 'Build with XAA support')
option('ums', type : 'boolean', value : true,
description : 'Build with UMS support')
option('kms', type : 'boolean', value : true,
description : 'Build with KMS support')
option('dri1', type : 'boolean', value : true,
description : 'Build DRI1 support')
option('dri2', type : 'boolean', value : true,
description : 'Build with DRI2 support')
option('dri3', type : 'boolean', value : true,
description : 'Build with DRI3 support')
option('present', type : 'boolean', value : true,
description : 'Enable Present support')
option('xvmc', type : 'boolean', value : true,
description : 'Enable XvMC support')
option('valgrind', type : 'boolean', value : true,
description : 'Enable valgrindified ioctls for debugging')
option('default-dri', type : 'combo', value : '2', choices : [ '1', '2', '3' ],
description : 'Select the default maximum DRI level')
option('default-accel', type : 'combo', value : 'sna', choices : [ 'sna', 'uxa', 'none' ],
description : 'Select the default acceleration method')
option('tools', type : 'boolean', value : true,
description : 'Enable building and installing the miscellaneous tools')
option('backlight', type : 'boolean', value : true,
description : 'Enable control of the backlight')
option('backlight-helper', type : 'boolean', value : true,
description : 'Enable building the backlight helper executable for running X under a normal user')
option('tearfree', type : 'boolean', value : false,
description : 'Enable use of TearFree by default')
option('use-create2', type : 'boolean', value : false,
description : 'Enable use of create2 ioctl (experimental)')
option('async-swap', type : 'boolean', value : false,
description : 'Enable use of asynchronous swaps (experimental)')
option('debug', type : 'combo', value : 'no', choices : [ 'no', 'sync', 'memory', 'pixmap', 'full' ],
description : 'Enable internal debugging')
option('xorg-module-dir', type : 'string', value : '@libdir@/xorg/modules',
description : 'Default xorg module directory')
......@@ -47,6 +47,14 @@
0x030000, 0xff0000, \
(unsigned long) info }
#define INTEL_I810_IDS(info) \
INTEL_VGA_DEVICE(0x7121, info), /* I810 */ \
INTEL_VGA_DEVICE(0x7123, info), /* I810_DC100 */ \
INTEL_VGA_DEVICE(0x7125, info) /* I810_E */
#define INTEL_I815_IDS(info) \
INTEL_VGA_DEVICE(0x1132, info) /* I815*/
#define INTEL_I830_IDS(info) \
INTEL_VGA_DEVICE(0x3577, info)
......@@ -110,92 +118,125 @@
#define INTEL_IRONLAKE_M_IDS(info) \
INTEL_VGA_DEVICE(0x0046, info)
#define INTEL_SNB_D_IDS(info) \
#define INTEL_SNB_D_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x0102, info), \
INTEL_VGA_DEVICE(0x0112, info), \
INTEL_VGA_DEVICE(0x0122, info), \
INTEL_VGA_DEVICE(0x010A, info)
#define INTEL_SNB_M_IDS(info) \
INTEL_VGA_DEVICE(0x0106, info), \
#define INTEL_SNB_D_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x0112, info), \
INTEL_VGA_DEVICE(0x0122, info)
#define INTEL_SNB_D_IDS(info) \
INTEL_SNB_D_GT1_IDS(info), \
INTEL_SNB_D_GT2_IDS(info)
#define INTEL_SNB_M_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x0106, info)
#define INTEL_SNB_M_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x0116, info), \
INTEL_VGA_DEVICE(0x0126, info)
#define INTEL_IVB_M_IDS(info) \
INTEL_VGA_DEVICE(0x0156, info), /* GT1 mobile */ \
#define INTEL_SNB_M_IDS(info) \
INTEL_SNB_M_GT1_IDS(info), \
INTEL_SNB_M_GT2_IDS(info)
#define INTEL_IVB_M_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x0156, info) /* GT1 mobile */
#define INTEL_IVB_M_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x0166, info) /* GT2 mobile */
#define INTEL_IVB_D_IDS(info) \
#define INTEL_IVB_M_IDS(info) \
INTEL_IVB_M_GT1_IDS(info), \
INTEL_IVB_M_GT2_IDS(info)
#define INTEL_IVB_D_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x0152, info), /* GT1 desktop */ \
INTEL_VGA_DEVICE(0x015a, info) /* GT1 server */
#define INTEL_IVB_D_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x0162, info), /* GT2 desktop */ \
INTEL_VGA_DEVICE(0x015a, info), /* GT1 server */ \
INTEL_VGA_DEVICE(0x016a, info) /* GT2 server */
#define INTEL_IVB_D_IDS(info) \
INTEL_IVB_D_GT1_IDS(info), \
INTEL_IVB_D_GT2_IDS(info)
#define INTEL_IVB_Q_IDS(info) \
INTEL_QUANTA_VGA_DEVICE(info) /* Quanta transcode */
#define INTEL_HSW_IDS(info) \
#define INTEL_HSW_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x0402, info), /* GT1 desktop */ \
INTEL_VGA_DEVICE(0x0412, info), /* GT2 desktop */ \
INTEL_VGA_DEVICE(0x0422, info), /* GT3 desktop */ \
INTEL_VGA_DEVICE(0x040a, info), /* GT1 server */ \
INTEL_VGA_DEVICE(0x041a, info), /* GT2 server */ \
INTEL_VGA_DEVICE(0x042a, info), /* GT3 server */ \
INTEL_VGA_DEVICE(0x040B, info), /* GT1 reserved */ \
INTEL_VGA_DEVICE(0x041B, info), /* GT2 reserved */ \
INTEL_VGA_DEVICE(0x042B, info), /* GT3 reserved */ \
INTEL_VGA_DEVICE(0x040E, info), /* GT1 reserved */ \
INTEL_VGA_DEVICE(0x041E, info), /* GT2 reserved */ \
INTEL_VGA_DEVICE(0x042E, info), /* GT3 reserved */ \
INTEL_VGA_DEVICE(0x0C02, info), /* SDV GT1 desktop */ \
INTEL_VGA_DEVICE(0x0C12, info), /* SDV GT2 desktop */ \
INTEL_VGA_DEVICE(0x0C22, info), /* SDV GT3 desktop */ \
INTEL_VGA_DEVICE(0x0C0A, info), /* SDV GT1 server */ \
INTEL_VGA_DEVICE(0x0C1A, info), /* SDV GT2 server */ \
INTEL_VGA_DEVICE(0x0C2A, info), /* SDV GT3 server */ \
INTEL_VGA_DEVICE(0x0C0B, info), /* SDV GT1 reserved */ \
INTEL_VGA_DEVICE(0x0C1B, info), /* SDV GT2 reserved */ \
INTEL_VGA_DEVICE(0x0C2B, info), /* SDV GT3 reserved */ \
INTEL_VGA_DEVICE(0x0C0E, info), /* SDV GT1 reserved */ \
INTEL_VGA_DEVICE(0x0C1E, info), /* SDV GT2 reserved */ \
INTEL_VGA_DEVICE(0x0C2E, info), /* SDV GT3 reserved */ \
INTEL_VGA_DEVICE(0x0A02, info), /* ULT GT1 desktop */ \
INTEL_VGA_DEVICE(0x0A12, info), /* ULT GT2 desktop */ \
INTEL_VGA_DEVICE(0x0A22, info), /* ULT GT3 desktop */ \
INTEL_VGA_DEVICE(0x0A0A, info), /* ULT GT1 server */ \
INTEL_VGA_DEVICE(0x0A1A, info), /* ULT GT2 server */ \
INTEL_VGA_DEVICE(0x0A2A, info), /* ULT GT3 server */ \
INTEL_VGA_DEVICE(0x0A0B, info), /* ULT GT1 reserved */ \
INTEL_VGA_DEVICE(0x0A1B, info), /* ULT GT2 reserved */ \
INTEL_VGA_DEVICE(0x0A2B, info), /* ULT GT3 reserved */ \
INTEL_VGA_DEVICE(0x0D02, info), /* CRW GT1 desktop */ \
INTEL_VGA_DEVICE(0x0D12, info), /* CRW GT2 desktop */ \
INTEL_VGA_DEVICE(0x0D22, info), /* CRW GT3 desktop */ \
INTEL_VGA_DEVICE(0x0D0A, info), /* CRW GT1 server */ \
INTEL_VGA_DEVICE(0x0D1A, info), /* CRW GT2 server */ \
INTEL_VGA_DEVICE(0x0D2A, info), /* CRW GT3 server */ \
INTEL_VGA_DEVICE(0x0D0B, info), /* CRW GT1 reserved */ \
INTEL_VGA_DEVICE(0x0D1B, info), /* CRW GT2 reserved */ \
INTEL_VGA_DEVICE(0x0D2B, info), /* CRW GT3 reserved */ \
INTEL_VGA_DEVICE(0x0D0E, info), /* CRW GT1 reserved */ \
INTEL_VGA_DEVICE(0x0D1E, info), /* CRW GT2 reserved */ \
INTEL_VGA_DEVICE(0x0D2E, info), /* CRW GT3 reserved */ \
INTEL_VGA_DEVICE(0x0406, info), /* GT1 mobile */ \
INTEL_VGA_DEVICE(0x0C06, info), /* SDV GT1 mobile */ \
INTEL_VGA_DEVICE(0x0A06, info), /* ULT GT1 mobile */ \
INTEL_VGA_DEVICE(0x0A0E, info), /* ULX GT1 mobile */ \
INTEL_VGA_DEVICE(0x0D06, info) /* CRW GT1 mobile */
#define INTEL_HSW_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x0412, info), /* GT2 desktop */ \
INTEL_VGA_DEVICE(0x041a, info), /* GT2 server */ \
INTEL_VGA_DEVICE(0x041B, info), /* GT2 reserved */ \
INTEL_VGA_DEVICE(0x041E, info), /* GT2 reserved */ \
INTEL_VGA_DEVICE(0x0C12, info), /* SDV GT2 desktop */ \
INTEL_VGA_DEVICE(0x0C1A, info), /* SDV GT2 server */ \
INTEL_VGA_DEVICE(0x0C1B, info), /* SDV GT2 reserved */ \
INTEL_VGA_DEVICE(0x0C1E, info), /* SDV GT2 reserved */ \
INTEL_VGA_DEVICE(0x0A12, info), /* ULT GT2 desktop */ \
INTEL_VGA_DEVICE(0x0A1A, info), /* ULT GT2 server */ \
INTEL_VGA_DEVICE(0x0A1B, info), /* ULT GT2 reserved */ \
INTEL_VGA_DEVICE(0x0D12, info), /* CRW GT2 desktop */ \
INTEL_VGA_DEVICE(0x0D1A, info), /* CRW GT2 server */ \
INTEL_VGA_DEVICE(0x0D1B, info), /* CRW GT2 reserved */ \
INTEL_VGA_DEVICE(0x0D1E, info), /* CRW GT2 reserved */ \
INTEL_VGA_DEVICE(0x0416, info), /* GT2 mobile */ \
INTEL_VGA_DEVICE(0x0426, info), /* GT2 mobile */ \
INTEL_VGA_DEVICE(0x0C06, info), /* SDV GT1 mobile */ \
INTEL_VGA_DEVICE(0x0C16, info), /* SDV GT2 mobile */ \
INTEL_VGA_DEVICE(0x0C26, info), /* SDV GT3 mobile */ \
INTEL_VGA_DEVICE(0x0A06, info), /* ULT GT1 mobile */ \
INTEL_VGA_DEVICE(0x0A16, info), /* ULT GT2 mobile */ \
INTEL_VGA_DEVICE(0x0A26, info), /* ULT GT3 mobile */ \
INTEL_VGA_DEVICE(0x0A0E, info), /* ULX GT1 mobile */ \
INTEL_VGA_DEVICE(0x0A1E, info), /* ULX GT2 mobile */ \
INTEL_VGA_DEVICE(0x0D16, info) /* CRW GT2 mobile */
#define INTEL_HSW_GT3_IDS(info) \
INTEL_VGA_DEVICE(0x0422, info), /* GT3 desktop */ \
INTEL_VGA_DEVICE(0x042a, info), /* GT3 server */ \
INTEL_VGA_DEVICE(0x042B, info), /* GT3 reserved */ \
INTEL_VGA_DEVICE(0x042E, info), /* GT3 reserved */ \
INTEL_VGA_DEVICE(0x0C22, info), /* SDV GT3 desktop */ \
INTEL_VGA_DEVICE(0x0C2A, info), /* SDV GT3 server */ \
INTEL_VGA_DEVICE(0x0C2B, info), /* SDV GT3 reserved */ \
INTEL_VGA_DEVICE(0x0C2E, info), /* SDV GT3 reserved */ \
INTEL_VGA_DEVICE(0x0A22, info), /* ULT GT3 desktop */ \
INTEL_VGA_DEVICE(0x0A2A, info), /* ULT GT3 server */ \
INTEL_VGA_DEVICE(0x0A2B, info), /* ULT GT3 reserved */ \
INTEL_VGA_DEVICE(0x0D22, info), /* CRW GT3 desktop */ \
INTEL_VGA_DEVICE(0x0D2A, info), /* CRW GT3 server */ \
INTEL_VGA_DEVICE(0x0D2B, info), /* CRW GT3 reserved */ \
INTEL_VGA_DEVICE(0x0D2E, info), /* CRW GT3 reserved */ \
INTEL_VGA_DEVICE(0x0C26, info), /* SDV GT3 mobile */ \
INTEL_VGA_DEVICE(0x0A26, info), /* ULT GT3 mobile */ \
INTEL_VGA_DEVICE(0x0A2E, info), /* ULT GT3 reserved */ \
INTEL_VGA_DEVICE(0x0D06, info), /* CRW GT1 mobile */ \
INTEL_VGA_DEVICE(0x0D16, info), /* CRW GT2 mobile */ \
INTEL_VGA_DEVICE(0x0D26, info) /* CRW GT3 mobile */
#define INTEL_HSW_IDS(info) \
INTEL_HSW_GT1_IDS(info), \
INTEL_HSW_GT2_IDS(info), \
INTEL_HSW_GT3_IDS(info)
#define INTEL_VLV_IDS(info) \
INTEL_VGA_DEVICE(0x0f30, info), \
INTEL_VGA_DEVICE(0x0f31, info), \
......@@ -204,17 +245,19 @@
INTEL_VGA_DEVICE(0x0157, info), \
INTEL_VGA_DEVICE(0x0155, info)
#define INTEL_BDW_GT12_IDS(info) \
#define INTEL_BDW_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x1602, info), /* GT1 ULT */ \
INTEL_VGA_DEVICE(0x1606, info), /* GT1 ULT */ \
INTEL_VGA_DEVICE(0x160B, info), /* GT1 Iris */ \
INTEL_VGA_DEVICE(0x160E, info), /* GT1 ULX */ \
INTEL_VGA_DEVICE(0x160A, info), /* GT1 Server */ \
INTEL_VGA_DEVICE(0x160D, info) /* GT1 Workstation */
#define INTEL_BDW_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x1612, info), /* GT2 Halo */ \
INTEL_VGA_DEVICE(0x1616, info), /* GT2 ULT */ \
INTEL_VGA_DEVICE(0x161B, info), /* GT2 ULT */ \
INTEL_VGA_DEVICE(0x161E, info), /* GT2 ULX */ \
INTEL_VGA_DEVICE(0x160A, info), /* GT1 Server */ \
INTEL_VGA_DEVICE(0x160D, info), /* GT1 Workstation */ \
INTEL_VGA_DEVICE(0x161A, info), /* GT2 Server */ \
INTEL_VGA_DEVICE(0x161D, info) /* GT2 Workstation */
......@@ -235,7 +278,8 @@
INTEL_VGA_DEVICE(0x163D, info) /* Workstation */
#define INTEL_BDW_IDS(info) \
INTEL_BDW_GT12_IDS(info), \
INTEL_BDW_GT1_IDS(info), \
INTEL_BDW_GT2_IDS(info), \
INTEL_BDW_GT3_IDS(info), \
INTEL_BDW_RSVD_IDS(info)
......@@ -295,7 +339,6 @@
#define INTEL_KBL_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x5913, info), /* ULT GT1.5 */ \
INTEL_VGA_DEVICE(0x5915, info), /* ULX GT1.5 */ \
INTEL_VGA_DEVICE(0x5917, info), /* DT GT1.5 */ \
INTEL_VGA_DEVICE(0x5906, info), /* ULT GT1 */ \
INTEL_VGA_DEVICE(0x590E, info), /* ULX GT1 */ \
INTEL_VGA_DEVICE(0x5902, info), /* DT GT1 */ \
......@@ -305,6 +348,7 @@
#define INTEL_KBL_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x5916, info), /* ULT GT2 */ \
INTEL_VGA_DEVICE(0x5917, info), /* Mobile GT2 */ \
INTEL_VGA_DEVICE(0x5921, info), /* ULT GT2F */ \
INTEL_VGA_DEVICE(0x591E, info), /* ULX GT2 */ \
INTEL_VGA_DEVICE(0x5912, info), /* DT GT2 */ \
......@@ -320,17 +364,98 @@
#define INTEL_KBL_GT4_IDS(info) \
INTEL_VGA_DEVICE(0x593B, info) /* Halo GT4 */
/* AML/KBL Y GT2 */
#define INTEL_AML_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x591C, info), /* ULX GT2 */ \
INTEL_VGA_DEVICE(0x87C0, info) /* ULX GT2 */
#define INTEL_KBL_IDS(info) \
INTEL_KBL_GT1_IDS(info), \
INTEL_KBL_GT2_IDS(info), \
INTEL_KBL_GT3_IDS(info), \
INTEL_KBL_GT4_IDS(info)
INTEL_KBL_GT4_IDS(info), \
INTEL_AML_GT2_IDS(info)
#define INTEL_CFL_S_IDS(info) \
/* CFL S */
#define INTEL_CFL_S_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x3E90, info), /* SRV GT1 */ \
INTEL_VGA_DEVICE(0x3E93, info), /* SRV GT1 */ \
INTEL_VGA_DEVICE(0x3E99, info) /* SRV GT1 */
#define INTEL_CFL_S_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x3E91, info), /* SRV GT2 */ \
INTEL_VGA_DEVICE(0x3E92, info), /* SRV GT2 */ \
INTEL_VGA_DEVICE(0x3E96, info) /* SRV GT2 */
INTEL_VGA_DEVICE(0x3E96, info), /* SRV GT2 */ \
INTEL_VGA_DEVICE(0x3E98, info), /* SRV GT2 */ \
INTEL_VGA_DEVICE(0x3E9A, info) /* SRV GT2 */
/* CFL H */
#define INTEL_CFL_H_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x3E9B, info), /* Halo GT2 */ \
INTEL_VGA_DEVICE(0x3E94, info) /* Halo GT2 */
/* CFL U GT2 */
#define INTEL_CFL_U_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x3EA9, info)
/* CFL U GT3 */
#define INTEL_CFL_U_GT3_IDS(info) \
INTEL_VGA_DEVICE(0x3EA5, info), /* ULT GT3 */ \
INTEL_VGA_DEVICE(0x3EA6, info), /* ULT GT3 */ \
INTEL_VGA_DEVICE(0x3EA7, info), /* ULT GT3 */ \
INTEL_VGA_DEVICE(0x3EA8, info) /* ULT GT3 */
/* WHL/CFL U GT1 */
#define INTEL_WHL_U_GT1_IDS(info) \
INTEL_VGA_DEVICE(0x3EA1, info)
/* WHL/CFL U GT2 */
#define INTEL_WHL_U_GT2_IDS(info) \
INTEL_VGA_DEVICE(0x3EA0, info)
/* WHL/CFL U GT3 */
#define INTEL_WHL_U_GT3_IDS(info) \
INTEL_VGA_DEVICE(0x3EA2, info), \
INTEL_VGA_DEVICE(0x3EA3, info), \
INTEL_VGA_DEVICE(0x3EA4, info)
#define INTEL_CFL_IDS(info) \
INTEL_CFL_S_GT1_IDS(info), \
INTEL_CFL_S_GT2_IDS(info), \
INTEL_CFL_H_GT2_IDS(info), \
INTEL_CFL_U_GT2_IDS(info), \
INTEL_CFL_U_GT3_IDS(info), \
INTEL_WHL_U_GT1_IDS(info), \
INTEL_WHL_U_GT2_IDS(info), \
INTEL_WHL_U_GT3_IDS(info)
/* CNL */
#define INTEL_CNL_IDS(info) \
INTEL_VGA_DEVICE(0x5A51, info), \
INTEL_VGA_DEVICE(0x5A59, info), \
INTEL_VGA_DEVICE(0x5A41, info), \
INTEL_VGA_DEVICE(0x5A49, info), \
INTEL_VGA_DEVICE(0x5A52, info), \
INTEL_VGA_DEVICE(0x5A5A, info), \
INTEL_VGA_DEVICE(0x5A42, info), \
INTEL_VGA_DEVICE(0x5A4A, info), \
INTEL_VGA_DEVICE(0x5A50, info), \
INTEL_VGA_DEVICE(0x5A40, info), \
INTEL_VGA_DEVICE(0x5A54, info), \
INTEL_VGA_DEVICE(0x5A5C, info), \
INTEL_VGA_DEVICE(0x5A44, info), \
INTEL_VGA_DEVICE(0x5A4C, info)
/* ICL */
#define INTEL_ICL_11_IDS(info) \
INTEL_VGA_DEVICE(0x8A50, info), \
INTEL_VGA_DEVICE(0x8A51, info), \
INTEL_VGA_DEVICE(0x8A5C, info), \
INTEL_VGA_DEVICE(0x8A5D, info), \
INTEL_VGA_DEVICE(0x8A52, info), \
INTEL_VGA_DEVICE(0x8A5A, info), \
INTEL_VGA_DEVICE(0x8A5B, info), \
INTEL_VGA_DEVICE(0x8A71, info), \
INTEL_VGA_DEVICE(0x8A70, info)
#endif /* _I915_PCIIDS_H */
......@@ -467,7 +467,7 @@ static char *find_master_node(int fd)
sprintf(buf, "/dev/dri/card%d", (int)(st.st_rdev & 0x7f));
if (stat(buf, &master) == 0 &&
st.st_mode == master.st_mode &&
S_ISCHR(master.st_mode) &&
(st.st_rdev & 0x7f) == master.st_rdev)
return strdup(buf);
......@@ -478,10 +478,10 @@ static char *find_master_node(int fd)
static int is_render_node(int fd, struct stat *st)
{
if (fstat(fd, st))
return 0;
return -1;
if (!S_ISCHR(st->st_mode))
return 0;
return -1;
return st->st_rdev & 0x80;
}
......@@ -498,7 +498,7 @@ static char *find_render_node(int fd)
sprintf(buf, "/dev/dri/renderD%d", (int)((master.st_rdev | 0x80) & 0xbf));
if (stat(buf, &render) == 0 &&
master.st_mode == render.st_mode &&
S_ISCHR(render.st_mode) &&
render.st_rdev == (master.st_rdev | 0x80))
return strdup(buf);
......@@ -506,7 +506,7 @@ static char *find_render_node(int fd)
for (i = 0; i < 16; i++) {
sprintf(buf, "/dev/dri/renderD%d", i + 128);
if (stat(buf, &render) == 0 &&
master.st_mode == render.st_mode &&
S_ISCHR(render.st_mode) &&
render.st_rdev == (master.st_rdev | 0x80))
return strdup(buf);
}
......
......@@ -310,9 +310,23 @@ static const SymTabRec intel_chipsets[] = {
/*Coffeelake*/
{0x3E90, "HD Graphics"},
{0x3E93, "HD Graphics"},
{0x3E99, "HD Graphics"},
{0x3E91, "HD Graphics"},
{0x3E92, "HD Graphics"},
{0x3E96, "HD Graphics"},
{0x3E9A, "HD Graphics"},
{0x3E9B, "HD Graphics"},
{0x3E94, "HD Graphics"},
{0x3EA1, "HD Graphics"},
{0x3EA4, "HD Graphics"},
{0x3EA0, "HD Graphics"},
{0x3EA3, "HD Graphics"},
{0x3EA9, "HD Graphics"},
{0x3EA2, "HD Graphics"},
{0x3EA5, "HD Graphics"},
{0x3EA6, "HD Graphics"},
{0x3EA7, "HD Graphics"},
{0x3EA8, "HD Graphics"},
/* When adding new identifiers, also update:
* 1. intel_identify()
......@@ -369,7 +383,7 @@ static const struct pci_id_match intel_device_match[] = {
INTEL_KBL_IDS(&intel_kabylake_info),
INTEL_GLK_IDS(&intel_geminilake_info),
INTEL_CFL_S_IDS(&intel_coffeelake_info),
INTEL_CFL_IDS(&intel_coffeelake_info),
INTEL_VGA_DEVICE(PCI_MATCH_ANY, &intel_generic_info),
#endif
......
i810_sources = [
'i810_accel.c',
'i810_cursor.c',
'i810_driver.c',
'i810_memory.c',
'i810_video.c',
'i810_wmark.c',
]
xorg = dependency('xorg-server', required : true)
i810_deps = [
dependency('libdrm', required : true),
dependency('pciaccess', required : true),
xorg,
]
if cc.has_header('xaa.h', dependencies : xorg)
config.set('HAVE_XAA_H', 1)
i810_sources += 'i810_xaa.c'
endif
if cc.has_header('dgaproc.h', dependencies : xorg)
config.set('HAVE_DGAPROC_H', 1)
i810_sources += 'i810_dga.c'
endif
if with_dri1
i810_sources += 'i810_dri.c'
i810_deps += dependency('xf86driproto', required : true)
if with_xvmc
i810_sources += 'i810_hwmc.c'
endif
endif
i810 = static_library('legacy_i810',
sources : i810_sources,
dependencies : i810_deps,
include_directories : inc,
c_args : [
'-Wno-unused-parameter',
'-Wno-sign-compare',
],
install : false)
if with_xvmc
subdir('xvmc')
endif
shared_library('I810XvMC',
soversion : '1',
version : '1.0.0',
sources : 'I810XvMC.c',
dependencies : [
dependency('x11', required : true),
dependency('xvmc', required : true),
dependency('xorg-server', required : true),
dependency('libdrm', required : true),
],
c_args : [
'-Wno-unused-parameter',
'-Wno-sign-compare',
],
install : true)
xorg = dependency('xorg-server', required : true)
libdrm = dependency('libdrm', required : true)
pixman = dependency('pixman-1', required : true)
with_dri1 = get_option('dri1')
if with_dri1
dri1 = dependency('xf86driproto', required : true)
has_dri1 = (cc.has_header('dri.h', dependencies : xorg) and
cc.has_header('sarea.h', dependencies : xorg) and
cc.has_header('dristruct.h', dependencies : xorg))
# Currently 'required' doesn't work for cc.has_header() & co.
if not has_dri1
error('DRI1 dependencies not met')
endif
config.set('HAVE_DRI1', 1)
endif
with_dri2 = get_option('dri2')
if with_dri2
dri2 = dependency('dri2proto', version : '>= 2.6', required : true)
dri = dependency('dri', required : false)
if dri.found()
dridriverdir = dri.get_pkgconfig_variable('dridriverdir')
else
dridriverdir = join_paths(get_option('libdir'), 'dri')
endif
config.set('HAVE_DRI2', 1)
config.set_quoted('DRI_DRIVER_PATH', dridriverdir)
endif
with_dri3 = get_option('dri3')
if with_dri3
dri3 = dependency('dri3proto', required : true)
has_dri3 = (cc.has_header_symbol('xorg-server.h', 'DRI3',
dependencies : xorg) and
cc.has_header('misyncstr.h',
dependencies : xorg) and
cc.has_header('misyncshm.h',
dependencies : xorg))
# Currently 'required' doesn't work for cc.has_header() & co.
if not has_dri3
error('DRI3 dependencies not met')
endif
config.set('HAVE_DRI3', 1)
endif
default_dri = get_option('default-dri')
config.set('DEFAULT_DRI_LEVEL', default_dri)
present = dependency('presentproto', required : false)
has_present = (present.found() and
cc.has_header('present.h', dependencies : xorg))
if has_present
config.set('HAVE_PRESENT', 1)
endif
if get_option('backlight')
config.set('USE_BACKLIGHT', 1)
endif
with_backlight_helper = get_option('backlight-helper')
if with_backlight_helper
config.set('USE_BACKLIGHT_HELPER', 1)
endif
debug = get_option('debug')
if debug == 'sync'
config.set('DEBUG_SYNC', 1)
endif
if debug == 'memory' or debug == 'full'
config.set('DEBUG_MEMORY', 1)
endif
if debug == 'pixmap' or debug == 'full'
config.set('DEBUG_PIXMAP', 1)
endif
if debug == 'full'
config.set('HAS_DEBUG_FULL', 1)
endif
intel_drv_sources = [
'backlight.c',
'fd.c',
'intel_device.c',
'intel_options.c',
'intel_module.c',
]
intel_drv_deps = [
dependency('pciaccess', version : '>= 0.10', required : true),
libdrm,
xorg,
]
intel_drv_libs = []
if with_ums
subdir('legacy/i810')
intel_drv_libs += i810
endif
default_accel = get_option('default-accel')
with_sna = get_option('sna')
if with_sna
subdir('sna')
intel_drv_libs += sna
elif default_accel == 'sna'
error('SNA not available, so can\'t selected as the default acceleration method')
endif
with_uxa = get_option('uxa')
if with_uxa
subdir('uxa')
intel_drv_libs += uxa
elif default_accel == 'uxa'
error('UXA not available, so can\'t selected as the default acceleration method')
endif
if default_accel == 'sna'
config.set('DEFAULT_ACCEL_METHOD', 'SNA')
elif default_accel == 'uxa'
config.set('DEFAULT_ACCEL_METHOD', 'UXA')
else
config.set('DEFAULT_ACCEL_METHOD', 'NOACCEL')
endif
if with_valgrind
intel_drv_deps += valgrind
endif
xorg_moduledir = get_option('xorg-module-dir')
moduledir = ''
foreach dir : xorg_moduledir.split('/')
if dir == '@libdir@'
dir = get_option('libdir')
endif
moduledir = join_paths(moduledir, dir)
endforeach
shared_module('intel_drv',
sources : intel_drv_sources,
dependencies : intel_drv_deps,
link_with : intel_drv_libs,
c_args : [
'-DMAJOR_IN_SYSMACROS',
'-Wno-unused-parameter',
'-Wno-sign-compare',
'-Wno-missing-field-initializers',
],
name_prefix : '',
install_dir : join_paths(moduledir, 'drivers'),
install : true)
......@@ -15,7 +15,8 @@ INTEL_G4A = \
exa_wm_ca.g4a \
exa_wm_ca_srcalpha.g4a \
exa_wm_write.g4a \
exa_wm_yuv_rgb.g4a \
exa_wm_yuv_rgb_bt601.g4a \
exa_wm_yuv_rgb_bt709.g4a \
exa_wm_xy.g4a \
$(NULL)
......@@ -45,7 +46,8 @@ INTEL_G4B = \
exa_wm_ca.g4b \
exa_wm_ca_srcalpha.g4b \
exa_wm_write.g4b \
exa_wm_yuv_rgb.g4b \
exa_wm_yuv_rgb_bt601.g4b \
exa_wm_yuv_rgb_bt709.g4b \
exa_wm_xy.g4b \
$(NULL)
......@@ -67,7 +69,8 @@ INTEL_G4B_GEN5 = \
exa_wm_ca.g4b.gen5 \
exa_wm_ca_srcalpha.g4b.gen5 \
exa_wm_write.g4b.gen5 \
exa_wm_yuv_rgb.g4b.gen5 \
exa_wm_yuv_rgb_bt601.g4b.gen5 \
exa_wm_yuv_rgb_bt709.g4b.gen5 \
exa_wm_xy.g4b.gen5 \
$(NULL)
......@@ -88,7 +91,8 @@ INTEL_G5A = \
exa_wm_ca.g5a \
exa_wm_ca_srcalpha.g5a \
exa_wm_write.g5a \
exa_wm_yuv_rgb.g5a \
exa_wm_yuv_rgb_bt601.g5a \
exa_wm_yuv_rgb_bt709.g5a \
exa_wm_xy.g5a \
$(NULL)
......@@ -109,7 +113,8 @@ INTEL_G5B = \
exa_wm_ca.g5b \
exa_wm_ca_srcalpha.g5b \
exa_wm_write.g5b \
exa_wm_yuv_rgb.g5b \
exa_wm_yuv_rgb_bt601.g5b \
exa_wm_yuv_rgb_bt709.g5b \
exa_wm_xy.g5b \
$(NULL)
......@@ -133,7 +138,8 @@ INTEL_G6A = \
exa_wm_ca_srcalpha.g6a \
exa_wm_noca.g6a \
exa_wm_write.g6a \
exa_wm_yuv_rgb.g6a \
exa_wm_yuv_rgb_bt601.g6a \
exa_wm_yuv_rgb_bt709.g6a \
$(NULL)
INTEL_G6B = \
......@@ -151,7 +157,8 @@ INTEL_G6B = \
exa_wm_ca_srcalpha.g6b \
exa_wm_noca.g6b \
exa_wm_write.g6b \
exa_wm_yuv_rgb.g6b \
exa_wm_yuv_rgb_bt601.g6b \
exa_wm_yuv_rgb_bt709.g6b \
$(NULL)
INTEL_G7A = \
......@@ -166,7 +173,8 @@ INTEL_G7A = \
exa_wm_src_sample_nv12.g7a \
exa_wm_src_sample_planar.g7a \
exa_wm_write.g7a \
exa_wm_yuv_rgb.g7a \
exa_wm_yuv_rgb_bt601.g7a \
exa_wm_yuv_rgb_bt709.g7a \
$(NULL)
INTEL_G7B = \
......@@ -181,7 +189,8 @@ INTEL_G7B = \
exa_wm_src_sample_nv12.g7b \
exa_wm_src_sample_planar.g7b \
exa_wm_write.g7b \
exa_wm_yuv_rgb.g7b \
exa_wm_yuv_rgb_bt601.g7b \
exa_wm_yuv_rgb_bt709.g7b \
$(NULL)
INTEL_G8A = \
......@@ -190,7 +199,8 @@ INTEL_G8A = \
exa_wm_src_sample_nv12.g8a \
exa_wm_src_sample_planar.g8a \
exa_wm_write.g8a \
exa_wm_yuv_rgb.g8a \
exa_wm_yuv_rgb_bt601.g8a \
exa_wm_yuv_rgb_bt709.g8a \
$(NULL)
INTEL_G8B = \
......@@ -199,7 +209,8 @@ INTEL_G8B = \
exa_wm_src_sample_nv12.g8b \
exa_wm_src_sample_planar.g8b \
exa_wm_write.g8b \
exa_wm_yuv_rgb.g8b \
exa_wm_yuv_rgb_bt601.g8b \
exa_wm_yuv_rgb_bt709.g8b \
$(NULL)
EXTRA_DIST = \
......
exa_wm_yuv_rgb.g4a
\ No newline at end of file
exa_wm_yuv_rgb.g4a
\ No newline at end of file
......@@ -55,14 +55,24 @@ define(`Cbn_01', `mask_sample_b_01')
define(`Cbn_23', `mask_sample_b_23')
/* color space conversion function:
* R = Clamp ( 1.164(Y-16/255) + 1.596(Cr-128/255), 0, 1)
* G = Clamp ( 1.164(Y-16/255) - 0.813(Cr-128/255) - 0.392(Cb-128/255), 0, 1)
* B = Clamp ( 1.164(Y-16/255) + 2.017(Cb-128/255), 0, 1)
* Cy = 255/(235-16)
* R = Clamp ( 255/(235-16)(Y-16/255) +
* 255/112(1.0-Kr)(Cr-128/255), 0, 1)
* G = Clamp ( 255/(235-16)(Y-16/255) -
* 255/112(1.0-Kr)Kr/Kg(Cr-128/255) -
* 255/112(1.0-Kb)Kb/Kg(Cb-128/255), 0, 1)
* B = Clamp ( 255/(235-16)(Y-16/255) +
* 255/112(1.0-Kb)(Cb-128/255), 0, 1)
*
* BT.601:
* Kr = 0.299
* Kb = 0.114
* Kg = (1.0 - Kr - Kb) = 0.587
*/
/* Normalize Y, Cb and Cr:
*
* Yn = (Y - 16/255) * 1.164
* Yn = (Y - 16/255) * 255/(235-16)
* Crn = Cr - 128 / 255
* Cbn = Cb - 128 / 255
*/
......@@ -74,20 +84,24 @@ add (16) Crn<1>F Cr<8,8,1>F -0.501961F { compr align1 };
add (16) Cbn<1>F Cb<8,8,1>F -0.501961F { compr align1 };
/*
* R = Y + Cr * 1.596
* R = Yn +
* Crn * 255/112 * (1.0 - Kr)
*/
mov (16) acc0<1>F Yn<8,8,1>F { compr align1 };
mac.sat(16) src_sample_r<1>F Crn<8,8,1>F 1.596F { compr align1 };
/*
* G = Crn * -0.813 + Cbn * -0.392 + Y
* G = Yn -
* Crn * 255/112 * (1.0 - Kr) * Kr / Kg -
* Cbn * 255/112 * (1.0 - Kb) * Kb / Kg
*/
mov (16) acc0<1>F Yn<8,8,1>F { compr align1 };
mac (16) acc0<1>F Crn<8,8,1>F -0.813F { compr align1 };
mac.sat(16) src_sample_g<1>F Cbn<8,8,1>F -0.392F { compr align1 };
/*
* B = Cbn * 2.017 + Y
* B = Yn +
* Cbn * 255/112 * (1.0 - Kb)
*/
mov (16) acc0<1>F Yn<8,8,1>F { compr align1 };
mac.sat(16) src_sample_b<1>F Cbn<8,8,1>F 2.017F { compr align1 };
......
exa_wm_yuv_rgb_bt601.g4a
\ No newline at end of file
exa_wm_yuv_rgb_bt601.g4a
\ No newline at end of file