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: support fbcon #342

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
1 change: 1 addition & 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_fb_helper.h"
FILES="$FILES dt-bindings/interconnect/tegra_icc_id.h"
FILES="$FILES generated/autoconf.h"
FILES="$FILES generated/compile.h"

Choose a reason for hiding this comment

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

Section has been moved to kernel-open/Kbuild with 515.76.

Expand Down
14 changes: 14 additions & 0 deletions kernel-open/nvidia-drm/nvidia-drm-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
#include <drm/drm_ioctl.h>
#endif

#if defined(NV_DRM_DRM_FB_HELPER_H_PRESENT)
#include <drm/drm_fb_helper.h>
#endif

#include <linux/pci.h>

/*
Expand All @@ -84,6 +88,10 @@
#include <drm/drm_atomic_helper.h>
#endif

static int NvDrmEnableFbcon = 0;
module_param(NvDrmEnableFbcon, int, S_IRUGO);


static struct nv_drm_device *dev_list = NULL;

#if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
Expand Down Expand Up @@ -947,6 +955,12 @@ static void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info)
nv_dev->next = dev_list;
dev_list = nv_dev;

#if defined(NV_DRM_DRM_FB_HELPER_H_PRESENT)
if (NvDrmEnableFbcon)
drm_fbdev_generic_setup(dev, 0);

#endif

return; /* Success */

failed_drm_register:
Expand Down