Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
9cf40ee6
Commit
9cf40ee6
authored
May 14, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add L1 flush to tasklet
parent
29464216
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
sensor_common.c
src/drivers/elphel/sensor_common.c
+6
-0
No files found.
src/drivers/elphel/sensor_common.c
View file @
9cf40ee6
...
@@ -609,21 +609,27 @@ void tasklet_fpga_function(unsigned long arg) {
...
@@ -609,21 +609,27 @@ void tasklet_fpga_function(unsigned long arg) {
unsigned
long
*
framep
=
&
(
framepars
[(
thisFrameNumber
-
1
)
&
PARS_FRAMES_MASK
].
pars
[
P_FRAME
]);
unsigned
long
*
framep
=
&
(
framepars
[(
thisFrameNumber
-
1
)
&
PARS_FRAMES_MASK
].
pars
[
P_FRAME
]);
const
struct
jpeg_ptr_t
*
jptr
=
&
image_acq_priv
.
jpeg_ptr
[
arg
];
const
struct
jpeg_ptr_t
*
jptr
=
&
image_acq_priv
.
jpeg_ptr
[
arg
];
dma_addr_t
phys_addr_start
,
phys_addr_end
;
dma_addr_t
phys_addr_start
,
phys_addr_end
;
void
*
virt_addr_start
;
unsigned
int
sz
;
unsigned
int
sz
;
/* invalidate L2 cache lines in the beginning of current frame */
/* invalidate L2 cache lines in the beginning of current frame */
phys_addr_start
=
circbuf_priv_ptr
[
jptr
->
chn_num
].
phys_addr
+
DW2BYTE
(
jptr
->
fpga_cntr_prev
);
phys_addr_start
=
circbuf_priv_ptr
[
jptr
->
chn_num
].
phys_addr
+
DW2BYTE
(
jptr
->
fpga_cntr_prev
);
virt_addr_start
=
circbuf_priv_ptr
[
jptr
->
chn_num
].
buf_ptr
+
jptr
->
fpga_cntr_prev
;
sz
=
DW2BYTE
(
jptr
->
fpga_cntr_prev
)
+
L2_INVAL_SIZE
;
sz
=
DW2BYTE
(
jptr
->
fpga_cntr_prev
)
+
L2_INVAL_SIZE
;
if
(
sz
<
CCAM_DMA_SIZE
)
{
if
(
sz
<
CCAM_DMA_SIZE
)
{
phys_addr_end
=
phys_addr_start
+
L2_INVAL_SIZE
-
1
;
phys_addr_end
=
phys_addr_start
+
L2_INVAL_SIZE
-
1
;
outer_inv_range
(
phys_addr_start
,
phys_addr_end
);
outer_inv_range
(
phys_addr_start
,
phys_addr_end
);
__cpuc_flush_dcache_area
(
virt_addr_start
,
L2_INVAL_SIZE
);
}
else
{
}
else
{
phys_addr_end
=
phys_addr_start
+
(
CCAM_DMA_SIZE
-
DW2BYTE
(
jptr
->
fpga_cntr_prev
)
-
1
);
phys_addr_end
=
phys_addr_start
+
(
CCAM_DMA_SIZE
-
DW2BYTE
(
jptr
->
fpga_cntr_prev
)
-
1
);
outer_inv_range
(
phys_addr_start
,
phys_addr_end
);
outer_inv_range
(
phys_addr_start
,
phys_addr_end
);
__cpuc_flush_dcache_area
(
virt_addr_start
,
CCAM_DMA_SIZE
-
DW2BYTE
(
jptr
->
fpga_cntr_prev
));
phys_addr_start
=
circbuf_priv_ptr
[
jptr
->
chn_num
].
phys_addr
;
phys_addr_start
=
circbuf_priv_ptr
[
jptr
->
chn_num
].
phys_addr
;
phys_addr_end
=
phys_addr_start
+
(
sz
-
CCAM_DMA_SIZE
-
1
);
phys_addr_end
=
phys_addr_start
+
(
sz
-
CCAM_DMA_SIZE
-
1
);
virt_addr_start
=
circbuf_priv_ptr
[
jptr
->
chn_num
].
buf_ptr
;
outer_inv_range
(
phys_addr_start
,
phys_addr_end
);
outer_inv_range
(
phys_addr_start
,
phys_addr_end
);
__cpuc_flush_dcache_area
(
virt_addr_start
,
sz
-
CCAM_DMA_SIZE
);
}
}
...
...
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