2003-01-30 20:23:06

by Chris Ison

[permalink] [raw]
Subject: Radeon PCI support

I am looking for any information that may help in getting my Radeon PCI
card working in linux with acceloration.

I am in the process of trying to obtain information from ATI about the
chipset but apart from that I haven't been successful in any other way
except I have determined the card becomes locked and often its FIFO read
pointer is occassionally at 0 when it has locked (with the FIFO write
pointer often several kilobytes ahead of it).

I have had no luck with DRI or XFree86 people as PCI support for Radeons
on x86 platform isn't a priority at this time.

The suggestion is that the problem is in the DRM but I can't find
information confirming that in the lkml at this time.

If you do have any information/patches that could help for the x86
platform could you please CC me as I am not on the lkml due to its
traffic volume.

I am determined to have this fixed so please help if you can.


Thank you in advance
Chris Ison


2003-01-30 20:32:48

by Chris Ison

[permalink] [raw]
Subject: Re: Radeon PCI support

just a couple of things I forgot to mention, my system doesn't have AGP
and I'm using kernel version 2.4.20-ac1

2003-01-31 06:29:22

by Nathaniel W. Filardo

[permalink] [raw]
Subject: Re: Radeon PCI support

Chris Ison wrote:
> I am looking for any information that may help in getting my Radeon PCI
> card working in linux with acceloration.
>
> I am in the process of trying to obtain information from ATI about the
> chipset but apart from that I haven't been successful in any other way
> except I have determined the card becomes locked and often its FIFO read
> pointer is occassionally at 0 when it has locked (with the FIFO write
> pointer often several kilobytes ahead of it).
>
> I have had no luck with DRI or XFree86 people as PCI support for Radeons
> on x86 platform isn't a priority at this time.
>
> The suggestion is that the problem is in the DRM but I can't find
> information confirming that in the lkml at this time.
>
> If you do have any information/patches that could help for the x86
> platform could you please CC me as I am not on the lkml due to its
> traffic volume.
>
> I am determined to have this fixed so please help if you can.
>
>
> Thank you in advance
> Chris Ison

You have to enable PCIGART in drivers/char/drm/radeon_cp.c:

There should be a block that looks like this, near the top of the file:
#if defined(__alpha__)
# define PCIGART_ENABLED
#else
# undef PCIGART_ENABLED
#endif

Either replace it with, or add below it, "#define PCIGART_ENABLED" without the ""s. This has worked fine for me, though I do
not know if it is the technically "right" solution. There is a leftover quirk that I have not looked into investigating that
the module "agpgart" will still be loaded and ISTR that the radeon driver still registers itself as an AGP device. However,
this is not really a big deal.

Unfortunately, I think you also need to recompile X and I do not remember where in the source tree PCIGART_ENABLED needs to be
defined - probably in the ati/ driver directory somewhere. Hope that is enough of a pointer to get you looking in the right place.

--NWF;


Attachments:
(No filename) (252.00 B)

2003-01-31 14:26:57

by AU

[permalink] [raw]
Subject: Re: Radeon PCI support

I just got it working last night with my home computer, which has
ATI-Radeon 7500 PCI version.
However, now I am at work, so I will post for you tonight when I get
home.

Couple things I have done.

1) Modify kernel (/usr/src/linux/driver/char/drm/radeon_cp.c
2) Download xfree 4.2.1 and modify couple files in it, and
recompile.

I will post the diff file tonite.

Progress: This morning I tested, I can run 3D Crack-Attack, and tuxracer.
I will test more, and let you know.


On Fri, 31 Jan 2003, Chris Ison wrote:

> just a couple of things I forgot to mention, my system doesn't have AGP
> and I'm using kernel version 2.4.20-ac1
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2003-02-01 06:38:41

by AU

[permalink] [raw]
Subject: Re: Radeon PCI support

Here what I did
1) Kernel

/usr/src/linux/drivers/char/drm/radeon_cp.c

comment out
/*
#if defined(__alpha__)
# define PCIGART_ENABLED
#else
# undef PCIGART_ENABLED
#endif
*/

#define PCIGART_ENABLED

and then I got drm works

