type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines |
#define D2NET_SWITCH_POWER_ON 0x1 |
defines | #define D2NET_SWITCH_POWER_OFF 0x2 |
defines |
#define D2NET_GPIO_INHIBIT_POWER_OFF 24 |
functions | __init d2net_sata_power_init(void)
{
int err;
err = gpio_request(D2NET_GPIO_SATA0_POWER, "SATA0 power");
if (err == 0) {
err = gpio_direction_output(D2NET_GPIO_SATA0_POWER, 1);
if (err)
gpio_free(D2NET_GPIO_SATA0_POWER);
} |
functions | __init d2net_gpio_leds_init(void)
{
int err;
/* Configure GPIO over MPP max number. */
orion_gpio_set_valid(D2NET_GPIO_BLUE_LED_OFF, 1);
/* Configure register blink_ctrl to allow SATA activity LED blinking. */
err = gpio_request(D2NET_GPIO_BLUE_LED_BLINK_CTRL, "blue LED blink");
if (err == 0) {
err = gpio_dir... |
functions | __init d2net_init(void)
{
/*
* Setup basic Orion functions. Need to be called early.
*/
orion5x_init();
orion5x_mpp_conf(d2net_mpp_modes);
/*
* Configure peripherals.
*/
orion5x_ehci0_init();
orion5x_eth_init(&d2net_eth_data);
orion5x_i2c_init();
orion5x_uart0_init();
d2net_sata_power_init();
orion... |
includes | #include <drm/ttm/ttm_bo_driver.h> |
includes | #include <drm/ttm/ttm_placement.h> |
includes | #include <drm/ttm/ttm_page_alloc.h> |
structs | struct vmw_ttm_tt {
struct ttm_dma_tt dma_ttm;
struct vmw_private *dev_priv;
int gmr_id;
struct vmw_mob *mob;
int mem_type;
struct sg_table sgt;
struct vmw_sg_table vsgt;
uint64_t sg_alloc_size;
bool mapped;
}; |
functions | bool __vmw_piter_non_sg_next(struct vmw_piter *viter)
{
return ++(viter->i) < viter->num_pages;
} |
functions | bool __vmw_piter_sg_next(struct vmw_piter *viter)
{
return __sg_page_iter_next(&viter->iter);
} |
functions | dma_addr_t __vmw_piter_phys_addr(struct vmw_piter *viter)
{
return page_to_phys(viter->pages[viter->i]);
} |
functions | dma_addr_t __vmw_piter_dma_addr(struct vmw_piter *viter)
{
return viter->addrs[viter->i];
} |
functions | dma_addr_t __vmw_piter_sg_addr(struct vmw_piter *viter)
{
return sg_page_iter_dma_address(&viter->iter);
} |
functions | void vmw_piter_start(struct vmw_piter *viter, const struct vmw_sg_table *vsgt,
unsigned long p_offset)
{
viter->i = p_offset - 1;
viter->num_pages = vsgt->num_pages;
switch (vsgt->mode) {
case vmw_dma_phys:
viter->next = &__vmw_piter_non_sg_next;
viter->dma_address = &__vmw_piter_phys_addr;
viter->page... |
functions | void vmw_ttm_unmap_from_dma(struct vmw_ttm_tt *vmw_tt)
{
struct device *dev = vmw_tt->dev_priv->dev->dev;
dma_unmap_sg(dev, vmw_tt->sgt.sgl, vmw_tt->sgt.nents,
DMA_BIDIRECTIONAL);
vmw_tt->sgt.nents = vmw_tt->sgt.orig_nents;
} |
functions | int vmw_ttm_map_for_dma(struct vmw_ttm_tt *vmw_tt)
{
struct device *dev = vmw_tt->dev_priv->dev->dev;
int ret;
ret = dma_map_sg(dev, vmw_tt->sgt.sgl, vmw_tt->sgt.orig_nents,
DMA_BIDIRECTIONAL);
if (unlikely(ret == 0))
return -ENOMEM;
vmw_tt->sgt.nents = ret;
return 0;
} |
functions | int vmw_ttm_map_dma(struct vmw_ttm_tt *vmw_tt)
{
struct vmw_private *dev_priv = vmw_tt->dev_priv;
struct ttm_mem_global *glob = vmw_mem_glob(dev_priv);
struct vmw_sg_table *vsgt = &vmw_tt->vsgt;
struct vmw_piter iter;
dma_addr_t old;
int ret = 0;
static size_t sgl_size;
static size_t sgt_size;
if (vmw_tt->map... |
functions | void vmw_ttm_unmap_dma(struct vmw_ttm_tt *vmw_tt)
{
struct vmw_private *dev_priv = vmw_tt->dev_priv;
if (!vmw_tt->vsgt.sgt)
return;
switch (dev_priv->map_mode) {
case vmw_dma_map_bind:
case vmw_dma_map_populate:
vmw_ttm_unmap_from_dma(vmw_tt);
sg_free_table(vmw_tt->vsgt.sgt);
vmw_tt->vsgt.sgt = NULL;
t... |
functions | int vmw_bo_map_dma(struct ttm_buffer_object *bo)
{
struct vmw_ttm_tt *vmw_tt =
container_of(bo->ttm, struct vmw_ttm_tt, dma_ttm.ttm);
return vmw_ttm_map_dma(vmw_tt);
} |
functions | void vmw_bo_unmap_dma(struct ttm_buffer_object *bo)
{
struct vmw_ttm_tt *vmw_tt =
container_of(bo->ttm, struct vmw_ttm_tt, dma_ttm.ttm);
vmw_ttm_unmap_dma(vmw_tt);
} |
functions | int vmw_ttm_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem)
{
struct vmw_ttm_tt *vmw_be =
container_of(ttm, struct vmw_ttm_tt, dma_ttm.ttm);
int ret;
ret = vmw_ttm_map_dma(vmw_be);
if (unlikely(ret != 0))
return ret;
vmw_be->gmr_id = bo_mem->start;
vmw_be->mem_type = bo_mem->mem_type;
switch (bo_mem-... |
functions | int vmw_ttm_unbind(struct ttm_tt *ttm)
{
struct vmw_ttm_tt *vmw_be =
container_of(ttm, struct vmw_ttm_tt, dma_ttm.ttm);
switch (vmw_be->mem_type) {
case VMW_PL_GMR:
vmw_gmr_unbind(vmw_be->dev_priv, vmw_be->gmr_id);
break;
case VMW_PL_MOB:
vmw_mob_unbind(vmw_be->dev_priv, vmw_be->mob);
break;
default:
... |
functions | void vmw_ttm_destroy(struct ttm_tt *ttm)
{
struct vmw_ttm_tt *vmw_be =
container_of(ttm, struct vmw_ttm_tt, dma_ttm.ttm);
vmw_ttm_unmap_dma(vmw_be);
if (vmw_be->dev_priv->map_mode == vmw_dma_alloc_coherent)
ttm_dma_tt_fini(&vmw_be->dma_ttm);
else
ttm_tt_fini(ttm);
if (vmw_be->mob)
vmw_mob_destroy(vmw_be-... |
functions | int vmw_ttm_populate(struct ttm_tt *ttm)
{
struct vmw_ttm_tt *vmw_tt =
container_of(ttm, struct vmw_ttm_tt, dma_ttm.ttm);
struct vmw_private *dev_priv = vmw_tt->dev_priv;
struct ttm_mem_global *glob = vmw_mem_glob(dev_priv);
int ret;
if (ttm->state != tt_unpopulated)
return 0;
if (dev_priv->map_mode == vmw_... |
functions | void vmw_ttm_unpopulate(struct ttm_tt *ttm)
{
struct vmw_ttm_tt *vmw_tt = container_of(ttm, struct vmw_ttm_tt,
dma_ttm.ttm);
struct vmw_private *dev_priv = vmw_tt->dev_priv;
struct ttm_mem_global *glob = vmw_mem_glob(dev_priv);
if (vmw_tt->mob) {
vmw_mob_destroy(vmw_tt->mob);
vmw_tt->mob = NULL;
} |
functions | int vmw_invalidate_caches(struct ttm_bo_device *bdev, uint32_t flags)
{
return 0;
} |
functions | int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
struct ttm_mem_type_manager *man)
{
switch (type) {
case TTM_PL_SYSTEM:
/* System memory */
man->flags = TTM_MEMTYPE_FLAG_MAPPABLE;
man->available_caching = TTM_PL_FLAG_CACHED;
man->default_caching = TTM_PL_FLAG_CACHED;
break;
case T... |
functions | void vmw_evict_flags(struct ttm_buffer_object *bo,
struct ttm_placement *placement)
{
*placement = vmw_sys_placement;
} |
functions | int vmw_verify_access(struct ttm_buffer_object *bo, struct file *filp)
{
struct ttm_object_file *tfile =
vmw_fpriv((struct drm_file *)filp->private_data)->tfile;
return vmw_user_dmabuf_verify_access(bo, tfile);
} |
functions | int vmw_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
{
struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type];
struct vmw_private *dev_priv = container_of(bdev, struct vmw_private, bdev);
mem->bus.addr = NULL;
mem->bus.is_iomem = false;
mem->bus.offset = 0;
mem->bus.size = mem->n... |
functions | void vmw_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
{
} |
functions | int vmw_ttm_fault_reserve_notify(struct ttm_buffer_object *bo)
{
return 0;
} |
functions | void vmw_move_notify(struct ttm_buffer_object *bo,
struct ttm_mem_reg *mem)
{
vmw_resource_move_notify(bo, mem);
} |
functions | void vmw_swap_notify(struct ttm_buffer_object *bo)
{
ttm_bo_wait(bo, false, false, false);
} |
includes | #include <stdio.h> |
defines |
#define MAXLEN MAX_STRING_LENGTH |
defines |
#define TABLE_SIZE 256 |
defines |
#define RETURN_IF_BAD_ERRCODE(x) \ |
defines |
#define STRING_TEST_CASE(s) { (s), UPRV_LENGTHOF(s) } |
defines |
#define STRING_TEST_CASE(s) { (s), UPRV_LENGTHOF(s) } |
defines |
#define COUNT_REPEAT_SEGMENTS 6 |
defines |
#define MAKE_ITEMS(val) val, #val |
defines |
#define TC_COUNT UPRV_LENGTHOF(textIn) |
defines | #define MODES_COUNT UPRV_LENGTHOF(modes) |
defines | #define OPTIONS_COUNT UPRV_LENGTHOF(options) |
defines | #define LEVELS_COUNT UPRV_LENGTHOF(paraLevels) |
defines |
#define NO UBIDI_MAP_NOWHERE |
defines | #define MAX_MAP_LENGTH 20 |
defines |
#define SET_ROUND_TRIP_MODE(mode) \ |
defines |
#define NULL_CHAR '\0' |
defines | #define MAXPORTIONS 10 |
defines |
#define DEF U_BIDI_CLASS_DEFAULT |
defines | #define CONTEXT_COUNT UPRV_LENGTHOF(contextData) |
functions | void
addComplexTest(TestNode** root) {
addTest(root, testCharFromDirProp, "complex/bidi/TestCharFromDirProp");
addTest(root, testBidi, "complex/bidi/TestBidi");
addTest(root, testInverse, "complex/bidi/TestInverse");
addTest(root, testReorder,"complex/bidi/TestReorder");
addTest(root, testFailureRec... |
functions | void
testCharFromDirProp(void) {
/* verify that the exemplar characters have the expected bidi classes */
int32_t i;
log_verbose("\nEntering TestCharFromDirProp\n\n");
initCharFromDirProps();
for(i=0; i<U_CHAR_DIRECTION_COUNT; ++i) {
if(u_charDirection(charFromDirProp[i])!=(UCharDirection)... |
functions | void
testBidi(void) {
UBiDi *pBiDi, *pLine=NULL;
UErrorCode errorCode=U_ZERO_ERROR;
log_verbose("\nEntering TestBidi\n\n");
pBiDi=ubidi_openSized(MAXLEN, 0, &errorCode);
if(pBiDi!=NULL) {
pLine=ubidi_open();
if(pLine!=NULL) {
doTests(pBiDi, pLine, FALSE);
do... |
functions | void
doTests(UBiDi *pBiDi, UBiDi *pLine, UBool countRunsFirst) {
int testNumber;
UChar string[MAXLEN];
UErrorCode errorCode;
int32_t lineStart;
UBiDiLevel paraLevel;
for(testNumber=0; testNumber<bidiTestCount; ++testNumber) {
errorCode=U_ZERO_ERROR;
getStringFromDirProps(tests[t... |
functions | UBool matchingPair(UBiDi *bidi, int32_t i, char c1, char c2)
{
/* No test for []{} |
functions | void
testReorder(void) {
static const char* const logicalOrder[] ={
"del(KC)add(K.C.&)",
"del(QDVT) add(BVDL)",
"del(PQ)add(R.S.)T)U.&",
"del(LV)add(L.V.) L.V.&",
"day 0 R DPDHRVR dayabbr",
"day 1 H DPHPDHDA dayabbr",
"day 2 ... |
functions | else if(destSize!=srcSize){
log_err("Pre-flighting did not give expected size: Expected: %d. Got: %d \n",srcSize,destSize);
} |
functions | else if(destSize!=srcSize){
log_err("Pre-flighting did not give expected size: Expected: %d. Got: %d \n",srcSize,destSize);
} |
functions | else if(destSize!=srcSize){
log_err("Pre-flighting did not give expected size: Expected: %d. Got: %d \n",srcSize,destSize);
} |
functions | void
testReorderArabicMathSymbols(void) {
static const UChar logicalOrder[][MAXLEN]={
/* Arabic mathematical Symbols 0x1EE00 - 0x1EE1B */
{0xD83B, 0xDE00, 0xD83B, 0xDE01, 0xD83B, 0xDE02, 0xD83B, 0xDE03, 0x20,
0xD83B, 0xDE24, 0xD83B, 0xDE05, 0xD83B, 0xDE06, 0x20,
0xD83B, 0xDE07, 0xD83... |
functions | else if(destSize!=srcSize){
log_err("Pre-flighting did not give expected size: Expected: %d. Got: %d \n",srcSize,destSize);
} |
functions | void
doTest(UBiDi *pBiDi, int testNumber, const BiDiTestData *test, int32_t lineStart, UBool countRunsFirst) {
const uint8_t *dirProps=test->text+lineStart;
const UBiDiLevel *levels=test->levels;
const uint8_t *visualMap=test->visualMap;
int32_t i, len=ubidi_getLength(pBiDi), logicalIndex, runCount = 0;... |
functions | void
_testReordering(UBiDi *pBiDi, int testNumber) {
int32_t
logicalMap1[MAXLEN], logicalMap2[MAXLEN], logicalMap3[MAXLEN],
visualMap1[MAXLEN], visualMap2[MAXLEN], visualMap3[MAXLEN], visualMap4[MAXLEN];
UErrorCode errorCode=U_ZERO_ERROR;
const UBiDiLevel *levels;
int32_t i, length=ubidi... |
functions | void testGetBaseDirection(void) {
UBiDiDirection dir;
int i;
/* Test Data */
static const UChar
/*Mixed Start with L*/
stringMixedEnglishFirst[]={ 0x61, 0x627, 0x32, 0x6f3, 0x61, 0x34, 0 } |
functions | void doMisc(void) {
/* Miscellaneous tests to exercize less popular code paths */
UBiDi *bidi, *bidiLine;
UChar src[MAXLEN], dest[MAXLEN];
int32_t srcLen, destLen, runCount, i;
UBiDiLevel level;
UBiDiDirection dir;
int32_t map[MAXLEN];
UErrorCode errorCode=U_ZERO_ERROR;
static const int3... |
functions | void
testFailureRecovery(void) {
UErrorCode errorCode;
UBiDi *bidi, *bidiLine;
UChar src[MAXLEN];
int32_t srcLen;
UBiDiLevel level;
UBiDiReorderingMode rm;
static UBiDiLevel myLevels[3] = {6,5,4} |
functions | void
testMultipleParagraphs(void) {
static const char* const text = "__ABC\\u001c" /* Para #0 offset 0 */
"__\\u05d0DE\\u001c" /* 1 6 */
"__123\\u001c" /* 2 12 */
... |
functions | void
testInverse(void) {
static const UChar
string0[]={ 0x6c, 0x61, 0x28, 0x74, 0x69, 0x6e, 0x20, 0x5d0, 0x5d1, 0x29, 0x5d2, 0x5d3 } |
functions | void
_testManyInverseBidi(UBiDi *pBiDi, UBiDiLevel direction) {
UChar text[8]={ 0, 0, 0x20, 0, 0, 0x20, 0, 0 } |
functions | void
_testInverseBidi(UBiDi *pBiDi, const UChar *src, int32_t srcLength,
UBiDiLevel direction, UErrorCode *pErrorCode) {
UChar visualLTR[MAXLEN], logicalDest[MAXLEN], visualDest[MAXLEN];
int32_t ltrLength, logicalLength, visualLength;
if(direction==0) {
log_verbose("inverse Bidi: te... |
functions | void
_testWriteReverse(void) {
/* U+064e and U+0650 are combining marks (Mn) */
static const UChar forward[]={
0x200f, 0x627, 0x64e, 0x650, 0x20, 0x28, 0x31, 0x29
} |
functions | void _testManyAddedPoints(void) {
UErrorCode errorCode = U_ZERO_ERROR;
UBiDi *bidi = ubidi_open();
UChar text[90], dest[MAXLEN], expected[120];
int destLen, i;
for (i = 0; i < UPRV_LENGTHOF(text); i+=3) {
text[i] = 0x0061; /* 'a' */
text[i+1] = 0x05d0;
text[i+2] = 0x0033; /* ... |
functions | void _testMisc(void) {
UErrorCode errorCode = U_ZERO_ERROR;
UBiDi *bidi = ubidi_open();
UChar src[3], dest[MAXLEN], expected[5];
int destLen;
ubidi_setInverse(bidi, TRUE);
src[0] = src[1] = src[2] = 0x0020;
ubidi_setPara(bidi, src, UPRV_LENGTHOF(src), UBIDI_RTL, NULL, &errorCode);
destLe... |
functions | void
doArabicShapingTest(void) {
static const UChar
source[]={
0x31, /* en:1 */
0x627, /* arabic:alef */
0x32, /* en:2 */
0x6f3, /* an:3 */
0x61, /* latin:a */
0x34, /* en:4 */
0
} |
functions | void
doLamAlefSpecialVLTRArabicShapingTest(void) {
static const UChar
source[]={
/*a*/ 0x20 ,0x646,0x622,0x644,0x627,0x20,
/*b*/ 0x646,0x623,0x64E,0x644,0x627,0x20,
/*c*/ 0x646,0x627,0x670,0x644,0x627,0x20,
/*d*/ 0x646,0x622,0x653,0x644,0x627,0x20,
/*e*/ 0x646,0x625,0x655,0x644,0x627,0x20,
/*f*/ 0x6... |
functions | void
doTashkeelSpecialVLTRArabicShapingTest(void) {
static const UChar
source[]={
0x64A,0x628,0x631,0x639,0x20,
0x64A,0x628,0x651,0x631,0x64E,0x639,0x20,
0x64C,0x64A,0x628,0x631,0x64F,0x639,0x20,
0x628,0x670,0x631,0x670,0x639,0x20,
0x628,0x653,0x631,0x653,0x639,0x20,
... |
functions | void
doLOGICALArabicDeShapingTest(void) {
static const UChar
source[]={
0x0020,0x0020,0x0020,0xFE8D,0xFEF5,0x0020,0xFEE5,0x0020,0xFE8D,0xFEF7,0x0020,
0xFED7,0xFEFC,0x0020,0xFEE1,0x0020,0xFE8D,0xFEDF,0xFECC,0xFEAE,0xFE91,0xFEF4,
0xFE94,0x0020,0xFE8D,0xFEDF,0xFEA4,0xFEAE,0xFE93,0x0020,0x00... |
functions | void
doTailTest(void) {
static const UChar src[] = { 0x0020, 0x0633, 0 } |
functions | else if(length!=2) {
log_err("Fail: len %d expected 3\n", length);
} |
functions | else if(length!=2) {
log_err("Fail: len %d expected 3\n", length);
} |
functions | void
doArabicShapingTestForBug5421(void) {
static const UChar
persian_letters_source[]={
0x0020, 0x0698, 0x067E, 0x0686, 0x06AF, 0x0020
} |
functions | void
doArabicShapingTestForBug8703(void) {
static const UChar
letters_source1[]={
0x0634,0x0651,0x0645,0x0652,0x0633
} |
functions | void
doArabicShapingTestForBug9024(void) {
static const UChar
letters_source1[]={ /* Arabic mathematical Symbols 0x1EE00 - 0x1EE1B */
0xD83B, 0xDE00, 0xD83B, 0xDE01, 0xD83B, 0xDE02, 0xD83B, 0xDE03, 0x20,
0xD83B, 0xDE24, 0xD83B, 0xDE05, 0xD83B, 0xDE06, 0x20,
0xD83B, 0xDE07, 0xD83B, 0xDE0... |
functions | void _testPresentationForms(const UChar* in) {
enum Forms { GENERIC, ISOLATED, FINAL, INITIAL, MEDIAL } |
functions | void
doArabicShapingTestForNewCharacters(void) {
static const UChar letterForms[][5]={
{ 0x0679, 0xFB66, 0xFB67, 0xFB68, 0xFB69 } |
functions | void initCharFromDirProps(void) {
static const UVersionInfo ucd401={ 4, 0, 1, 0 } |
functions | void printUnicode(const UChar *s, int32_t length, const UBiDiLevel *levels) {
int32_t i;
log_verbose("{ ");
for(i=0; i<length; ++i) {
if(levels!=NULL) {
log_verbose("%4x.%u ", s[i], levels[i]);
} |
functions | UBool
assertSuccessful(const char* message, UErrorCode* rc) {
if (rc != NULL && U_FAILURE(*rc)) {
log_err("%s() failed with error %s.\n", message, myErrorName(*rc));
return FALSE;
} |
functions | UBool
assertStringsEqual(const char* expected, const char* actual, const char* src,
const char* mode, const char* option, UBiDi* pBiDi) {
if (uprv_strcmp(expected, actual)) {
char formatChars[MAXLEN];
log_err("\nActual and expected output mismatch.\n"
"%20s %s\n%20s %s... |
functions | UBool
assertRoundTrip(UBiDi *pBiDi, int32_t tc, int32_t outIndex, const char *srcChars,
const char *destChars, const UChar *dest, int32_t destLen,
int mode, int option, UBiDiLevel level) {
static const char roundtrip[TC_COUNT][MODES_COUNT][OPTIONS_COUNT]
[LEVELS_COUN... |
functions | UBool
checkResultLength(UBiDi *pBiDi, const char *srcChars, const char *destChars,
int32_t destLen, const char* mode,
const char* option, UBiDiLevel level) {
int32_t actualLen;
if (strcmp(mode, "UBIDI_REORDER_INVERSE_NUMBERS_AS_L") == 0)
actualLen = strlen(destChars);... |
functions | void
testReorderRunsOnly(void) {
static const struct {
const char* textIn;
const char* textOut[2][2];
const char noroundtrip[2];
} |
functions | void
testReorderingMode(void) {
UChar src[MAXLEN], dest[MAXLEN];
char destChars[MAXLEN];
UBiDi *pBiDi = NULL, *pBiDi2 = NULL, *pBiDi3 = NULL;
UErrorCode rc;
int tc, mode, option, level;
uint32_t optionValue, optionBack;
UBiDiReorderingMode modeValue, modeBack;
int32_t srcLen, destLen, i... |
functions | void
testStreaming(void) {
static const struct {
const char* textIn;
short int chunk;
short int nPortions[2];
char portionLens[2][MAXPORTIONS];
const char* message[2];
} |
functions | U_CALLCONV
overrideBidiClass(const void *context, UChar32 c) {
static const UCharDirection customClasses[] = {
/* 0/8 1/9 2/A 3/B 4/C 5/D 6/E 7/F */
DEF, DEF, DEF, DEF, DEF, DEF, DEF, DEF, /* 00-07 */
DEF, DEF, DEF, DEF, DEF, DEF, DEF, D... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.