public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* UIO driver for framebuffer
@ 2009-06-25 11:41 vijay baskar
  2009-06-28 16:00 ` Hans J. Koch
  0 siblings, 1 reply; 2+ messages in thread
From: vijay baskar @ 2009-06-25 11:41 UTC (permalink / raw)
  To: LKML

Hi all,

I have written a uio driver for framebuffer device. I added device 
specific register memory in uio.mem. I also added DMA param memory in 
uio.mem to perform DMA from userspace. Also video RAM 
<http://fixunix.com/#> was mapped in kernel space using 
dma_alloc_coherent() and a logical address was obtained. This logical 
address was also added in uio.mem with memtype as UIO_MEM_LOGICAL 
because i can fill video ram from userspace.Read and write to this DMA 
param memory from userspace is not having any effect. Also video RAM 
memory that i filled up is not getting written to the framebuffer device 
when DMA is started. Also one more info that i noted was that values 
assigned to logical addresses in kernel space are not reflected in 
userspace after mmap. The values in userspace show different values 
compared to that in kernel space.
This is a bit confusing for me. Why is this happening?? Have I missed 
any information?? Am i on the right path??

regards,
vijai

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: UIO driver for framebuffer
  2009-06-25 11:41 UIO driver for framebuffer vijay baskar
@ 2009-06-28 16:00 ` Hans J. Koch
  0 siblings, 0 replies; 2+ messages in thread
From: Hans J. Koch @ 2009-06-28 16:00 UTC (permalink / raw)
  To: vijay baskar; +Cc: LKML

On Thu, Jun 25, 2009 at 05:11:25PM +0530, vijay baskar wrote:
> Hi all,
>
> I have written a uio driver for framebuffer device.

Why? Framebuffer devices should be handled by the framebuffer subsystem which
already makes the framebuffer accessible from userspace in a way that's
supported by many userspace libraries. Why do you want to reinvent the wheel
in an incompatible way?

> I added device  
> specific register memory in uio.mem. I also added DMA param memory in  
> uio.mem to perform DMA from userspace. Also video RAM  
> <http://fixunix.com/#> was mapped in kernel space using  
> dma_alloc_coherent() and a logical address was obtained. This logical  
> address was also added in uio.mem with memtype as UIO_MEM_LOGICAL  
> because i can fill video ram from userspace.Read and write to this DMA  
> param memory from userspace is not having any effect. Also video RAM  
> memory that i filled up is not getting written to the framebuffer device  
> when DMA is started. Also one more info that i noted was that values  
> assigned to logical addresses in kernel space are not reflected in  
> userspace after mmap. The values in userspace show different values  
> compared to that in kernel space.
> This is a bit confusing for me.

For me too.

> Why is this happening?? Have I missed  
> any information??

Yes, UIO is not for devices that are already supported by other subsystems.

> Am i on the right path??

I don't think so, unless you can provide good technical reasons for your
concept.

Thanks,
Hans

>
> regards,
> vijai
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-28 16:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-25 11:41 UIO driver for framebuffer vijay baskar
2009-06-28 16:00 ` Hans J. Koch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox