mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
rkmpp: new package
This commit is contained in:
parent
37e37111c4
commit
ecf5a3d80e
48
packages/multimedia/rkmpp/package.mk
Normal file
48
packages/multimedia/rkmpp/package.mk
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
################################################################################
|
||||||
|
# This file is part of LibreELEC - https://libreelec.tv
|
||||||
|
# Copyright (C) 2017-present Team LibreELEC
|
||||||
|
#
|
||||||
|
# LibreELEC is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# LibreELEC is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
PKG_NAME="rkmpp"
|
||||||
|
PKG_VERSION="60cbbff"
|
||||||
|
PKG_SHA256="fa442a006c5ddf395649ea0ed088851ecf1e15c254f03fd99e84164590b40b4f"
|
||||||
|
PKG_ARCH="arm aarch64"
|
||||||
|
PKG_LICENSE="APL"
|
||||||
|
PKG_SITE="https://github.com/rockchip-linux/mpp"
|
||||||
|
PKG_URL="https://github.com/rockchip-linux/mpp/archive/$PKG_VERSION.tar.gz"
|
||||||
|
PKG_SOURCE_DIR="mpp-$PKG_VERSION*"
|
||||||
|
PKG_DEPENDS_TARGET="toolchain libdrm"
|
||||||
|
PKG_SECTION="multimedia"
|
||||||
|
PKG_SHORTDESC="rkmpp: Rockchip Media Process Platform (MPP) module"
|
||||||
|
PKG_LONGDESC="rkmpp: Rockchip Media Process Platform (MPP) module"
|
||||||
|
|
||||||
|
if [ "$UBOOT_SYSTEM" = "rk3328" -o "$UBOOT_SYSTEM" = "rk3399" ]; then
|
||||||
|
PKG_ENABLE_VP9D="ON"
|
||||||
|
else
|
||||||
|
PKG_ENABLE_VP9D="OFF"
|
||||||
|
fi
|
||||||
|
|
||||||
|
PKG_CMAKE_OPTS_TARGET="-DRKPLATFORM=ON \
|
||||||
|
-DENABLE_AVSD=OFF \
|
||||||
|
-DENABLE_H263D=OFF \
|
||||||
|
-DENABLE_H264D=ON \
|
||||||
|
-DENABLE_H265D=ON \
|
||||||
|
-DENABLE_MPEG2D=ON \
|
||||||
|
-DENABLE_MPEG4D=ON \
|
||||||
|
-DENABLE_VP8D=ON \
|
||||||
|
-DENABLE_VP9D=$PKG_ENABLE_VP9D \
|
||||||
|
-DENABLE_JPEGD=OFF \
|
||||||
|
-DHAVE_DRM=ON"
|
@ -0,0 +1,39 @@
|
|||||||
|
From 376fb9c7c24c3b8a322cd583839d582cd7041d47 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
|
||||||
|
Date: Mon, 29 May 2017 14:08:43 +0200
|
||||||
|
Subject: [PATCH] [drm] fix 32-bit mmap issue on 64-bit kernels
|
||||||
|
|
||||||
|
Running 32-bit userland on a 64-bit kernel resulted in the error:
|
||||||
|
|
||||||
|
mpp_drm: mmap failed: Invalid argument
|
||||||
|
|
||||||
|
Both the pagesize_mask and the mmap call truncated the offset
|
||||||
|
value to 32 bit. This patch fixes both issues.
|
||||||
|
|
||||||
|
For details see https://github.com/rockchip-linux/kernel/issues/17
|
||||||
|
---
|
||||||
|
osal/allocator/allocator_drm.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/osal/allocator/allocator_drm.c b/osal/allocator/allocator_drm.c
|
||||||
|
index 3057671f..9a4e31fe 100644
|
||||||
|
--- a/osal/allocator/allocator_drm.c
|
||||||
|
+++ b/osal/allocator/allocator_drm.c
|
||||||
|
@@ -15,6 +15,8 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MODULE_TAG "mpp_drm"
|
||||||
|
+/* Enable 64-bit mmap also when compiling for 32 bit */
|
||||||
|
+#define _FILE_OFFSET_BITS 64
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
@@ -67,7 +69,7 @@ static int drm_ioctl(int fd, int req, void *arg)
|
||||||
|
|
||||||
|
static void* drm_mmap(int fd, size_t len, int prot, int flags, loff_t offset)
|
||||||
|
{
|
||||||
|
- static unsigned long pagesize_mask = 0;
|
||||||
|
+ static loff_t pagesize_mask = 0;
|
||||||
|
#if !defined(__gnu_linux__)
|
||||||
|
func_mmap64 fp_mmap64 = mpp_rt_get_mmap64();
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user