diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..57cda4e35 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,34 @@ +language: c++ +sudo: required +dist: trusty +install: +- sudo apt-get update +- sudo apt-get install automake +- sudo apt-get install autoconf +- sudo apt-get install libtool +- sudo apt-get install xutils-dev +- sudo apt-get install libpciaccess-dev +- sudo apt-get install python-mako +- sudo dpkg -s python-mako +- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y +- sudo apt-get update +- sudo apt-get install gcc-4.9 +- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 +- sudo apt-get install g++-4.9 +- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50 +script: +- export HWC_BUILD_DIR=/tmp/ +- export WLD=/tmp/hwc-install +- export LD_LIBRARY_PATH=$WLD/lib +- export PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig +- export PATH=$WLD/bin:$PATH +- export ACLOCAL_PATH=$WLD/share/aclocal +- export ACLOCAL="aclocal -I $ACLOCAL_PATH" +- export DRV_I915=1 +- tar -xvf travisci/resources/libdrm-install.tar.bz2 -C $HWC_BUILD_DIR +- mkdir -p $WLD/share/aclocal +- ./autogen.sh --disable-radeon --disable-nouveau --disable-amdgpu --enable-udev --enable-libkms --prefix=$WLD +- make -j5 && make install +branches: + only: + - master diff --git a/Android.mk b/Android.mk index 1b77c5386..6fa4456a4 100644 --- a/Android.mk +++ b/Android.mk @@ -21,6 +21,7 @@ # IN THE SOFTWARE. # +ifeq ($(LIBDRM_VER),intel) LIBDRM_COMMON_MK := $(call my-dir)/Android.common.mk LOCAL_PATH := $(call my-dir) @@ -63,7 +64,19 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include/drm +LOCAL_COPY_HEADERS := \ + xf86drm.h \ + include/drm/drm_fourcc.h \ + include/drm/drm.h \ + include/drm/drm_mode.h \ + include/drm/drm_sarea.h \ + include/drm/i915_drm.h \ + intel/intel_bufmgr.h \ + +LOCAL_COPY_HEADERS_TO := libdrm + include $(LIBDRM_COMMON_MK) include $(BUILD_SHARED_LIBRARY) include $(call all-makefiles-under,$(LOCAL_PATH)) +endif diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c index a87e1b9a2..f7ac7bcac 100644 --- a/freedreno/msm/msm_ringbuffer.c +++ b/freedreno/msm/msm_ringbuffer.c @@ -385,7 +385,7 @@ static void dump_submit(struct msm_ringbuffer *msm_ring) for (j = 0; j < cmd->nr_relocs; j++) { struct drm_msm_gem_submit_reloc *r = &relocs[j]; ERROR_MSG(" reloc[%d]: submit_offset=%u, or=%08x, shift=%d, reloc_idx=%u" - ", reloc_offset=%"PRIu64, j, r->submit_offset, r->or, r->shift, + ", reloc_offset=%llu", j, r->submit_offset, r->or, r->shift, r->reloc_idx, r->reloc_offset); } } diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index e04613d30..e7ce67a0a 100644 --- a/include/drm/drm_fourcc.h +++ b/include/drm/drm_fourcc.h @@ -113,6 +113,10 @@ extern "C" { #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ +/* 64 bpp RGB */ +#define DRM_FORMAT_XRGB161616 fourcc_code('X', 'R', '4', '8') /* [63:0] x:R:G:B 16:16:16:16 little endian */ +#define DRM_FORMAT_XBGR161616 fourcc_code('X', 'B', '4', '8') /* [63:0] x:B:G:R 16:16:16:16 little endian */ + /* * 2 plane RGB + A * index 0 = RGB plane, same format as the corresponding non _A8 format has @@ -141,6 +145,27 @@ extern "C" { #define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */ #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ +/* + * 2 plane YCbCr MSB aligned + * index 0 = Y plane, [15:0] Y:x [10:6] little endian + * index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [10:6:10:6] little endian + */ +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel */ + +/* + * 2 plane YCbCr MSB aligned + * index 0 = Y plane, [15:0] Y:x [12:4] little endian + * index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [12:4:12:4] little endian + */ +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cr:Cb plane 12 bits per channel */ + +/* + * 2 plane YCbCr MSB aligned + * index 0 = Y plane, [15:0] Y little endian + * index 1 = Cr:Cb plane, [31:0] Cr:Cb [16:16] little endian + */ +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */ + /* * 3 plane YCbCr * index 0: Y plane, [7:0] Y diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 5597a8715..f81dbfde6 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h @@ -580,6 +580,13 @@ struct drm_color_ctm { __s64 matrix[9]; }; +struct drm_color_ctm_post_offset { + /* Data is U0.16 fixed point format. */ + __u16 red; + __u16 green; + __u16 blue; +}; + struct drm_color_lut { /* * Data is U0.16 fixed point format. diff --git a/libsync.h b/libsync.h index f1a2f96d3..2e79c578a 100644 --- a/libsync.h +++ b/libsync.h @@ -85,7 +85,8 @@ static inline int sync_wait(int fd, int timeout) static inline int sync_merge(const char *name, int fd1, int fd2) { - struct sync_merge_data data = {0}; + struct sync_merge_data data; + memset(&data, 0, sizeof(struct sync_merge_data)); int ret; data.fd2 = fd2; diff --git a/travisci/resources/libdrm-install.tar.bz2 b/travisci/resources/libdrm-install.tar.bz2 new file mode 100644 index 000000000..9579865ad Binary files /dev/null and b/travisci/resources/libdrm-install.tar.bz2 differ