2005-01-25 04:50:00

by John Gilbert

[permalink] [raw]
Subject: ATI drivers working under realtime-preempt linux

--- firegl_public.c.orig 2005-01-04 17:05:05.000000000 -0800
+++ firegl_public.c 2005-01-24 16:50:28.000000000 -0800
@@ -2590,13 +2590,13 @@
#endif /* __ia64__ */
vma->vm_flags |= VM_IO; /* not in core dump */
}
- if (remap_page_range(FGL_VMA_API_PASS
+ if (remap_pfn_range(FGL_VMA_API_PASS
vma->vm_start,
- __ke_vm_offset(vma),
+ vma->vm_pgoff,
vma->vm_end - vma->vm_start,
vma->vm_page_prot))
{
- __KE_DEBUG("remap_page_range failed\n");
+ __KE_DEBUG("remap_pfn_range failed\n");
return -EAGAIN;
}
vma->vm_flags |= VM_SHM | VM_RESERVED; /* Don't swap */
@@ -2655,15 +2655,15 @@
#else
// else
{
- if (__ke_vm_offset(vma) >= __pa(high_memory))
+ if (vma->vm_pgoff >= __pa(high_memory))
vma->vm_flags |= VM_IO; /* not in core dump */
- if (remap_page_range(FGL_VMA_API_PASS
+ if (remap_pfn_range(FGL_VMA_API_PASS
vma->vm_start,
- __ke_vm_offset(vma),
+ vma->vm_pgoff,
vma->vm_end - vma->vm_start,
vma->vm_page_prot))
{
- __KE_DEBUG("remap_page_range failed\n");
+ __KE_DEBUG("remap_pfn_range failed\n");
return -EAGAIN;
}
#ifdef __x86_64__
@@ -2692,15 +2692,15 @@
// else
#else
{
- if (__ke_vm_offset(vma) >= __pa(high_memory))
+ if (vma->vm_pgoff >= __pa(high_memory))
vma->vm_flags |= VM_IO; /* not in core dump */
- if (remap_page_range(FGL_VMA_API_PASS
+ if (remap_pfn_range(FGL_VMA_API_PASS
vma->vm_start,
- __ke_vm_offset(vma),
+ vma->vm_pgoff,
vma->vm_end - vma->vm_start,
vma->vm_page_prot))
{
- __KE_DEBUG("remap_page_range failed\n");
+ __KE_DEBUG("remap_pfn_range failed\n");
return -EAGAIN;
}
#ifdef __x86_64__
@@ -2744,6 +2744,20 @@

#if LINUX_VERSION_CODE >= 0x020400

+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
+/* This is no longer used inside kernel, so declare it here. JGG */
+typedef struct {
+ void (*free_memory)(struct agp_memory *);
+ struct agp_memory * (*allocate_memory)(size_t, u32);
+ int (*bind_memory)(struct agp_memory *, off_t);
+ int (*unbind_memory)(struct agp_memory *);
+ void (*enable)(u32);
+ int (*acquire)(void);
+ void (*release)(void);
+ int (*copy_info)(struct agp_kern_info *);
+} drm_agp_t;
+#endif
+
static const drm_agp_t *drm_agp_module_stub = NULL;

#define AGP_FUNCTIONS 8


Attachments:
patch.agpgart_be.c-04 (763.00 B)
patch.firegl_public.c-04 (2.72 kB)
Download all attachments

2005-01-25 21:06:21

by Lee Revell

[permalink] [raw]
Subject: Re: ATI drivers working under realtime-preempt linux

On Mon, 2005-01-24 at 20:47 -0800, John Gilbert wrote:
> Xv isn't supported. DRI isn't supported.
> ATI (and NVIDIA) should be all over the hard-realtime kernel, as this
> has the potential of making video and games frame accurate (never
> missing frames, no page tears).
> The documentation from Linux user's web pages are better than ATI's.
>
> Making this work should have been someone at ATI's job, not mine. I'm
> working blind here.

Be patient, this stuff is very new and vendors are rightfully
conservative. They are probably just waiting for the development to
settle down a bit before committing resources to supporting the RT
kernel.

Once some distros start to offer the RT kernel as an option I would
expect a lot of interest from hardware vendors as it really allows the
hardware pushed to its limits. For example pro audio interfaces are
heavily marketed based on the lowest achievable latency, this will let
them put better numbers on the box, and will probably improve Linux
support a lot, because the marketing will have to be "FooAudio5000, now
featuring 0.6 ms*** usable latency (***Linux RT kernel required, 2.6 ms
under Windows/MacOS)" :-).

Lee