summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Teng <rui.teng@amd.com>2019-10-21 10:14:40 +0800
committerRui Teng <rui.teng@amd.com>2019-10-21 18:24:56 +0800
commit97e9a34a1b834eeac3acc0707f17dbbd3b71da7d (patch)
treee1498ed2882751c2096968cb772ede8a1333a5b1
parente160cf5117c59b8dad295451aef4c4ed760e25f8 (diff)
drm/amd/autoconf: Test whether drm_hdmi_vendor_infoframe_from_display_mode() wants 2 args
Signed-off-by: Rui Teng <rui.teng@amd.com> Reviewed-by: Flora Cui <flora.cui@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c4
-rw-r--r--drivers/gpu/drm/amd/dkms/configure.ac1
-rw-r--r--drivers/gpu/drm/amd/dkms/m4/drm-hdmi-vendor-infoframe-from-display-mode.m416
-rw-r--r--drivers/gpu/drm/amd/dkms/m4/kernel.m41
4 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 10233187e165..5c170fff0f18 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3847,7 +3847,11 @@ static void fill_stream_properties_from_drm_display_mode(
drm_hdmi_avi_infoframe_from_display_mode(&avi_frame, mode_in, false);
#endif
timing_out->vic = avi_frame.video_code;
+#if defined(HAVE_2ARGS_DRM_HDMI_VENDOR_INFOFRAME_FROM_DISPLAY_MODE)
+ drm_hdmi_vendor_infoframe_from_display_mode(&hv_frame, mode_in);
+#else
drm_hdmi_vendor_infoframe_from_display_mode(&hv_frame, (struct drm_connector *)connector, mode_in);
+#endif
timing_out->hdmi_vic = hv_frame.vic;
}
diff --git a/drivers/gpu/drm/amd/dkms/configure.ac b/drivers/gpu/drm/amd/dkms/configure.ac
index ac2b503236b2..5af08ec256f5 100644
--- a/drivers/gpu/drm/amd/dkms/configure.ac
+++ b/drivers/gpu/drm/amd/dkms/configure.ac
@@ -86,6 +86,7 @@ m4_include([m4/drm-atomic-helper-connector-reset.m4])
m4_include([m4/drm-encoder-find-valid-with-file.m4])
m4_include([m4/drm-atomic-helper-best-encoder.m4])
m4_include([m4/drm-hdmi-avi-infoframe-from-display-mode.m4])
+m4_include([m4/drm-hdmi-vendor-infoframe-from-display-mode.m4])
m4_include([m4/drm-set-crc-source.m4])
m4_include([m4/drm-dp-cec-correlation-functions.m4])
m4_include([m4/drm-connector-put.m4])
diff --git a/drivers/gpu/drm/amd/dkms/m4/drm-hdmi-vendor-infoframe-from-display-mode.m4 b/drivers/gpu/drm/amd/dkms/m4/drm-hdmi-vendor-infoframe-from-display-mode.m4
new file mode 100644
index 000000000000..6a9dcace6c9a
--- /dev/null
+++ b/drivers/gpu/drm/amd/dkms/m4/drm-hdmi-vendor-infoframe-from-display-mode.m4
@@ -0,0 +1,16 @@
+dnl f1781e9bb2dd2305d8d7ffbede1888ae22119557
+dnl # drm/edid: Allow HDMI infoframe without VIC or S3D
+dnl #
+AC_DEFUN([AC_AMDGPU_2ARGS_DRM_HDMI_VENDOR_INFOFRAME_FROM_DISPLAY_MODE],
+ [AC_MSG_CHECKING([whether drm_hdmi_vendor_infoframe_from_display_mode() wants 2 args])
+ AC_KERNEL_TRY_COMPILE_SYMBOL([
+ #include <drm/drm_edid.h>
+ ], [
+ drm_hdmi_vendor_infoframe_from_display_mode(NULL, 0);
+ ], [drm_hdmi_vendor_infoframe_from_display_mode], [drivers/gpu/drm/drm_edid.c], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_2ARGS_DRM_HDMI_VENDOR_INFOFRAME_FROM_DISPLAY_MODE, 1, [drm_hdmi_vendor_infoframe_from_display_mode() wants 2 args])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+])
diff --git a/drivers/gpu/drm/amd/dkms/m4/kernel.m4 b/drivers/gpu/drm/amd/dkms/m4/kernel.m4
index 9af54ef27038..637e61d1068e 100644
--- a/drivers/gpu/drm/amd/dkms/m4/kernel.m4
+++ b/drivers/gpu/drm/amd/dkms/m4/kernel.m4
@@ -87,6 +87,7 @@ AC_DEFUN([AC_CONFIG_KERNEL], [
AC_AMDGPU_DRM_ENCODER_FIND_VALID_WITH_FILE
AC_AMDGPU_DRM_ATOMIC_HELPER_BEST_ENCODER
AC_AMDGPU_2ARGS_DRM_HDMI_AVI_INFOFRAME_FROM_DISPLAY_MODE
+ AC_AMDGPU_2ARGS_DRM_HDMI_VENDOR_INFOFRAME_FROM_DISPLAY_MODE
AC_AMDGPU_2ARGS_SET_CRC_SOURCE
AC_AMDGPU_DRM_DP_CEC_CORRELATION_FUNCTIONS
AC_AMDGPU_DRM_CONNECTOR_PUT