[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180918230637.20700-7-lyude@redhat.com>
Date: Tue, 18 Sep 2018 19:06:22 -0400
From: Lyude Paul <lyude@...hat.com>
To: dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org, amd-gfx@...ts.freedesktop.org
Cc: Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"David (ChunMing) Zhou" <David1.Zhou@....com>,
David Airlie <airlied@...ux.ie>,
"Jerry (Fangzhi) Zuo" <Jerry.Zuo@....com>,
Roman Li <Roman.Li@....com>, Tony Cheng <Tony.Cheng@....com>,
Andrey Grodzovsky <Andrey.Grodzovsky@....com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
linux-kernel@...r.kernel.org
Subject: [PATCH 6/6] drm/amdgpu/dm/mst: Use drm_dp_mst_connector_atomic_check()
Hook this into amdgpu's atomic check for their connectors so they never
get modesets on no-longer-present MST connectors. We'll also expand on
this later once we add DP MST fallback retraining support.
As well, turns out that the only atomic DRM driver without the
->best_encoder() bug is amdgpu. Congrats AMD!
Signed-off-by: Lyude Paul <lyude@...hat.com>
---
.../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 9a300732ba37..d011a39f17b2 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -294,10 +294,22 @@ static struct drm_encoder *dm_mst_best_encoder(struct drm_connector *connector)
return &amdgpu_dm_connector->mst_encoder->base;
}
+static int
+amdgpu_dm_mst_connector_atomic_check(struct drm_connector *connector,
+ struct drm_connector_state *new_cstate)
+{
+ struct amdgpu_dm_connector *aconnector =
+ to_amdgpu_dm_connector(connector);
+
+ return drm_dp_mst_connector_atomic_check(connector, new_cstate,
+ &aconnector->mst_mgr);
+}
+
static const struct drm_connector_helper_funcs dm_dp_mst_connector_helper_funcs = {
.get_modes = dm_dp_mst_get_modes,
.mode_valid = amdgpu_dm_connector_mode_valid,
.best_encoder = dm_mst_best_encoder,
+ .atomic_check = amdgpu_dm_mst_connector_atomic_check,
};
static void amdgpu_dm_encoder_destroy(struct drm_encoder *encoder)
--
2.17.1
Powered by blists - more mailing lists