AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Rossi <issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: mike-4+n8WJKc9ve9FHfhHBbuYA@public.gmane.org,
	ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Mauro Rossi <issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	sylvain.bertrand-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	alexander.deucher-5C7GfCeVMHo@public.gmane.org,
	harry.wentland-5C7GfCeVMHo@public.gmane.org
Subject: [PATCH v2 09/10] drm/amdgpu: enable DC support for SI parts (v2)
Date: Wed, 17 Oct 2018 10:35:12 +0200	[thread overview]
Message-ID: <20181017083513.20913-10-issor.oruam@gmail.com> (raw)
In-Reply-To: <20181017083513.20913-1-issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

This commit enables DC support and Display Manager IP block
conditionally to CONFIG_DRM_AMD_DC_SI kernel configuration

(v1) pre-requisite to have Kaveri and Hawaii is revert of d9fda24804
     ("drm/amdgpu: Don't default to DC support for Kaveri and older")

(v2) fix for bc011f9350 ("drm/amdgpu: Change SI/CI gfx/sdma/smu init sequence")
     remove CHIP_HAINAN support since it does not have physical DCE6 module
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |  6 ++++++
 drivers/gpu/drm/amd/amdgpu/si.c            | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 27de8442e808..2d17d760af64 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2290,6 +2290,12 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
 {
 	switch (asic_type) {
 #if defined(CONFIG_DRM_AMD_DC)
+#if defined(CONFIG_DRM_AMD_DC_SI)
+	case CHIP_TAHITI:
+	case CHIP_PITCAIRN:
+	case CHIP_VERDE:
+	case CHIP_OLAND:
+#endif
 	case CHIP_BONAIRE:
 	case CHIP_HAWAII:
 	case CHIP_KAVERI:
diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c
index f8408f88cd37..700d6a914b30 100644
--- a/drivers/gpu/drm/amd/amdgpu/si.c
+++ b/drivers/gpu/drm/amd/amdgpu/si.c
@@ -48,6 +48,8 @@
 #include "uvd/uvd_4_0_d.h"
 #include "bif/bif_3_0_d.h"
 
+#include "amdgpu_dm.h"
+
 static const u32 tahiti_golden_registers[] =
 {
 	mmAZALIA_SCLK_CONTROL, 0x00000030, 0x00000011,
@@ -2062,6 +2064,10 @@ int si_set_ip_blocks(struct amdgpu_device *adev)
 		amdgpu_device_ip_block_add(adev, &si_smu_ip_block);
 		if (adev->enable_virtual_display)
 			amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
+#if defined(CONFIG_DRM_AMD_DC) && defined(CONFIG_DRM_AMD_DC_SI)
+		else if (amdgpu_device_has_dc_support(adev))
+			amdgpu_device_ip_block_add(adev, &dm_ip_block);
+#endif
 		else
 			amdgpu_device_ip_block_add(adev, &dce_v6_0_ip_block);
 		/* amdgpu_device_ip_block_add(adev, &uvd_v3_1_ip_block); */
@@ -2076,6 +2082,10 @@ int si_set_ip_blocks(struct amdgpu_device *adev)
 		amdgpu_device_ip_block_add(adev, &si_smu_ip_block);
 		if (adev->enable_virtual_display)
 			amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
+#if defined(CONFIG_DRM_AMD_DC) && defined(CONFIG_DRM_AMD_DC_SI)
+		else if (amdgpu_device_has_dc_support(adev))
+			amdgpu_device_ip_block_add(adev, &dm_ip_block);
+#endif
 		else
 			amdgpu_device_ip_block_add(adev, &dce_v6_4_ip_block);
 
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-10-17  8:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17  8:35 [PATCH v2] drm/amd/display: add SI support to AMD DC Mauro Rossi
     [not found] ` <20181017083513.20913-1-issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-17  8:35   ` [PATCH v2 01/10] drm/amd/display: add asics info for SI parts Mauro Rossi
2018-10-17  8:35   ` [PATCH v2 02/10] drm/amd/display: dc/dce: add DCE6 support (v2) Mauro Rossi
     [not found]     ` <20181017083513.20913-3-issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-17 19:47       ` Wentland, Harry
     [not found]         ` <a5028d9a-c12c-6856-f4ed-a602783a85a7-5C7GfCeVMHo@public.gmane.org>
2018-10-27  9:55           ` Mauro Rossi
2019-02-08 16:43           ` Mauro Rossi
2018-10-17  8:35   ` [PATCH v2 03/10] drm/amd/display: dc/core: add DCE6 support Mauro Rossi
     [not found]     ` <20181017083513.20913-4-issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-17 19:50       ` Wentland, Harry
     [not found]         ` <c7882ed4-9a83-8838-8966-c1f725fa4a18-5C7GfCeVMHo@public.gmane.org>
2018-10-17 19:53           ` Wentland, Harry
2018-10-17  8:35   ` [PATCH v2 04/10] drm/amd/display: dc/bios: add support for DCE6 Mauro Rossi
     [not found]     ` <20181017083513.20913-5-issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-17 19:53       ` Wentland, Harry
     [not found]         ` <4366d902-ebd2-50ac-9f6c-ba14da12f084-5C7GfCeVMHo@public.gmane.org>
2018-10-17 20:10           ` Alex Deucher
     [not found]             ` <CADnq5_PeTsiUnqZ+MOA8h6_rzD+d_fn1uv+Z0sOUNXJabUnwCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-10-17 20:16               ` Wentland, Harry
     [not found]                 ` <ee9d5e75-798d-8277-0bda-402056706de5-5C7GfCeVMHo@public.gmane.org>
2018-10-17 20:42                   ` Alex Deucher
     [not found]                     ` <CADnq5_M0+N91dYW7v5XftPsBVxVb-t36=8x4EOrnjZDfheDiZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-10-17 21:14                       ` Wentland, Harry
2018-10-17  8:35   ` [PATCH v2 05/10] drm/amd/display: dc/gpio: " Mauro Rossi
2018-10-17  8:35   ` [PATCH v2 06/10] drm/amd/display: dc/i2caux: " Mauro Rossi
2018-10-17  8:35   ` [PATCH v2 07/10] drm/amd/display: dc/irq: " Mauro Rossi
     [not found]     ` <20181017083513.20913-8-issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-17 20:12       ` Wentland, Harry
     [not found]         ` <995415f5-052a-a534-0550-b92a3bee05f6-5C7GfCeVMHo@public.gmane.org>
2019-01-02  0:12           ` [PATCH] WIP: drm/amd/display: dc/irq: use dce_6_0_{d,sh_mask}.h Mauro Rossi
     [not found]             ` <20190102001202.31313-1-issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-01-09 19:07               ` Mauro Rossi
     [not found]                 ` <CAEQFVGZ=T-oE9yeC=apjBgOn1WXxFxzgSy1RVjdnwaQ7buw-Yg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-01-10  1:57                   ` Mauro Rossi
2018-10-17  8:35   ` [PATCH v2 08/10] drm/amd/display: amdgpu_dm: add SI support (v2) Mauro Rossi
2018-10-17  8:35   ` Mauro Rossi [this message]
2018-10-17  8:35   ` [PATCH v2 10/10] drm/amd/display: enable SI support in the Kconfig (v2) Mauro Rossi

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=20181017083513.20913-10-issor.oruam@gmail.com \
    --to=issor.oruam-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=harry.wentland-5C7GfCeVMHo@public.gmane.org \
    --cc=mike-4+n8WJKc9ve9FHfhHBbuYA@public.gmane.org \
    --cc=sylvain.bertrand-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox