All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Ken Wang <Qingqing.Wang@amd.com>
Subject: [PATCH 12/17] drm/amdgpu: add si specific logic into the device initialize function v2
Date: Sat, 14 May 2016 15:26:24 -0400	[thread overview]
Message-ID: <1463253989-28924-13-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1463253989-28924-1-git-send-email-alexander.deucher@amd.com>

From: Ken Wang <Qingqing.Wang@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index c335538..d269740 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -52,6 +52,11 @@ static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev);
 static void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev);
 
 static const char *amdgpu_asic_name[] = {
+	"TAHITI",
+	"PITCAIRN",
+	"VERDE",
+	"OLAND",
+	"HAINAN",
 	"BONAIRE",
 	"KAVERI",
 	"KABINI",
@@ -1467,8 +1472,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	spin_lock_init(&adev->didt_idx_lock);
 	spin_lock_init(&adev->audio_endpt_idx_lock);
 
-	adev->rmmio_base = pci_resource_start(adev->pdev, 5);
-	adev->rmmio_size = pci_resource_len(adev->pdev, 5);
+	if (adev->asic_type >= CHIP_BONAIRE) {
+		adev->rmmio_base = pci_resource_start(adev->pdev, 5);
+		adev->rmmio_size = pci_resource_len(adev->pdev, 5);
+	} else {
+		adev->rmmio_base = pci_resource_start(adev->pdev, 2);
+		adev->rmmio_size = pci_resource_len(adev->pdev, 2);
+	}
 	adev->rmmio = ioremap(adev->rmmio_base, adev->rmmio_size);
 	if (adev->rmmio == NULL) {
 		return -ENOMEM;
@@ -1476,8 +1486,10 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	DRM_INFO("register mmio base: 0x%08X\n", (uint32_t)adev->rmmio_base);
 	DRM_INFO("register mmio size: %u\n", (unsigned)adev->rmmio_size);
 
-	/* doorbell bar mapping */
-	amdgpu_doorbell_init(adev);
+	if (adev->asic_type >= CHIP_BONAIRE) {
+		/* doorbell bar mapping */
+		amdgpu_doorbell_init(adev);
+	}
 
 	/* io port mapping */
 	for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
-- 
2.5.5

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-05-14 19:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-14 19:26 [PATCH 00/17] SI support for amdgpu Alex Deucher
2016-05-14 19:26 ` [PATCH 01/17] drm/amdgpu: add SI asics types v2 Alex Deucher
2016-05-14 19:26 ` [PATCH 02/17] drm/amdgpu: add si header files v3 Alex Deucher
2016-05-14 19:26 ` [PATCH 03/17] drm/amdgpu: add graphic memory controller implementation for si v5 Alex Deucher
2016-05-14 19:26 ` [PATCH 04/17] drm/amdgpu: add interupt handler implementation for si v3 Alex Deucher
2016-05-14 19:26 ` [PATCH 05/17] drm/amdgpu: add display controller implementation for si v7 Alex Deucher
2016-05-14 19:26 ` [PATCH 06/17] drm/amdgpu: atombios change for dce6 to work v3 Alex Deucher
2016-05-14 19:26 ` [PATCH 07/17] drm/amdgpu: add graphic pipeline implementation for si v6 Alex Deucher
2016-05-14 19:26 ` [PATCH 08/17] drm/amdgpu: add DMA " Alex Deucher
2016-05-14 19:26 ` [PATCH 09/17] drm/amdgpu: add si implementation v7 Alex Deucher
2016-05-14 19:26 ` [PATCH 10/17] drm/amdgpu: add all the components for si into Makefile/kconfig v3 Alex Deucher
2016-05-14 19:26 ` [PATCH 11/17] drm/amdgpu: add si ip blocks setup v3 Alex Deucher
2016-05-14 19:26 ` Alex Deucher [this message]
2016-05-14 19:26 ` [PATCH 13/17] drm/amdgpu: add si pciids v2 Alex Deucher
2016-05-14 19:26 ` [PATCH 14/17] drm/amdgpu: add si dpm support in amdgpu_atombios Alex Deucher
2016-05-14 19:26 ` [PATCH 15/17] drm/amdgpu: add SI SMC support Alex Deucher
2016-05-14 19:26 ` [PATCH 16/17] drm/amdgpu: add SI DPM support (v3) Alex Deucher
2016-05-14 19:26 ` [PATCH 17/17] drm/amdgpu: enable SI DPM Alex Deucher
2016-05-17  7:01 ` [PATCH 00/17] SI support for amdgpu Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463253989-28924-13-git-send-email-alexander.deucher@amd.com \
    --to=alexdeucher@gmail.com \
    --cc=Qingqing.Wang@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.