Skip to content

Commit

Permalink
drm/i915: fix build for 6.8.12-5-pve and newer
Browse files Browse the repository at this point in the history
Fixes #34
  • Loading branch information
moetayuko committed Dec 13, 2024
1 parent 98369e0 commit 1a73392
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
12 changes: 11 additions & 1 deletion backport-include/backport/backport_macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -1284,14 +1284,24 @@
*/
#define BPM_DGLUT_24BIT_MTL_NOT_SUPPORTED

#if LINUX_VERSION_IN_RANGE(6,8,12, 6,8,99) && PVE_RELEASE_VERSION_IS_GEQ(1)
#if LINUX_VERSION_IN_RANGE(6,8,12, 6,8,99)
#if PVE_RELEASE_VERSION_IS_GEQ(1)
/*
* 5a507b7d2be15f
* drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2
*/
#define BPM_DRM_DP_ADD_PAYLOAD_PART2_STATE_ARG_NOT_PRESENT
#endif

#if PVE_RELEASE_VERSION_IS_GEQ(5)
/*
* c0ef3df8dbaef5
* PM: runtime: Simplify pm_runtime_get_if_active() usage
*/
#define BPM_PM_RUNTIME_GET_IF_ACTIVE_IGN_USAGE_COUNT_ARG_NOT_PRESENT
#endif
#endif

#if LINUX_VERSION_IS_LESS(6,8,0) && \
!(LINUX_VERSION_IN_RANGE(6,5,13, 6,5,99) && PVE_RELEASE_VERSION_IS_GEQ(4))
/*
Expand Down
8 changes: 8 additions & 0 deletions drivers/gpu/drm/i915/intel_runtime_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,16 @@ static intel_wakeref_t __intel_runtime_pm_get_if_active(struct intel_runtime_pm
* function, since the power state is undefined. This applies
* atm to the late/early system suspend/resume handlers.
*/
#ifdef BPM_PM_RUNTIME_GET_IF_ACTIVE_IGN_USAGE_COUNT_ARG_NOT_PRESENT
if ((ignore_usecount &&
pm_runtime_get_if_active(rpm->kdev) <= 0) ||
(!ignore_usecount &&
pm_runtime_get_if_in_use(rpm->kdev) <= 0))
return 0;
#else
if (pm_runtime_get_if_active(rpm->kdev, ignore_usecount) <= 0)
return 0;
#endif
}

intel_runtime_pm_acquire(rpm, true);
Expand Down

0 comments on commit 1a73392

Please sign in to comment.