On Tue, Aug 18, 2009 at 2:08 AM, Thomas Hellström<[email protected]> wrote:
> Kristian Høgsberg wrote:
>> Perhaps TTM bo read/write could use ioctls like the gem pwrite/pread
>> ioctls? The only way we can get asynchronous notifications from the
>> drm to userspace is through readable events on the drm fd. How were
>> you planning to implement read and write from multiple bo's through
>> one fd anyway? Reusing the fake offset we use for mmap? I think the
>> ioctl approach is cleaner since you can just pass in the object handle
>> and the offset into the object. Maybe even add src and dst stride
>> arguments.
>
> It's a common misconception that the TTM bo offsets are fake offsets from
> outer space.
> The offsets aren't fake offsets but real offsets into the device address
> space, so a logical consequence of mapping a part of that address space is
> to be able to read and write to the same address space, That is read / write
> implemented using syscalls as intended.
>
> That said, rectangular bo blit ioctls is probably a good idea as well, and
> some drivers, like via, already have them.
>
> But I do think that if we claim device reads and writes for modesetting, we
> should move bo IO to another device to be consistent.
Oh, to this last paragraph I wanted to point out that the drm fd event
isn't modesetting specific. It's a generic event mechanism that we
can use for other cases. For example, an asynchronous
glReadPixels/DownloadFromScreen ioctls, or a "breadcrumb" ioctl that
sends an event back once the command processor has caught up. The
event structure has a header like this:
struct drm_event {
__u32 type;
__u32 length;
};
which lets us introduce new types of events and lets an older
userspace skip unknown events.
cheers,
Kristian
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel