forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
va: jz4780: Add Ingenic video acceleration support
Change-Id: I00443f0a0f4d616623942619b0e92f8402c5f577 Signed-off-by: Dragan Cecavac <dragan.cecavac@imgtec.com>
- Loading branch information
Showing
36 changed files
with
10,211 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright (C) 2005 Mips Technologies | ||
* Author: Chris Dearman, chris@mips.com derived from fpu.h | ||
* | ||
* This program 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. | ||
*/ | ||
#ifndef _ASM_MXU_H | ||
#define _ASM_MXU_H | ||
|
||
#include <asm/cpu.h> | ||
#include <asm/cpu-features.h> | ||
#include <asm/hazards.h> | ||
#include <asm/mipsregs.h> | ||
#include <asm/mxu_media.h> | ||
|
||
static inline void __init_mxu(void) | ||
{ | ||
register unsigned int val asm("t0"); | ||
val = 3; | ||
asm volatile(".word 0x7008042f \n\t"::"r"(val)); | ||
} | ||
|
||
void __save_mxu(void *); | ||
void __restore_mxu(void * tsk_void); | ||
|
||
static inline void init_mxu(void) | ||
{ | ||
if(cpu_has_mxu) | ||
__init_mxu(); | ||
} | ||
|
||
|
||
#define save_mxu(tsk) \ | ||
do { \ | ||
if (cpu_has_mxu) \ | ||
__save_mxu(tsk); \ | ||
} while (0) | ||
|
||
#define restore_mxu(tsk) \ | ||
do { \ | ||
if (cpu_has_mxu) \ | ||
__restore_mxu(tsk); \ | ||
} while (0) | ||
|
||
#define __get_mxu_regs(tsk) \ | ||
({ \ | ||
if (tsk == current) \ | ||
__save_mxu(current); \ | ||
\ | ||
tsk->thread.mxu.regs; \ | ||
}) | ||
|
||
#define __let_mxu_regs(tsk,regs) \ | ||
do{ \ | ||
int i; \ | ||
for(i = 0; i < NUM_MXU_REGS;i++) \ | ||
tsk->thread.mxu.regs[i] = regs[i]; \ | ||
if (tsk == current) \ | ||
__save_mxu(current); \ | ||
}while(0) | ||
|
||
#endif /* _ASM_MXU_H */ |
Oops, something went wrong.