Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.11 support #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
== How to build me ==
How to build me
================

Required kernel config options

* CONFIG_TRIM_UNUSED_KSYMS = N

Assuming you have your kernel build environment in KERNEL_ARGS (i.e. ARCH=arm CROSS_COMPILE=...).
Assuming you have your kernel source tree in KERNEL_SRC.
To build, use:
> ${KERNEL_ARGS} make M=$PWD -C ${KERNEL_SRC} CONFIG_MALI_MIDGARD=m CONFIG_MALI_DEVFREQ=y CONFIG_MALI_DMA_FENCE=y CONFIG_MALI_EXPERT=y CONFIG_MALI_PLATFORM_THIRDPARTY=y CONFIG_MALI_PLATFORM_THIRDPARTY_NAME=rk


This will generate rockchip-vpu.ko, mali_kbase.ko and vtl_ts_ct_ct36x.ko.
You'll need additional DT modifications to enable those feature, see below.

== VPU (h264 decode) ==
VPU (h264 decode)
=================

To get rockchip VPU working on a mainline kernel, you'll need to change your DTS.
Include:
Expand Down Expand Up @@ -44,7 +51,8 @@ Finally, install rockchip VPU userland, you can choose either:

At the moment the most stable driver is VAAPI, which can be tested with VLC.

== GPU (Mali, 3D Acceleration) ==
GPU (Mali, 3D Acceleration)
===========================

You'll need to change your DTS here as well:

Expand Down
1 change: 1 addition & 0 deletions midgard/mali_kbase_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <linux/kernel.h>
#include <linux/bug.h>
#include <linux/compat.h>
#include <linux/sched/mm.h>

#include <mali_kbase_config.h>
#include <mali_kbase.h>
Expand Down
8 changes: 4 additions & 4 deletions midgard/mali_kbase_mem_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1844,9 +1844,9 @@ static void kbase_cpu_vm_close(struct vm_area_struct *vma)
KBASE_EXPORT_TEST_API(kbase_cpu_vm_close);


static int kbase_cpu_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
static int kbase_cpu_vm_fault(struct vm_fault *vmf)
{
struct kbase_cpu_mapping *map = vma->vm_private_data;
struct kbase_cpu_mapping *map = vmf->vma->vm_private_data;
pgoff_t rel_pgoff;
size_t i;

Expand All @@ -1870,9 +1870,9 @@ static int kbase_cpu_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)

/* insert all valid pages from the fault location */
for (i = rel_pgoff;
i < MIN((vma->vm_end - vma->vm_start) >> PAGE_SHIFT,
i < MIN((vmf->vma->vm_end - vmf->vma->vm_start) >> PAGE_SHIFT,
map->alloc->nents - map->page_off); i++) {
int ret = vm_insert_pfn(vma, map->vm_start + (i << PAGE_SHIFT),
int ret = vm_insert_pfn(vmf->vma, map->vm_start + (i << PAGE_SHIFT),
PFN_DOWN(map->alloc->pages[map->page_off + i]));
if (ret < 0 && ret != -EBUSY)
goto locked_bad_fault;
Expand Down