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

drm: remove drivers trying to take the framebuffer #356

Open
wants to merge 1 commit into
base: main
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
2 changes: 2 additions & 0 deletions kernel-open/conftest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ test_headers() {
FILES="$FILES drm/drm_ioctl.h"
FILES="$FILES drm/drm_device.h"
FILES="$FILES drm/drm_mode_config.h"
FILES="$FILES drm/drm_aperture.h"
YusufKhan-gamedev marked this conversation as resolved.
Show resolved Hide resolved
FILES="$FILES dt-bindings/interconnect/tegra_icc_id.h"
FILES="$FILES generated/autoconf.h"
FILES="$FILES generated/compile.h"
Expand All @@ -139,6 +140,7 @@ test_headers() {
FILES="$FILES linux/sched/signal.h"
FILES="$FILES linux/sched/task.h"
FILES="$FILES linux/sched/task_stack.h"
FILES="$FILES linux/aperture.h"
YusufKhan-gamedev marked this conversation as resolved.
Show resolved Hide resolved
FILES="$FILES xen/ioemu.h"
FILES="$FILES linux/fence.h"
FILES="$FILES linux/dma-resv.h"
Expand Down
19 changes: 19 additions & 0 deletions kernel-open/nvidia-drm/nvidia-drm-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@
#include <drm/drm_atomic_helper.h>
#endif

#if defined(NV_DRM_DRM_APERTURE_H_PRESENT)
#include <drm/drm_aperture.h>
#endif

#if defined(NV_LINUX_APERTURE_H_PRESENT)
#include <linux/aperture.h>
#endif

static struct nv_drm_device *dev_list = NULL;

#if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
Expand Down Expand Up @@ -941,6 +949,17 @@ static void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info)
NV_DRM_DEV_LOG_ERR(nv_dev, "Failed to register device");
goto failed_drm_register;
}
/*
* Remove conflicting framebuffers, some framebuffers might interfere
* with the operation of nvidia-drm(eg. nouveau) so remove all that
* might.
*/
#if defined(NV_LINUX_APERTURE_H_PRESENT)
/* Linux 6.0-rc1 has this, the drm apreture func wraps this */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Linux 6.0-rc1 has this, the drm apreture func wraps this */
/* Linux 6.0-rc1 has this, the drm aperture function wraps this */

aperture_remove_conflicting_pci_devices(to_pci_dev(device), "nvidia-drm");
#elif defined(NV_DRM_DRM_APERTURE_H_PRESENT)
drm_aperture_remove_conflicting_pci_framebuffers(to_pci_dev(device), dev);
#endif

/* Add NVIDIA-DRM device into list */

Expand Down