dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 08/52] drm/amdgpu/atom: add support for new UNIPHYTransmitterContol cmd table
Date: Wed, 23 Mar 2016 13:42:24 -0400	[thread overview]
Message-ID: <1458754988-16222-9-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1458754988-16222-1-git-send-email-alexander.deucher@amd.com>

New uniphy transmitter setup table for elm/baf.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/atombios_encoders.c | 51 +++++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
index 213103c..a873780 100644
--- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
+++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
@@ -752,11 +752,12 @@ union dig_transmitter_control {
 	DIG_TRANSMITTER_CONTROL_PARAMETERS_V3 v3;
 	DIG_TRANSMITTER_CONTROL_PARAMETERS_V4 v4;
 	DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5 v5;
+	DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_6 v6;
 };
 
 void
 amdgpu_atombios_encoder_setup_dig_transmitter(struct drm_encoder *encoder, int action,
-				       uint8_t lane_num, uint8_t lane_set)
+					      uint8_t lane_num, uint8_t lane_set)
 {
 	struct drm_device *dev = encoder->dev;
 	struct amdgpu_device *adev = dev->dev_private;
@@ -1108,6 +1109,54 @@ amdgpu_atombios_encoder_setup_dig_transmitter(struct drm_encoder *encoder, int a
 			args.v5.ucDigEncoderSel = 1 << dig_encoder;
 			args.v5.ucDPLaneSet = lane_set;
 			break;
+		case 6:
+			args.v6.ucAction = action;
+			if (is_dp)
+				args.v6.ulSymClock = cpu_to_le32(dp_clock / 10);
+			else
+				args.v6.ulSymClock = cpu_to_le32(amdgpu_encoder->pixel_clock / 10);
+
+			switch (amdgpu_encoder->encoder_id) {
+			case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
+				if (dig->linkb)
+					args.v6.ucPhyId = ATOM_PHY_ID_UNIPHYB;
+				else
+					args.v6.ucPhyId = ATOM_PHY_ID_UNIPHYA;
+				break;
+			case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
+				if (dig->linkb)
+					args.v6.ucPhyId = ATOM_PHY_ID_UNIPHYD;
+				else
+					args.v6.ucPhyId = ATOM_PHY_ID_UNIPHYC;
+				break;
+			case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
+				if (dig->linkb)
+					args.v6.ucPhyId = ATOM_PHY_ID_UNIPHYF;
+				else
+					args.v6.ucPhyId = ATOM_PHY_ID_UNIPHYE;
+				break;
+			case ENCODER_OBJECT_ID_INTERNAL_UNIPHY3:
+				args.v6.ucPhyId = ATOM_PHY_ID_UNIPHYG;
+				break;
+			}
+			if (is_dp)
+				args.v6.ucLaneNum = dp_lane_count;
+			else if (amdgpu_dig_monitor_is_duallink(encoder, amdgpu_encoder->pixel_clock))
+				args.v6.ucLaneNum = 8;
+			else
+				args.v6.ucLaneNum = 4;
+			args.v6.ucConnObjId = connector_object_id;
+			if (action == ATOM_TRANSMITTER_ACTION_SETUP_VSEMPH)
+				args.v6.ucDPLaneSet = lane_set;
+			else
+				args.v6.ucDigMode = amdgpu_atombios_encoder_get_encoder_mode(encoder);
+
+			if (hpd_id == AMDGPU_HPD_NONE)
+				args.v6.ucHPDSel = 0;
+			else
+				args.v6.ucHPDSel = hpd_id + 1;
+			args.v6.ucDigEncoderSel = 1 << dig_encoder;
+			break;
 		default:
 			DRM_ERROR("Unknown table version %d, %d\n", frev, crev);
 			break;
-- 
2.5.0

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

  parent reply	other threads:[~2016-03-23 17:43 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 17:42 [PATCH 00/52] amdgpu Polaris support Alex Deucher
2016-03-23 17:42 ` [PATCH 02/52] drm/amdgpu: add ELM/BAF asic types Alex Deucher
2016-03-23 17:42 ` [PATCH 03/52] drm/amdgpu: add ELM/BAF DCE11 configs Alex Deucher
2016-03-23 17:42 ` [PATCH 04/52] drm/amdgpu: update atombios.h (v2) Alex Deucher
2016-03-23 17:42 ` [PATCH 05/52] drm/amdgpu/atom: add SetDCEClock helper Alex Deucher
2016-03-23 17:42 ` [PATCH 06/52] drm/amdgpu/atom: add support for new SetPixelClock table Alex Deucher
2016-03-23 17:42 ` [PATCH 07/52] drm/amdgpu/atom: add support for new DIGxEncoderControl cmd table Alex Deucher
2016-03-23 17:42 ` Alex Deucher [this message]
2016-03-23 17:42 ` [PATCH 09/52] drm/amdgpu: add ELM/BAF support to dce_v11_0_pick_pll Alex Deucher
2016-03-23 17:42 ` [PATCH 10/52] drm/amdgpu/dce11: update pll programming for ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 11/52] drm/amdgpu/dce11: add dce clock setting " Alex Deucher
2016-03-23 17:42 ` [PATCH 12/52] drm/amdgpu: add GMC support " Alex Deucher
2016-03-23 17:42 ` [PATCH 13/52] drm/amdgpu: add DCE golden setting " Alex Deucher
2016-03-23 17:42 ` [PATCH 14/52] drm/amdgpu: add SDMA support " Alex Deucher
2016-03-23 17:42 ` [PATCH 15/52] drm/amdgpu: add an interface to get gfx constants from atombios Alex Deucher
2016-03-23 17:42 ` [PATCH 16/52] drm/amdgpu: add mmRLC_CGCG_CGLS_CTRL_3D & mmRLC_CGCG_RAMP_CTRL_3D Alex Deucher
2016-03-23 17:42 ` [PATCH 17/52] drm/amdgpu: add GFX support for ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 18/52] drm/amdgpu: add UVD " Alex Deucher
2016-03-23 17:42 ` [PATCH 19/52] drm/amdgpu: add VCE support to ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 20/52] drm/amd/powerplay: add header files for ellesmere smu manager Alex Deucher
2016-03-23 17:42 ` [PATCH 21/52] drm/amd/powerplay: add smu support for ellesmere/baffin Alex Deucher
2016-03-23 17:42 ` [PATCH 22/52] drm/amd/powerplay: enable dpm for baffin Alex Deucher
2016-03-24  1:03   ` Vasily Anonimov
2016-03-23 17:42 ` [PATCH 23/52] drm/amd/powerplay: init hwmgr for ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 24/52] drm/amd/powerplay: enable powerplay for baffin Alex Deucher
2016-03-23 17:42 ` [PATCH 25/52] drm/amd/powerplay: add thermal control for elm/baf Alex Deucher
2016-03-23 17:42 ` [PATCH 26/52] drm/amd/powerplay: add UVD&VCE DPM and powergating support " Alex Deucher
2016-03-23 17:42 ` [PATCH 27/52] drm/amd/amdgpu: Add smc_sk firmware in baffin & ellesmere Alex Deucher
2016-03-23 17:42 ` [PATCH 28/52] drm/amd/powerplay: Add smc_sk firmware to " Alex Deucher
2016-03-23 17:42 ` [PATCH 29/52] drm/amd/powerplay: update baffin & ellesmere smc_sk firmware Alex Deucher
2016-03-23 17:42 ` [PATCH 30/52] drm/amd/powerplay: add all blocks clockgating support through SMU/powerplay Alex Deucher
2016-03-23 17:42 ` [PATCH 31/52] drm/amd/powerplay: add GFX/SYS clockgating support for ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 32/52] drm/amd/amdgpu: add query GFX cu info in CGS query system info Alex Deucher
2016-03-23 17:42 ` [PATCH 33/52] drm/amd/powerplay: add GFX per cu powergating support through SMU/powerplay Alex Deucher
2016-03-23 17:42 ` [PATCH 34/52] drm/amd/powerplay: add GFX per cu powergating for Baffin Alex Deucher
2016-03-23 17:42 ` [PATCH 35/52] drm/amd/amdgpu: add medium grain powergating support " Alex Deucher
2016-03-23 17:42 ` [PATCH 36/52] drm/amd/powerplay: add default clockgating handling Alex Deucher
2016-03-23 17:42 ` [PATCH 37/52] drm/amd/amdgpu: add power gating initialization support for GFX8.0 Alex Deucher
2016-03-23 17:42 ` [PATCH 38/52] drm/amd/amdgpu: add power gating init for Baffin Alex Deucher
2016-03-23 17:42 ` [PATCH 39/52] drm/amdgpu: ungate SMC clockgating first before suspend Alex Deucher
2016-03-23 17:42 ` [PATCH 40/52] drm/amdgpu: update the core VI support for ELM/BAF Alex Deucher
2016-03-23 17:42 ` [PATCH 41/52] drm/amdgpu: add ELM/BAF pci ids Alex Deucher
2016-03-23 17:42 ` [PATCH 43/52] drm/amd/powerplay: print gpu loading and uvd/vce power gate enablement for polaris10/11 Alex Deucher
2016-03-23 17:43 ` [PATCH 44/52] drm/amd/powerplay: fix mclk in high clock for baffin Alex Deucher
2016-03-23 17:43 ` [PATCH 45/52] drm/amd/powrplay: fix issue that get wrong enable flag Alex Deucher
2016-03-23 17:43 ` [PATCH 46/52] drm/amd/powerplay: enable set lowest mclk clock on baffin Alex Deucher
2016-03-23 17:43 ` [PATCH 47/52] drm/amd/powerplay: Disable Spread Spectrum on DPM 0 on baffin as SPLL Shut Down feature is enabled Alex Deucher
2016-03-23 17:43 ` [PATCH 48/52] drm/amdgpu: add polaris10/11 smc fw declaration Alex Deucher
2016-03-23 17:43 ` [PATCH 49/52] drm/amd/dal: add core support for Polaris family (v2) Alex Deucher
2016-03-23 17:43 ` [PATCH 50/52] drm/amd/dal/dm: add polaris support Alex Deucher
2016-03-23 17:43 ` [PATCH 51/52] drm/amdgpu: add dal support for polaris Alex Deucher
2016-03-23 17:43 ` [PATCH 52/52] drm/amd/dal: Enable Polaris support in the Kconfig Alex Deucher

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=1458754988-16222-9-git-send-email-alexander.deucher@amd.com \
    --to=alexdeucher@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).