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
64c2d002
Commit
64c2d002
authored
Jan 04, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed vaddr and void pointers
parent
9b8552f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
4 deletions
+28
-4
circbuf.c
src/drivers/elphel/circbuf.c
+26
-1
elphel393-mem.c
src/drivers/elphel/elphel393-mem.c
+2
-2
x393_videomem.c
src/drivers/elphel/x393_videomem.c
+0
-1
No files found.
src/drivers/elphel/circbuf.c
View file @
64c2d002
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
//#define DEBUG
#include <linux/device.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/mm.h>
...
@@ -133,7 +134,30 @@ int init_ccam_dma_buf_ptr(struct platform_device *pdev)
...
@@ -133,7 +134,30 @@ int init_ccam_dma_buf_ptr(struct platform_device *pdev)
}
}
}
}
// TODO: take data from pElphel_buf (calc buf_ptr for each channel)
circbuf_priv
[
0
].
buf_size
=
pElphel_buf
->
circbuf_chn0_size
*
PAGE_SIZE
;
circbuf_priv
[
0
].
phys_addr
=
pElphel_buf
->
circbuf_chn0_paddr
;
circbuf_priv
[
0
].
buf_ptr
=
pElphel_buf
->
circbuf_chn0_vaddr
;
circbuf_priv
[
1
].
buf_size
=
pElphel_buf
->
circbuf_chn1_size
*
PAGE_SIZE
;
circbuf_priv
[
1
].
phys_addr
=
pElphel_buf
->
circbuf_chn1_paddr
;
circbuf_priv
[
1
].
buf_ptr
=
pElphel_buf
->
circbuf_chn1_vaddr
;
circbuf_priv
[
2
].
buf_size
=
pElphel_buf
->
circbuf_chn2_size
*
PAGE_SIZE
;
circbuf_priv
[
2
].
phys_addr
=
pElphel_buf
->
circbuf_chn2_paddr
;
circbuf_priv
[
2
].
buf_ptr
=
pElphel_buf
->
circbuf_chn2_vaddr
;
circbuf_priv
[
3
].
buf_size
=
pElphel_buf
->
circbuf_chn3_size
*
PAGE_SIZE
;
circbuf_priv
[
3
].
phys_addr
=
pElphel_buf
->
circbuf_chn3_paddr
;
circbuf_priv
[
3
].
buf_ptr
=
pElphel_buf
->
circbuf_chn3_vaddr
;
for
(
i
=
0
;
i
<
SENSOR_PORTS
;
i
++
)
{
circbuf_priv
[
i
].
buf_size32
=
circbuf_priv
[
i
].
buf_size
>>
2
;
// used in many places
ccam_dma_buf_ptr
[
i
]
=
circbuf_priv
[
i
].
buf_ptr
;
set_globalParam
(
i
,
G_CIRCBUFSIZE
,
circbuf_priv
[
i
].
buf_size
);
}
/*
// DONE: take data from pElphel_buf (calc buf_ptr for each channel)
for (i = 0; i < SENSOR_PORTS; i++) {
for (i = 0; i < SENSOR_PORTS; i++) {
// nobody knows what the 1st 1MB is for...
// nobody knows what the 1st 1MB is for...
circbuf_priv[i].buf_ptr = dma_buf_ptr + BYTE2DW(CIRCBUF_START_OFFSET + i * CCAM_DMA_SIZE);
circbuf_priv[i].buf_ptr = dma_buf_ptr + BYTE2DW(CIRCBUF_START_OFFSET + i * CCAM_DMA_SIZE);
...
@@ -145,6 +169,7 @@ int init_ccam_dma_buf_ptr(struct platform_device *pdev)
...
@@ -145,6 +169,7 @@ int init_ccam_dma_buf_ptr(struct platform_device *pdev)
// set circular buffer size in bytes
// set circular buffer size in bytes
set_globalParam(i, G_CIRCBUFSIZE, circbuf_priv[i].buf_size);
set_globalParam(i, G_CIRCBUFSIZE, circbuf_priv[i].buf_size);
}
}
*/
return
0
;
return
0
;
}
}
...
...
src/drivers/elphel/elphel393-mem.c
View file @
64c2d002
...
@@ -187,8 +187,8 @@ int elphelmem_update_partitions(void){
...
@@ -187,8 +187,8 @@ int elphelmem_update_partitions(void){
tmpsize
=
CIRCBUF_START_OFFSET
;
tmpsize
=
CIRCBUF_START_OFFSET
;
// fill out buffers info
// fill out buffers info
_elphel_buf
.
circbuf_chn0_vaddr
=
_elphel_buf
.
vaddr
;
_elphel_buf
.
circbuf_chn0_vaddr
=
_elphel_buf
.
vaddr
+
tmpsize
;
_elphel_buf
.
circbuf_chn0_paddr
=
_elphel_buf
.
paddr
;
_elphel_buf
.
circbuf_chn0_paddr
=
_elphel_buf
.
paddr
+
tmpsize
;
tmpsize
+=
_elphel_buf
.
circbuf_chn0_size
*
PAGE_SIZE
;
tmpsize
+=
_elphel_buf
.
circbuf_chn0_size
*
PAGE_SIZE
;
...
...
src/drivers/elphel/x393_videomem.c
View file @
64c2d002
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
*******************************************************************************/
#define DEBUG
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/of_device.h>
#include <linux/of_device.h>
...
...
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