But I don't think I have to do that, but I don't know because I am
too lazy to make a new kernel without that feature, after I got Xfree86
work with glx.

Herewhat I did:

1) download 4.2.1 source code from Xfree86.org
2) modify xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c
comment out

#include "sarea.h"
/*
#if defined(__alpha__)
# define PCIGART_ENABLED
#else
# undef PCIGART_ENABLED
#endif
*/
/* insert this line */
#define PCIGART_ENABLED

/* ?? HACK - for now, put this here... */
/* ?? Alpha - this may need to be a variable to handle UP1x00 vs TITAN */
#if defined(__alpha__)
# define DRM_PAGE_SIZE 8192
#elif defined(__ia64__)
# define DRM_PAGE_SIZE getpagesize()
#else
# define DRM_PAGE_SIZE 4096
#endif

/* insert this line */
#define DRM_PAGE_SIZE 8192

3) modify
xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/radeon_cp.c

/*
#if defined(__alpha__)
# define PCIGART_ENABLED
#else
# undef PCIGART_ENABLED
#endif
*/
/* insert this line */
#define PCIGART_ENABLED

4) Last one this I trial and error, some how it works. According to
Whitney.diff patch.

in xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c
-------------------------------------------------------
*** xf86pciBus.c Thu Jan 30 23:57:29 2003
--- xf86pciBus.c.orig Sat Jan 18 01:11:45 2003
***************
*** 1518,1537 ****
tmp->block_end = MIN(tmp->block_end,PCI_MEM32_LENGTH_MAX);
tmp = tmp->next;
}
! } /* Hacking by me */
! else if ((pbp->primary == pvp->bus) &&
! (pbp->secondary >= 0) &&
! (pbp->primary != pbp->secondary)) {
! tmp = xf86DupResList(pbp->preferred_pmem);
! avoid = xf86JoinResLists(avoid, tmp);
! tmp = xf86DupResList(pbp->pmem);
! avoid = xf86JoinResLists(avoid, tmp);
! tmp = xf86DupResList(pbp->preferred_mem);
! avoid = xf86JoinResLists(avoid, tmp);
! tmp = xf86DupResList(pbp->mem);
! avoid = xf86JoinResLists(avoid, tmp);
! }
!
while (pbp1) {
if (pbp1->primary == pvp->bus) {
tmp = xf86DupResList(pbp1->preferred_pmem);
--- 1518,1524 ----
tmp->block_end = MIN(tmp->block_end,PCI_MEM32_LENGTH_MAX);
tmp = tmp->next;
}
! }
while (pbp1) {
if (pbp1->primary == pvp->bus) {
tmp = xf86DupResList(pbp1->preferred_pmem);
***************
*** 2211,2230 ****
res_m_io = xf86JoinResLists(res_m_io,
xf86FindIntersectOfLists(pbp->preferred_io,ResRange));
}
! } /* hacking */
! else if ((pbp->primary == pvp->bus) &&
! (pbp->secondary >= 0) &&
! (pbp->primary != pbp->secondary)) {
! tmp = xf86DupResList(pbp->preferred_pmem);
! avoid = xf86JoinResLists(avoid, tmp);
! tmp = xf86DupResList(pbp->preferred_mem);
! avoid = xf86JoinResLists(avoid, tmp);
! tmp = xf86DupResList(pbp->preferred_io);
! avoid = xf86JoinResLists(avoid, tmp);
! }
!
!
!
while (pbp1) {
if (pbp1->primary == pvp->bus) {
tmp = xf86DupResList(pbp1->preferred_pmem);
--- 2198,2204 ----
res_m_io = xf86JoinResLists(res_m_io,
xf86FindIntersectOfLists(pbp->preferred_io,ResRange));
}
! }
while (pbp1) {
if (pbp1->primary == pvp->bus) {
tmp = xf86DupResList(pbp1->preferred_pmem);

-------------------------------------------------------------------

Try it and let me know if you have any questions, I would like to know the
result too.

Thanks,

On Fri, 31 Jan 2003, Chris Ison wrote:

> just a couple of things I forgot to mention, my system doesn't have AGP
> and I'm using kernel version 2.4.20-ac1
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>