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
25f4cb20
Commit
25f4cb20
authored
Jan 04, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
back to normal vaddrs
parent
70bfbd09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
8 deletions
+47
-8
elphel393-mem.c
src/drivers/elphel/elphel393-mem.c
+7
-7
x393_videomem.c
src/drivers/elphel/x393_videomem.c
+40
-1
No files found.
src/drivers/elphel/elphel393-mem.c
View file @
25f4cb20
...
...
@@ -192,37 +192,37 @@ int elphelmem_update_partitions(void){
tmpsize
+=
_elphel_buf
.
circbuf_chn0_size
*
PAGE_SIZE
;
_elphel_buf
.
circbuf_chn1_vaddr
=
_elphel_buf
.
vaddr
+
BYTE2DW
(
tmpsize
)
;
_elphel_buf
.
circbuf_chn1_vaddr
=
_elphel_buf
.
vaddr
+
tmpsize
;
_elphel_buf
.
circbuf_chn1_paddr
=
_elphel_buf
.
paddr
+
tmpsize
;
tmpsize
+=
_elphel_buf
.
circbuf_chn1_size
*
PAGE_SIZE
;
_elphel_buf
.
circbuf_chn2_vaddr
=
_elphel_buf
.
vaddr
+
BYTE2DW
(
tmpsize
)
;
_elphel_buf
.
circbuf_chn2_vaddr
=
_elphel_buf
.
vaddr
+
tmpsize
;
_elphel_buf
.
circbuf_chn2_paddr
=
_elphel_buf
.
paddr
+
tmpsize
;
tmpsize
+=
_elphel_buf
.
circbuf_chn2_size
*
PAGE_SIZE
;
_elphel_buf
.
circbuf_chn3_vaddr
=
_elphel_buf
.
vaddr
+
BYTE2DW
(
tmpsize
)
;
_elphel_buf
.
circbuf_chn3_vaddr
=
_elphel_buf
.
vaddr
+
tmpsize
;
_elphel_buf
.
circbuf_chn3_paddr
=
_elphel_buf
.
paddr
+
tmpsize
;
tmpsize
+=
_elphel_buf
.
circbuf_chn3_size
*
PAGE_SIZE
;
_elphel_buf
.
raw_chn0_vaddr
=
_elphel_buf
.
vaddr
+
BYTE2DW
(
tmpsize
)
;
_elphel_buf
.
raw_chn0_vaddr
=
_elphel_buf
.
vaddr
+
tmpsize
;
_elphel_buf
.
raw_chn0_paddr
=
_elphel_buf
.
paddr
+
tmpsize
;
tmpsize
+=
_elphel_buf
.
raw_chn0_size
*
PAGE_SIZE
;
_elphel_buf
.
raw_chn1_vaddr
=
_elphel_buf
.
vaddr
+
BYTE2DW
(
tmpsize
)
;
_elphel_buf
.
raw_chn1_vaddr
=
_elphel_buf
.
vaddr
+
tmpsize
;
_elphel_buf
.
raw_chn1_paddr
=
_elphel_buf
.
paddr
+
tmpsize
;
tmpsize
+=
_elphel_buf
.
raw_chn1_size
*
PAGE_SIZE
;
_elphel_buf
.
raw_chn2_vaddr
=
_elphel_buf
.
vaddr
+
BYTE2DW
(
tmpsize
)
;
_elphel_buf
.
raw_chn2_vaddr
=
_elphel_buf
.
vaddr
+
tmpsize
;
_elphel_buf
.
raw_chn2_paddr
=
_elphel_buf
.
paddr
+
tmpsize
;
tmpsize
+=
_elphel_buf
.
raw_chn2_size
*
PAGE_SIZE
;
_elphel_buf
.
raw_chn3_vaddr
=
_elphel_buf
.
vaddr
+
BYTE2DW
(
tmpsize
)
;
_elphel_buf
.
raw_chn3_vaddr
=
_elphel_buf
.
vaddr
+
tmpsize
;
_elphel_buf
.
raw_chn3_paddr
=
_elphel_buf
.
paddr
+
tmpsize
;
return
0
;
...
...
src/drivers/elphel/x393_videomem.c
View file @
25f4cb20
...
...
@@ -542,7 +542,46 @@ static int videomem_open(struct inode *inode, struct file *filp)
privData
->
buf_size32
=
(
privData
->
buf_size
)
>>
2
;
// setup membridge
// fill the buffer from membridge
/*
// FROM:
// from dts: frame_start_chn2 = <0x10000000>; // Channel 2 frame start (in bytes)
x393_membridge_scanline_startaddr(0x10000000);
// what units? Bytes?
x393_membridge_scanline_frame_size(privData->buf_size);
// number of frames in buffer - 1
x393_membridge_scanline_frame_last(1);
// Set frame full(padded) width - get from some parameter
x393_membridge_scanline_frame_full_width(2592);
// set frame window size?!
// (window_height << 16)
x393_membridge_scanline_window_wh(1940<<16);
// Set startXY register
// (window_top << 16)
x393_membridge_scanline_window_x0y0(0<<16);
x393_membridge_scanline_startxy(0);
// TO:
// start address of the system memory range in QWORDs (4 LSBs==0)
x393_membridge_lo_addr64((privData->phys_addr)>>4);
// size of the system memory range in QWORDs (4 LSBs==0), rolls over
x393_membridge_size64((privData->buf_size)>>4);
// start of transfer offset to system memory range in QWORDs (4 LSBs==0)
x393_membridge_start64(0);
// Full length of transfer in QWORDs
x393_membridge_len64((8192*PAGE_SIZE)>>4);
// Frame width in QWORDs (last xfer in each line may be partial)
x393_membridge_width64(2592>>4);
// start?
x393_membridge_ctrl();
// wait until transfer is done
get_x393_membridge_status_cntrl();
*/
return
0
;
}
...
...
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