From owner-svn-ports-all@FreeBSD.ORG Thu Oct 25 21:06:39 2012 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 89A7E460; Thu, 25 Oct 2012 21:06:39 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7124F8FC12; Thu, 25 Oct 2012 21:06:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9PL6dKN046001; Thu, 25 Oct 2012 21:06:39 GMT (envelope-from madpilot@svn.freebsd.org) Received: (from madpilot@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PL6dTB045994; Thu, 25 Oct 2012 21:06:39 GMT (envelope-from madpilot@svn.freebsd.org) Message-Id: <201210252106.q9PL6dTB045994@svn.freebsd.org> From: Guido Falsi Date: Thu, 25 Oct 2012 21:06:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r306398 - in head/multimedia: . libva-intel-driver libva-intel-driver/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 21:06:39 -0000 Author: madpilot Date: Thu Oct 25 21:06:38 2012 New Revision: 306398 URL: http://svn.freebsd.org/changeset/ports/306398 Log: Libva driver for intel graphics cards with hardware accelerated features for video encode/decode. WWW: http://cgit.freedesktop.org/vaapi/intel-driver PR: ports/172843 Submitted by: Manuel Creach Feature safe: yes Added: head/multimedia/libva-intel-driver/ head/multimedia/libva-intel-driver/Makefile (contents, props changed) head/multimedia/libva-intel-driver/distinfo (contents, props changed) head/multimedia/libva-intel-driver/files/ head/multimedia/libva-intel-driver/files/patch-drm_state_upstream (contents, props changed) head/multimedia/libva-intel-driver/files/patch-src-i965_decoder_utils.c (contents, props changed) head/multimedia/libva-intel-driver/pkg-descr (contents, props changed) Modified: head/multimedia/Makefile Modified: head/multimedia/Makefile ============================================================================== --- head/multimedia/Makefile Thu Oct 25 21:03:22 2012 (r306397) +++ head/multimedia/Makefile Thu Oct 25 21:06:38 2012 (r306398) @@ -169,6 +169,7 @@ SUBDIR += libtuner SUBDIR += libv4l SUBDIR += libva + SUBDIR += libva-intel-driver SUBDIR += libva-vdpau-driver SUBDIR += libvdpau SUBDIR += libvpx Added: head/multimedia/libva-intel-driver/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/libva-intel-driver/Makefile Thu Oct 25 21:06:38 2012 (r306398) @@ -0,0 +1,40 @@ +# Created by: Manuel Creach +# $FreeBSD$ + +PORTNAME= libva-intel-driver +PORTVERSION= 1.0.18 +CATEGORIES= multimedia +MASTER_SITES= http://www.freedesktop.org/software/vaapi/releases/${PORTNAME}/ + +MAINTAINER= manuel.creach@me.com +COMMENT= VAAPI intel driver + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS= va:${PORTSDIR}/multimedia/libva +BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat + +USE_GMAKE= yes +USE_BZIP2= yes +USE_GL= gl +USE_LDCONFIG= yes +GNU_CONFIGURE= yes + +CPPFLAGS+= -isystem${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +PLIST_FILES= lib/va/i965_drv_video.so \ + lib/va/i965_drv_video.la + +.if !defined(WITH_NEW_XORG) || !defined(WITH_KMS) +IGNORE= requires libdrm >= 2.4.23 and intel KMS to be enabled +.endif + +post-patch: .SILENT + ${REINPLACE_CMD} -e '/LIBS/{ s/-ldl//; \ + s/-lrt//; s/-lpthread/${PTHREAD_LIBS}/; }' \ + -e 's|driverdir|& --define-variable prefix=${PREFIX}|' \ + ${WRKSRC}/configure + +.include Added: head/multimedia/libva-intel-driver/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/libva-intel-driver/distinfo Thu Oct 25 21:06:38 2012 (r306398) @@ -0,0 +1,2 @@ +SHA256 (libva-intel-driver-1.0.18.tar.bz2) = 789fa2d6e22b9028ce12a89981eb33e57b04301431415149acfb61a49d3a63ee +SIZE (libva-intel-driver-1.0.18.tar.bz2) = 581497 Added: head/multimedia/libva-intel-driver/files/patch-drm_state_upstream ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/libva-intel-driver/files/patch-drm_state_upstream Thu Oct 25 21:06:38 2012 (r306398) @@ -0,0 +1,68 @@ +From 73ccb0c88d53298befa6a896d2bb39a041169b36 Mon Sep 17 00:00:00 2001 +From: Gwenole Beauchesne +Date: Fri, 06 Apr 2012 15:24:36 +0000 +Subject: dri: cope with drm_state changes. + +Signed-off-by: Gwenole Beauchesne +--- +diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c +index 3bea253..20fed99 100644 +--- src/i965_drv_video.c ++++ src/i965_drv_video.c +@@ -2380,7 +2380,7 @@ i965_PutSurface(VADriverContextP ctx, + unsigned int flags) /* de-interlacing flags */ + { + struct i965_driver_data *i965 = i965_driver_data(ctx); +- struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; ++ struct dri_state *dri_state = (struct dri_state *)ctx->drm_state; + struct i965_render_state *render_state = &i965->render_state; + struct dri_drawable *dri_drawable; + union dri_buffer *buffer; +@@ -2393,7 +2393,7 @@ i965_PutSurface(VADriverContextP ctx, + int pp_flag = 0; + + /* Currently don't support DRI1 */ +- if (dri_state->driConnectedFlag != VA_DRI2) ++ if (dri_state->base.auth_type != VA_DRM_AUTH_DRI2) + return VA_STATUS_ERROR_UNKNOWN; + + /* Some broken sources such as H.264 conformance case FM2_SVA_C +diff --git a/src/intel_driver.c b/src/intel_driver.c +index 4e6df81..b34d9a1 100644 +--- src/intel_driver.c ++++ src/intel_driver.c +@@ -29,7 +29,7 @@ + + #include + +-#include ++#include + + #include "intel_batchbuffer.h" + #include "intel_memman.h" +@@ -50,15 +50,17 @@ Bool + intel_driver_init(VADriverContextP ctx) + { + struct intel_driver_data *intel = intel_driver_data(ctx); +- struct dri_state *dri_state = (struct dri_state *)ctx->dri_state; ++ struct drm_state * const drm_state = (struct drm_state *)ctx->drm_state; + int has_exec2, has_bsd, has_blt; + +- assert(dri_state); +- assert(dri_state->driConnectedFlag == VA_DRI2 || +- dri_state->driConnectedFlag == VA_DRI1); ++ assert(drm_state); ++ assert(drm_state->auth_type == VA_DRM_AUTH_DRI1 || ++ drm_state->auth_type == VA_DRM_AUTH_DRI2 || ++ drm_state->auth_type == VA_DRM_AUTH_CUSTOM); + +- intel->fd = dri_state->fd; +- intel->dri2Enabled = (dri_state->driConnectedFlag == VA_DRI2); ++ intel->fd = drm_state->fd; ++ intel->dri2Enabled = (drm_state->auth_type == VA_DRM_AUTH_DRI2 || ++ drm_state->auth_type == VA_DRM_AUTH_CUSTOM); + + if (!intel->dri2Enabled) { + return False; +-- +cgit v0.9.0.2-2-gbebe Added: head/multimedia/libva-intel-driver/files/patch-src-i965_decoder_utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/libva-intel-driver/files/patch-src-i965_decoder_utils.c Thu Oct 25 21:06:38 2012 (r306398) @@ -0,0 +1,14 @@ +--- src/i965_decoder_utils.c.orig 2012-08-14 17:08:16.000000000 +0200 ++++ src/i965_decoder_utils.c 2012-10-10 17:25:22.358503055 +0200 +@@ -24,7 +24,11 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#else + #include ++#endif + #include "intel_batchbuffer.h" + #include "i965_decoder_utils.h" + #include "i965_drv_video.h" Added: head/multimedia/libva-intel-driver/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/libva-intel-driver/pkg-descr Thu Oct 25 21:06:38 2012 (r306398) @@ -0,0 +1,4 @@ +Libva driver for intel graphics cards with hardware accelerated +features for video encode/decode. + +WWW: http://cgit.freedesktop.org/vaapi/intel-driver