Bernardo Innocenti wrote:

> Now libGL works, but something else fails and 32bit
> clients fall back to indirect rendering:

After digging around with GDB, I can now elaborate a
bit more.

The call to drmMap() fails because it attempts to
map 0 bytes of memory.  We're in r300/radeon_screen.c:radeonCreateScreen():

  screen->mmio.handle = dri_priv->registerHandle;
  screen->mmio.size = dri_priv->registerSize;
  if (drmMap(sPriv->fd,
            screen->mmio.handle, screen->mmio.size, &screen->mmio.map)) {

dri_priv points to a RADEONInfoRec, which is filled
in by the server side in XF86DRIGetDeviceInfo().

The contents seem to be borked, perhaps because many
fields arn't the same size in the 64bit server side.

The full contents are:

  deviceID = 16723,
  width = 1400,
  height = 1050,
  depth = 24,
  bpp = 32,
  IsPCI = 0,
  AGPMode = 8,
  frontOffset = 0,
  frontPitch = 1408,
  backOffset = 23789568,
  backPitch = 1408,
  depthOffset = 29704192,
  depthPitch = 1408,
  textureOffset = 35651584,
  textureSize = 98566144,
  log2TexGran = 21,
  registerHandle = 4225761280,
  registerSize = 0,
  statusHandle = 524288,
  statusSize = 0,
  gartTexHandle = 3222278144,
  gartTexMapSize = 0,
  log2GARTTexGran = 4096,
  textureSize = 98566144,
  log2TexGran = 21,
  registerHandle = 4225761280,
  registerSize = 0,
  statusHandle = 524288,
  statusSize = 0,
  gartTexHandle = 3222278144,
  gartTexMapSize = 0,
  log2GARTTexGran = 4096,
  gartTexOffset = 0,
  sarea_priv_offset = 3224379392


Which is perhaps more readable in hex:

  deviceID = 0x4153,
  width = 0x578,
  height = 0x41a,
  depth = 0x18,
  bpp = 0x20,
  IsPCI = 0x0,
  AGPMode = 0x8,
  frontOffset = 0x0,
  frontPitch = 0x580,
  backOffset = 0x16b0000,
  backPitch = 0x580,
  depthOffset = 0x1c54000,
  depthPitch = 0x580,
  textureOffset = 0x2200000,
  textureSize = 0x5e00000,
  log2TexGran = 0x15,
  registerHandle = 0xfbe00000,
  registerSize = 0x0,
  statusHandle = 0x80000,
  statusSize = 0x0,
  gartTexHandle = 0xc0101000,
  gartTexMapSize = 0x0,
  log2GARTTexGran = 0x1000,
  textureSize = 0x5e00000,
  log2TexGran = 0x15,
  registerHandle = 0xfbe00000,
  registerSize = 0x0,
  statusHandle = 0x80000,
  statusSize = 0x0,
  gartTexHandle = 0xc0101000,
  gartTexMapSize = 0x0,
  log2GARTTexGran = 0x1000,
  gartTexOffset = 0x0,
  sarea_priv_offset = 0xc0302000


Maybe the fields of RADEONInfoRec should be reworked
to use types with a predefined size.  Is that right?

-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to