On 29/03/17 09:55 PM, Christian König wrote:
From: Christian König christian.koenig@amd.com
We will probably never see this combination.
Signed-off-by: Christian König christian.koenig@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 25 ------------------------- 1 file changed, 25 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 7bf5ba7..524abca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -538,31 +538,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_ return -EINVAL; mem->bus.base = adev->mc.aper_base; mem->bus.is_iomem = true; -#ifdef __alpha__
/*
* Alpha: use bus.addr to hold the ioremap() return,
* so we can modify bus.base below.
*/
if (mem->placement & TTM_PL_FLAG_WC)
mem->bus.addr =
ioremap_wc(mem->bus.base + mem->bus.offset,
mem->bus.size);
else
mem->bus.addr =
ioremap_nocache(mem->bus.base + mem->bus.offset,
mem->bus.size);
if (!mem->bus.addr)
return -ENOMEM;
/*
* Alpha: Use just the bus offset plus
* the hose/domain memory base for bus.base.
* It then can be used to build PTEs for VRAM
* access, as done in ttm_bo_vm_fault().
*/
mem->bus.base = (mem->bus.base & 0x0ffffffffUL) +
adev->ddev->hose->dense_mem_base;
-#endif break; default: return -EINVAL;
Maybe leave an #error line, or make AMDGPU depend on !ALPHA in Kconfig, to prevent somebody from trying this driver on an Alpha machine, and it mysteriously failing due to the lack of this?
Either way,
Acked-by: Michel Dänzer michel.daenzer@amd.com
On Thu, Mar 30, 2017 at 2:39 AM, Michel Dänzer michel@daenzer.net wrote:
On 29/03/17 09:55 PM, Christian König wrote:
From: Christian König christian.koenig@amd.com
We will probably never see this combination.
Signed-off-by: Christian König christian.koenig@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 25 ------------------------- 1 file changed, 25 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 7bf5ba7..524abca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -538,31 +538,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_ return -EINVAL; mem->bus.base = adev->mc.aper_base; mem->bus.is_iomem = true; -#ifdef __alpha__
/*
* Alpha: use bus.addr to hold the ioremap() return,
* so we can modify bus.base below.
*/
if (mem->placement & TTM_PL_FLAG_WC)
mem->bus.addr =
ioremap_wc(mem->bus.base + mem->bus.offset,
mem->bus.size);
else
mem->bus.addr =
ioremap_nocache(mem->bus.base + mem->bus.offset,
mem->bus.size);
if (!mem->bus.addr)
return -ENOMEM;
/*
* Alpha: Use just the bus offset plus
* the hose/domain memory base for bus.base.
* It then can be used to build PTEs for VRAM
* access, as done in ttm_bo_vm_fault().
*/
mem->bus.base = (mem->bus.base & 0x0ffffffffUL) +
adev->ddev->hose->dense_mem_base;
-#endif break; default: return -EINVAL;
Maybe leave an #error line, or make AMDGPU depend on !ALPHA in Kconfig, to prevent somebody from trying this driver on an Alpha machine, and it mysteriously failing due to the lack of this?
Either way,
Acked-by: Michel Dänzer michel.daenzer@amd.com
Does this code even work on alpha (or compile for that matter)? I think this was blindly copied over from radeon UMS to radeon KMS to amdgpu.
Alex
-- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 30.03.2017 um 15:09 schrieb Alex Deucher:
On Thu, Mar 30, 2017 at 2:39 AM, Michel Dänzer michel@daenzer.net wrote:
On 29/03/17 09:55 PM, Christian König wrote:
From: Christian König christian.koenig@amd.com
We will probably never see this combination.
Signed-off-by: Christian König christian.koenig@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 25 ------------------------- 1 file changed, 25 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 7bf5ba7..524abca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -538,31 +538,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_ return -EINVAL; mem->bus.base = adev->mc.aper_base; mem->bus.is_iomem = true; -#ifdef __alpha__
/*
* Alpha: use bus.addr to hold the ioremap() return,
* so we can modify bus.base below.
*/
if (mem->placement & TTM_PL_FLAG_WC)
mem->bus.addr =
ioremap_wc(mem->bus.base + mem->bus.offset,
mem->bus.size);
else
mem->bus.addr =
ioremap_nocache(mem->bus.base + mem->bus.offset,
mem->bus.size);
if (!mem->bus.addr)
return -ENOMEM;
/*
* Alpha: Use just the bus offset plus
* the hose/domain memory base for bus.base.
* It then can be used to build PTEs for VRAM
* access, as done in ttm_bo_vm_fault().
*/
mem->bus.base = (mem->bus.base & 0x0ffffffffUL) +
adev->ddev->hose->dense_mem_base;
-#endif break; default: return -EINVAL;
Maybe leave an #error line, or make AMDGPU depend on !ALPHA in Kconfig, to prevent somebody from trying this driver on an Alpha machine, and it mysteriously failing due to the lack of this?
Either way,
Acked-by: Michel Dänzer michel.daenzer@amd.com
Does this code even work on alpha (or compile for that matter)? I think this was blindly copied over from radeon UMS to radeon KMS to amdgpu.
Yeah, I was questioning that myself as well.
I'm fine adding a !ALPHA to the Kconfig, but I'm quite sure that architecture is just dead.
Christian.
Alex
-- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
On 30/03/17 10:09 PM, Alex Deucher wrote:
On Thu, Mar 30, 2017 at 2:39 AM, Michel Dänzer michel@daenzer.net wrote:
On 29/03/17 09:55 PM, Christian König wrote:
From: Christian König christian.koenig@amd.com
We will probably never see this combination.
Signed-off-by: Christian König christian.koenig@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 25 ------------------------- 1 file changed, 25 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 7bf5ba7..524abca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -538,31 +538,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_ return -EINVAL; mem->bus.base = adev->mc.aper_base; mem->bus.is_iomem = true; -#ifdef __alpha__
/*
* Alpha: use bus.addr to hold the ioremap() return,
* so we can modify bus.base below.
*/
if (mem->placement & TTM_PL_FLAG_WC)
mem->bus.addr =
ioremap_wc(mem->bus.base + mem->bus.offset,
mem->bus.size);
else
mem->bus.addr =
ioremap_nocache(mem->bus.base + mem->bus.offset,
mem->bus.size);
if (!mem->bus.addr)
return -ENOMEM;
/*
* Alpha: Use just the bus offset plus
* the hose/domain memory base for bus.base.
* It then can be used to build PTEs for VRAM
* access, as done in ttm_bo_vm_fault().
*/
mem->bus.base = (mem->bus.base & 0x0ffffffffUL) +
adev->ddev->hose->dense_mem_base;
-#endif break; default: return -EINVAL;
Maybe leave an #error line, or make AMDGPU depend on !ALPHA in Kconfig, to prevent somebody from trying this driver on an Alpha machine, and it mysteriously failing due to the lack of this?
Either way,
Acked-by: Michel Dänzer michel.daenzer@amd.com
Does this code even work on alpha (or compile for that matter)?
If it doesn't compile, that makes it obvious to somebody who tries compiling it on Alpha that there's something wrong. Whereas if we just remove it, the driver might build but probably won't work.
Am 31.03.2017 um 03:07 schrieb Michel Dänzer:
On 30/03/17 10:09 PM, Alex Deucher wrote:
On Thu, Mar 30, 2017 at 2:39 AM, Michel Dänzer michel@daenzer.net wrote:
On 29/03/17 09:55 PM, Christian König wrote:
From: Christian König christian.koenig@amd.com
We will probably never see this combination.
Signed-off-by: Christian König christian.koenig@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 25 ------------------------- 1 file changed, 25 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 7bf5ba7..524abca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -538,31 +538,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_ return -EINVAL; mem->bus.base = adev->mc.aper_base; mem->bus.is_iomem = true; -#ifdef __alpha__
/*
* Alpha: use bus.addr to hold the ioremap() return,
* so we can modify bus.base below.
*/
if (mem->placement & TTM_PL_FLAG_WC)
mem->bus.addr =
ioremap_wc(mem->bus.base + mem->bus.offset,
mem->bus.size);
else
mem->bus.addr =
ioremap_nocache(mem->bus.base + mem->bus.offset,
mem->bus.size);
if (!mem->bus.addr)
return -ENOMEM;
/*
* Alpha: Use just the bus offset plus
* the hose/domain memory base for bus.base.
* It then can be used to build PTEs for VRAM
* access, as done in ttm_bo_vm_fault().
*/
mem->bus.base = (mem->bus.base & 0x0ffffffffUL) +
adev->ddev->hose->dense_mem_base;
-#endif break; default: return -EINVAL;
Maybe leave an #error line, or make AMDGPU depend on !ALPHA in Kconfig, to prevent somebody from trying this driver on an Alpha machine, and it mysteriously failing due to the lack of this?
Either way,
Acked-by: Michel Dänzer michel.daenzer@amd.com
Does this code even work on alpha (or compile for that matter)?
If it doesn't compile, that makes it obvious to somebody who tries compiling it on Alpha that there's something wrong. Whereas if we just remove it, the driver might build but probably won't work.
According to Wikipedia the last Alpha was build in 2004, the first GCN 1 hardware we support shipped in 2014.
That's a decade between those and I have strong doubts that any Alpha board has physically PCIe compatible slots.
Anyway, I will just add a !ALPHA to Kconfig.
Christian.
On 31/03/17 04:09 PM, Christian König wrote:
Am 31.03.2017 um 03:07 schrieb Michel Dänzer:
On 30/03/17 10:09 PM, Alex Deucher wrote:
On Thu, Mar 30, 2017 at 2:39 AM, Michel Dänzer michel@daenzer.net wrote:
On 29/03/17 09:55 PM, Christian König wrote:
From: Christian König christian.koenig@amd.com
We will probably never see this combination.
Signed-off-by: Christian König christian.koenig@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 25
1 file changed, 25 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 7bf5ba7..524abca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -538,31 +538,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_ return -EINVAL; mem->bus.base = adev->mc.aper_base; mem->bus.is_iomem = true; -#ifdef __alpha__
/*
* Alpha: use bus.addr to hold the ioremap() return,
* so we can modify bus.base below.
*/
if (mem->placement & TTM_PL_FLAG_WC)
mem->bus.addr =
ioremap_wc(mem->bus.base +
mem->bus.offset,
mem->bus.size);
else
mem->bus.addr =
ioremap_nocache(mem->bus.base +
mem->bus.offset,
mem->bus.size);
if (!mem->bus.addr)
return -ENOMEM;
/*
* Alpha: Use just the bus offset plus
* the hose/domain memory base for bus.base.
* It then can be used to build PTEs for VRAM
* access, as done in ttm_bo_vm_fault().
*/
mem->bus.base = (mem->bus.base & 0x0ffffffffUL) +
adev->ddev->hose->dense_mem_base;
-#endif break; default: return -EINVAL;
Maybe leave an #error line, or make AMDGPU depend on !ALPHA in Kconfig, to prevent somebody from trying this driver on an Alpha machine, and it mysteriously failing due to the lack of this?
Either way,
Acked-by: Michel Dänzer michel.daenzer@amd.com
Does this code even work on alpha (or compile for that matter)?
If it doesn't compile, that makes it obvious to somebody who tries compiling it on Alpha that there's something wrong. Whereas if we just remove it, the driver might build but probably won't work.
According to Wikipedia the last Alpha was build in 2004, the first GCN 1 hardware we support shipped in 2014.
That's a decade between those and I have strong doubts that any Alpha board has physically PCIe compatible slots.
That's a good point about PCIe.
git grep -i PCIe arch/alpha
in the kernel tree doesn't turn up anything.
Anyway, I will just add a !ALPHA to Kconfig.
You've convinced me it's not necessary. The patch is
Reviewed-by: Michel Dänzer michel.daenzer@amd.com
as is.
dri-devel@lists.freedesktop.org