Skip to content
Snippets Groups Projects
Commit ac64281d authored by Bob Zhou's avatar Bob Zhou Committed by Kent Russell
Browse files

drm/amdkcl: test whether drm_dp_mst_topology_cbs->poll_hpd_irq is available


It's caused by ed849680
"drm/amd/display: Add polling method to handle MST reply packet"

Signed-off-by: default avatarBob Zhou <bob.zhou@amd.com>
Reviewed-by: default avatarLeslie Shi <Yuliang.Shi@amd.com>
parent be1c96a9
No related merge requests found
...@@ -863,14 +863,18 @@ void dm_handle_mst_sideband_msg_ready_event( ...@@ -863,14 +863,18 @@ void dm_handle_mst_sideband_msg_ready_event(
DRM_DEBUG_DRIVER("Loop exceeded max iterations\n"); DRM_DEBUG_DRIVER("Loop exceeded max iterations\n");
} }
#ifdef HAVE_DRM_DP_MST_TOPOLOGY_CBS_POLL_HPD_IRQ
static void dm_handle_mst_down_rep_msg_ready(struct drm_dp_mst_topology_mgr *mgr) static void dm_handle_mst_down_rep_msg_ready(struct drm_dp_mst_topology_mgr *mgr)
{ {
dm_handle_mst_sideband_msg_ready_event(mgr, DOWN_REP_MSG_RDY_EVENT); dm_handle_mst_sideband_msg_ready_event(mgr, DOWN_REP_MSG_RDY_EVENT);
} }
#endif
static const struct drm_dp_mst_topology_cbs dm_mst_cbs = { static const struct drm_dp_mst_topology_cbs dm_mst_cbs = {
.add_connector = dm_dp_add_mst_connector, .add_connector = dm_dp_add_mst_connector,
#ifdef HAVE_DRM_DP_MST_TOPOLOGY_CBS_POLL_HPD_IRQ
.poll_hpd_irq = dm_handle_mst_down_rep_msg_ready, .poll_hpd_irq = dm_handle_mst_down_rep_msg_ready,
#endif
#ifdef HAVE_DRM_DP_MST_TOPOLOGY_CBS_DESTROY_CONNECTOR #ifdef HAVE_DRM_DP_MST_TOPOLOGY_CBS_DESTROY_CONNECTOR
.destroy_connector = dm_dp_destroy_mst_connector, .destroy_connector = dm_dp_destroy_mst_connector,
#endif #endif
......
...@@ -332,6 +332,9 @@ ...@@ -332,6 +332,9 @@
/* struct drm_dp_mst_topology_cbs has hotplug member */ /* struct drm_dp_mst_topology_cbs has hotplug member */
/* #undef HAVE_DRM_DP_MST_TOPOLOGY_CBS_HOTPLUG */ /* #undef HAVE_DRM_DP_MST_TOPOLOGY_CBS_HOTPLUG */
/* struct drm_dp_mst_topology_cbs->poll_hpd_irq is available */
#define HAVE_DRM_DP_MST_TOPOLOGY_CBS_POLL_HPD_IRQ 1
/* struct drm_dp_mst_topology_cbs->register_connector is available */ /* struct drm_dp_mst_topology_cbs->register_connector is available */
/* #undef HAVE_DRM_DP_MST_TOPOLOGY_CBS_REGISTER_CONNECTOR */ /* #undef HAVE_DRM_DP_MST_TOPOLOGY_CBS_REGISTER_CONNECTOR */
......
...@@ -68,10 +68,33 @@ AC_DEFUN([AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS_DESTROY_CONNECTOR], [ ...@@ -68,10 +68,33 @@ AC_DEFUN([AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS_DESTROY_CONNECTOR], [
]) ])
]) ])
dnl #
dnl # commit v5.7-rc1-646-g471bdd0df0d5
dnl # drm/i915/dp_mst: Work around out-of-spec adapters filtering short pulses
dnl #
AC_DEFUN([AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS_POLL_HPD_IRQ], [
AC_KERNEL_TRY_COMPILE([
#if defined(HAVE_DRM_DISPLAY_DRM_DP_MST_HELPER_H)
#include <drm/display/drm_dp_mst_helper.h>
#elif defined(HAVE_DRM_DP_DRM_DP_MST_HELPER_H)
#include <drm/dp/drm_dp_mst_helper.h>
#else
#include <drm/drm_dp_mst_helper.h>
#endif
], [
struct drm_dp_mst_topology_cbs *dp_mst_cbs = NULL;
dp_mst_cbs->poll_hpd_irq(NULL);
], [
AC_DEFINE(HAVE_DRM_DP_MST_TOPOLOGY_CBS_POLL_HPD_IRQ, 1,
[struct drm_dp_mst_topology_cbs->poll_hpd_irq is available])
])
])
AC_DEFUN([AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS], [ AC_DEFUN([AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS], [
AC_KERNEL_DO_BACKGROUND([ AC_KERNEL_DO_BACKGROUND([
AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS_HOTPLUG AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS_HOTPLUG
AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS_REGISTER_CONNECTOR AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS_REGISTER_CONNECTOR
AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS_DESTROY_CONNECTOR AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS_DESTROY_CONNECTOR
AC_AMDGPU_DRM_DP_MST_TOPOLOGY_CBS_POLL_HPD_IRQ
]) ])
]) ])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment