Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix drm-v4.11 on 12.x #193

Open
wants to merge 3 commits into
base: drm-v4.11-fbsd11.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions amd/amdgpu/amdgpu_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
adev->irq.msi_enabled = false;

if (amdgpu_msi_ok(adev)) {
#ifdef __linux__
#if defined(__linux__) || defined(pci_enable_msi)
int ret = pci_enable_msi(adev->pdev);
if (!ret) {
adev->irq.msi_enabled = true;
Expand Down Expand Up @@ -262,7 +262,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev)
if (adev->irq.installed) {
drm_irq_uninstall(adev->ddev);
adev->irq.installed = false;
#ifdef __linux__
#if defined(__linux__) || defined(pci_disable_msi)
if (adev->irq.msi_enabled)
pci_disable_msi(adev->pdev);
#endif
Expand Down
2 changes: 1 addition & 1 deletion drm/drm_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ static int drm_vblank_info DRM_SYSCTL_HANDLER_ARGS
int retcode;
int i;

DRM_SYSCTL_PRINT("\ncrtc ref count last enabled inmodeset\n");
mutex_lock(&dev->struct_mutex);
DRM_SYSCTL_PRINT("\ncrtc ref count last enabled inmodeset\n");
if (dev->vblank == NULL)
goto done;
for (i = 0 ; i < dev->num_crtcs ; i++) {
Expand Down
10 changes: 8 additions & 2 deletions i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)

i915_gem_load_init_fences(dev_priv);

#ifdef __linux__
#if defined(__linux__) || defined(pci_enable_msi)
/* On the 945G/GM, the chipset reports the MSI capability on the
* integrated graphics even though the support isn't actually there
* according to the published specs. It doesn't appear to function
Expand Down Expand Up @@ -1176,9 +1176,15 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
*/
static void i915_driver_cleanup_hw(struct drm_i915_private *dev_priv)
{
#ifdef __linux__
#if defined(__linux__) || defined(pci_disable_msi)
struct pci_dev *pdev = dev_priv->drm.pdev;
#endif

#ifdef CONFIG_I915_PERF
i915_perf_fini(dev_priv);
#endif

#if defined(__linux__) || defined(pci_disable_msi)
if (pdev->msi_enabled)
pci_disable_msi(pdev);
#endif
Expand Down
1 change: 1 addition & 0 deletions linuxkpi/gplv2/src/linux_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <sys/kernel.h>

#include <machine/specialreg.h>
#include <sys/pcpu.h>
#include <machine/md_var.h>

#include <linux/bitops.h>
Expand Down
4 changes: 2 additions & 2 deletions radeon/radeon_irq_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ int radeon_irq_kms_init(struct radeon_device *rdev)
rdev->msi_enabled = 0;

if (radeon_msi_ok(rdev)) {
#ifdef __linux__
#if defined(__linux__) || defined(pci_enable_msi)
int ret = pci_enable_msi(rdev->pdev);
if (!ret) {
rdev->msi_enabled = 1;
Expand Down Expand Up @@ -332,7 +332,7 @@ void radeon_irq_kms_fini(struct radeon_device *rdev)
if (rdev->irq.installed) {
drm_irq_uninstall(rdev->ddev);
rdev->irq.installed = false;
#ifdef __linux__
#if defined(__linux__) || defined(pci_disable_msi)
if (rdev->msi_enabled)
pci_disable_msi(rdev->pdev);
#endif
Expand Down