ts-7000
[Top] [All Lists]

[ts-7000] lcd driver two weeks for nothing

To:
Subject: [ts-7000] lcd driver two weeks for nothing
From: "chaisc97" <>
Date: Fri, 05 Oct 2007 23:04:08 -0000
I try to write a LCD driver, it works fine. i can show the picture on
the screen, however when i put QT on the embedded board(TS7200), when
the mouse moves, the screen show the wrong result, i found in some
place i can get the correct data from the video memory sometimes not.
i have test two video driver as follows.

the first one
/*******************************************************/
s1d13xxx_mmap(struct fb_info *info, struct file *file, struct
vm_area_struct *vma)
{
        unsigned long off, start;
        u32 len;
        unsigned long size  = vma->vm_end - vma->vm_start;
        unsigned long page, pos;

        off = vma->vm_pgoff << PAGE_SHIFT;
        vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);

        printk("vma->flag=%x\n",vma->vm_flags);
        vma->vm_flags |=VM_RESERVED;
        vma->vm_flags |=VM_READHINTMASK;
        vma->vm_flags |=VM_IO;
        vma->vm_flags |=VM_SHM;
        vma->vm_flags |= VM_LOCKED;
        printk("vma->flag=%x\n",vma->vm_flags);

        if ((vma->vm_end - vma->vm_start) > len)
                return -EINVAL;

        vma->vm_pgoff = off >> PAGE_SHIFT;

        start=vma->vm_start;
        size=vma->vm_end - vma->vm_start;
        pos=S1D_PHYSICAL_VMEM_ADDR;
while(size>0)
        {
                 if (remap_page_range(start,pos,PAGE_SIZE, PAGE_SHARED))
                        return -EAGAIN;
                        start += PAGE_SIZE;
                         pos += PAGE_SIZE;
                 if (size > PAGE_SIZE)
                        size -= PAGE_SIZE;
                else
                        size = 0;
        }

/***********************************************/
second one 
i just open the fd=/dev/mem
 mapped_memlen, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x20200000);

what's wrong for my code



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] lcd driver two weeks for nothing, chaisc97 <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU