Hello, dmesg reports: [ 29.365973] [TTM] AGP Bind memory failed. [ 29.366015] radeon 0000:80:00.0: object_init failed for (4096, 0x00000002) [ 29.366052] radeon 0000:80:00.0: (-22) create WB bo failed [ 29.366087] radeon 0000:80:00.0: Disabling GPU acceleration [ 29.366124] [drm] radeon: cp finalized [ 29.366168] [drm] radeon: cp finalized [ 29.366210] [TTM] Finalizing pool allocator. [ 29.366924] [TTM] Zone kernel: Used memory at exit: 0 kiB. [ 29.366961] [TTM] Zone dma32: Used memory at exit: 0 kiB. [ 29.366996] [drm] radeon: ttm finalized [ 29.367030] [drm] Forcing AGP to PCI mode This patch allows binding user memory to the AGP GART on zx1-based systems. dmesg thus no more complains about AGP bind memory failure, disabled GPU acceleration or AGP mode forced to PCI. Original work from Francisco Jerez in agp/amd-k7 (https://lkml.org/lkml/2010/10/15/469). Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx> Tested-by: Émeric Maschino <emeric.maschino@xxxxxxxxx> --- --- a/drivers/char/agp/hp-agp.c 2011-07-22 04:17:23.000000000 +0200 +++ b/drivers/char/agp/hp-agp.c 2011-08-20 01:16:47.000000000 +0200 @@ -336,7 +336,8 @@ off_t j, io_pg_start; int io_pg_count; - if (type != 0 || mem->type != 0) { + if (type != mem->type || + agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type)) { return -EINVAL; } @@ -380,7 +381,8 @@ struct _hp_private *hp = &hp_private; int i, io_pg_start, io_pg_count; - if (type != 0 || mem->type != 0) { + if (type != mem->type || + agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type)) { return -EINVAL; } Feel free to reformat to conform to Linux kernel coding rules if needed. Thank you, Émeric
--- a/drivers/char/agp/hp-agp.c 2011-07-22 04:17:23.000000000 +0200 +++ b/drivers/char/agp/hp-agp.c 2011-08-20 01:16:47.000000000 +0200 @@ -336,7 +336,8 @@ off_t j, io_pg_start; int io_pg_count; - if (type != 0 || mem->type != 0) { + if (type != mem->type || + agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type)) { return -EINVAL; } @@ -380,7 +381,8 @@ struct _hp_private *hp = &hp_private; int i, io_pg_start, io_pg_count; - if (type != 0 || mem->type != 0) { + if (type != mem->type || + agp_bridge->driver->agp_type_to_mask_type(agp_bridge, type)) { return -EINVAL; }