Skip to content

Commit

Permalink
drm/amdkcl: kcl-cleanup HAVE_DRM_DP_ATOMIC_FIND_VCPI_SLOTS
Browse files Browse the repository at this point in the history
Change-Id: I6efe8eca91ccfd2c57bbdf72fb7f6289dc443d8b
Signed-off-by: Leslie Shi <Yuliang.Shi@amd.com>
Reviewed-by: Ma Jun <Jun.Ma2@amd.com>
  • Loading branch information
OkabeRintarou authored and bobzhou committed Apr 17, 2023
1 parent 75638e3 commit 8a8ce23
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 31 deletions.
3 changes: 0 additions & 3 deletions drivers/gpu/drm/amd/dkms/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,6 @@
/* drm_dp_mst_atomic_wait_for_dependencies() is available */
/* #undef HAVE_DRM_DP_ATOMIC_WAIT_FOR_DEPENDENCIES */

/* drm_dp_atomic_find_vcpi_slots() is available */
#define HAVE_DRM_DP_ATOMIC_FIND_VCPI_SLOTS 1

/* drm_dp_atomic_release_time_slots() is available */
/* #undef HAVE_DRM_DP_ATOMIC_RELEASE_TIME_SLOTS */

Expand Down
30 changes: 4 additions & 26 deletions drivers/gpu/drm/amd/dkms/m4/drm-dp-atomic-funcs.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dnl # drm/dp: Add DP MST helpers to atomically find and release vcpi slots
dnl #
AC_DEFUN([AC_AMDGPU_DRM_DP_ATOMIC_FIND_VCPI_SLOTS], [
AC_KERNEL_DO_BACKGROUND([
AC_KERNEL_TRY_COMPILE_SYMBOL([
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)
Expand All @@ -14,32 +14,10 @@ AC_DEFUN([AC_AMDGPU_DRM_DP_ATOMIC_FIND_VCPI_SLOTS], [
#endif
], [
int retval;
retval = drm_dp_atomic_find_vcpi_slots(NULL, NULL, NULL, 0);
], [drm_dp_atomic_find_vcpi_slots], [drivers/gpu/drm/drm_dp_mst_topology.c], [
AC_DEFINE(HAVE_DRM_DP_ATOMIC_FIND_VCPI_SLOTS, 1,
[drm_dp_atomic_find_vcpi_slots() is available])
retval = drm_dp_atomic_find_vcpi_slots(NULL, NULL, NULL, 0, 0);
], [
dnl #
dnl # commit dad1c2499a8f6d7ee01db8148f05ebba73cc41bd
dnl # drm/dp_mst: Manually overwrite PBN divider for calculating timeslots
dnl #
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
], [
int retval;
retval = drm_dp_atomic_find_vcpi_slots(NULL, NULL, NULL, 0, 0);
], [
AC_DEFINE(HAVE_DRM_DP_ATOMIC_FIND_VCPI_SLOTS_5ARGS, 1,
[drm_dp_atomic_find_vcpi_slots() wants 5args])
AC_DEFINE(HAVE_DRM_DP_ATOMIC_FIND_VCPI_SLOTS, 1,
[drm_dp_atomic_find_vcpi_slots() is available])
])
AC_DEFINE(HAVE_DRM_DP_ATOMIC_FIND_VCPI_SLOTS_5ARGS, 1,
[drm_dp_atomic_find_vcpi_slots() wants 5args])
])
])
])
Expand Down
2 changes: 0 additions & 2 deletions include/kcl/backport/kcl_drm_dp_mst_helper_backport.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ int _kcl_drm_dp_calc_pbn_mode(int clock, int bpp, bool dsc)
#define drm_dp_calc_pbn_mode _kcl_drm_dp_calc_pbn_mode
#endif

#if defined(HAVE_DRM_DP_ATOMIC_FIND_VCPI_SLOTS)
#if !defined(HAVE_DRM_DP_ATOMIC_FIND_VCPI_SLOTS_5ARGS)
static inline
int _kcl_drm_dp_atomic_find_vcpi_slots(struct drm_atomic_state *state,
Expand All @@ -65,7 +64,6 @@ int _kcl_drm_dp_atomic_find_vcpi_slots(struct drm_atomic_state *state,
}
#define drm_dp_atomic_find_vcpi_slots _kcl_drm_dp_atomic_find_vcpi_slots
#endif /* HAVE_DRM_DP_ATOMIC_FIND_VCPI_SLOTS_5ARGS */
#endif /* HAVE_DRM_DP_ATOMIC_FIND_VCPI_SLOTS */

#if !defined(HAVE_DRM_DP_ATOMIC_FIND_TIME_SLOTS)
static inline
Expand Down

0 comments on commit 8a8ce23

Please sign in to comment.