Commit 25f4cb20 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

back to normal vaddrs

parent 70bfbd09
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment