Commit b844e2fa authored by Oleg Dzhimiev's avatar Oleg Dzhimiev
Browse files

fixed lengths of sysmem

parent 674c9ee0
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1971,6 +1971,8 @@ int pgm_memsensor (int sensor_port, ///< sensor port number (
        break;
        break;
    }
    }
    width_bursts = (width_marg >> 4) + ((width_marg & 0xf) ? 1 : 0);
    width_bursts = (width_marg >> 4) + ((width_marg & 0xf) ? 1 : 0);
    /** shorter version: */
    //width_bursts = (width_marg+0xf)>>4;
    setup_sensor_memory (sensor_port,       // sensor port number (0..3)
    setup_sensor_memory (sensor_port,       // sensor port number (0..3)
                         width_bursts,      // 13-bit - in 8*16=128 bit bursts
                         width_bursts,      // 13-bit - in 8*16=128 bit bursts
                         height_marg,       // 16-bit window height (in scan lines)
                         height_marg,       // 16-bit window height (in scan lines)
+5 −3
Original line number Original line Diff line number Diff line
@@ -14,7 +14,7 @@
*  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
#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>
@@ -835,6 +835,8 @@ static int videomem_open(struct inode *inode, struct file *filp)
        break;
        break;
    }
    }
    width_bursts = (width_marg >> 4) + ((width_marg & 0xf) ? 1 : 0);
    width_bursts = (width_marg >> 4) + ((width_marg & 0xf) ? 1 : 0);
    /** shorter version: */
    //width_bursts = (width_marg+0xf)>>4;


    //int setup_sensor_memory (int num_sensor,       ///< sensor port number (0..3)
    //int setup_sensor_memory (int num_sensor,       ///< sensor port number (0..3)
    //                         int window_width,     ///< 13-bit - in 8*16=128 bit bursts
    //                         int window_width,     ///< 13-bit - in 8*16=128 bit bursts
@@ -882,8 +884,8 @@ static int videomem_open(struct inode *inode, struct file *filp)
			(privData->phys_addr)>>3,
			(privData->phys_addr)>>3,
			(privData->buf_size)>>3,
			(privData->buf_size)>>3,
			0, // start offset?
			0, // start offset?
			(width_marg*height_marg)>>3,
			(width_bursts<<1)*height_marg,
			(width_marg)>>3
			(width_bursts<<1)
			);
			);