mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
drm/tegra: Fix build for Linux v6.2
Linux v6.2 makes the following changes in the DRM subsystem ...
1. Commit 7c99616e3fe7 ("drm: Remove drm_mode_config::fb_base") removes
the fb_base member from the drm_mode_config structure.
2. Commit 9877d8f6bc37 ("drm/fb_helper: Rename field fbdev to info in
struct drm_fb_helper") renames the 'fbdev' field of the drm_fb_helper
structure to 'info'.
3. Commit 7fd50bc39d12 ("drm/fb-helper: Rename drm_fb_helper_alloc_fbi()
to use _info postfix") renames the function drm_fb_helper_alloc_fbi()
to drm_fb_helper_alloc_info().
4. Commit afb0ff78c13c ("drm/fb-helper: Rename drm_fb_helper_unregister_fbi() to
use _info postfix") renames the function
drm_fb_helper_unregister_fbi() to drm_fb_helper_unregister_info().
Update the Tegra DRM out-of-tree module as necessary to fix the build
for Linux v6.2.
Bug 3936429
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I501cb1d5dc772bc86b357f536431b76427e4888e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2841023
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
2c5610780d
commit
e837f4e112
@@ -248,7 +248,11 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,
|
||||
if (IS_ERR(bo))
|
||||
return PTR_ERR(bo);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
info = drm_fb_helper_alloc_info(helper);
|
||||
#else
|
||||
info = drm_fb_helper_alloc_fbi(helper);
|
||||
#endif
|
||||
if (IS_ERR(info)) {
|
||||
dev_err(drm->dev, "failed to allocate framebuffer info\n");
|
||||
drm_gem_object_put(&bo->gem);
|
||||
@@ -266,7 +270,11 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,
|
||||
|
||||
fb = fbdev->fb;
|
||||
helper->fb = fb;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
helper->info = info;
|
||||
#else
|
||||
helper->fbdev = info;
|
||||
#endif
|
||||
|
||||
info->fbops = &tegra_fb_ops;
|
||||
|
||||
@@ -285,7 +293,9 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,
|
||||
}
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)
|
||||
drm->mode_config.fb_base = (resource_size_t)bo->iova;
|
||||
#endif
|
||||
info->screen_base = (void __iomem *)bo->vaddr + offset;
|
||||
info->screen_size = size;
|
||||
info->fix.smem_start = (unsigned long)(bo->iova + offset);
|
||||
@@ -353,7 +363,11 @@ fini:
|
||||
|
||||
static void tegra_fbdev_exit(struct tegra_fbdev *fbdev)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0)
|
||||
drm_fb_helper_unregister_info(&fbdev->base);
|
||||
#else
|
||||
drm_fb_helper_unregister_fbi(&fbdev->base);
|
||||
#endif
|
||||
|
||||
if (fbdev->fb) {
|
||||
struct tegra_bo *bo = tegra_fb_get_plane(fbdev->fb, 0);
|
||||
|
||||
Reference in New Issue
Block a user