Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Libcedrus
Commits
e129e793
Commit
e129e793
authored
Feb 29, 2016
by
Jens Kuske
Browse files
Support new 3.10 ION flush cache ioctl variant
parent
e458191f
Changes
1
Hide whitespace changes
Inline
Side-by-side
cedrus_mem_ion.c
View file @
e129e793
...
@@ -88,6 +88,8 @@ static uint32_t ion_get_phys_addr(int ion_fd, ion_user_handle_t ion_handle)
...
@@ -88,6 +88,8 @@ static uint32_t ion_get_phys_addr(int ion_fd, ion_user_handle_t ion_handle)
static
int
ion_flush_cache
(
int
ion_fd
,
void
*
addr
,
size_t
size
)
static
int
ion_flush_cache
(
int
ion_fd
,
void
*
addr
,
size_t
size
)
{
{
static
int
new_ioctl
=
0
;
sunxi_cache_range
cache_range
=
{
sunxi_cache_range
cache_range
=
{
.
start
=
(
long
)
addr
,
.
start
=
(
long
)
addr
,
.
end
=
(
long
)
addr
+
size
,
.
end
=
(
long
)
addr
+
size
,
...
@@ -98,8 +100,13 @@ static int ion_flush_cache(int ion_fd, void *addr, size_t size)
...
@@ -98,8 +100,13 @@ static int ion_flush_cache(int ion_fd, void *addr, size_t size)
.
arg
=
(
unsigned
long
)(
&
cache_range
),
.
arg
=
(
unsigned
long
)(
&
cache_range
),
};
};
if
(
ioctl
(
ion_fd
,
ION_IOC_CUSTOM
,
&
custom_data
))
if
(
new_ioctl
||
ioctl
(
ion_fd
,
ION_IOC_CUSTOM
,
&
custom_data
))
return
0
;
{
if
(
ioctl
(
ion_fd
,
ION_IOC_SUNXI_FLUSH_RANGE
,
&
cache_range
))
return
0
;
else
new_ioctl
=
1
;
}
return
1
;
return
1
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment