The following upstream commits have been back-ported to the out-of-tree
Tegra DRM driver to align with upstream to help pull in the latest
updates from upstream.
Changes from Linux v6.2:
7ad4384d53c6 drm/tegra: Add missing clk_disable_unprepare() in
tegra_dc_probe()
Changes from Linux v6.3:
3fb1f62f80a1 drm/fb-helper: Remove drm_fb_helper_unprepare() from
drm_fb_helper_fini()
Changes from Linux v6.4:
71ec16f45ef8 drm/tegra: Implement fbdev emulation as in-kernel client
25dda38e0b07 drm/tegra: Initialize fbdev DRM client
1ac45068af9d drm/tegra: Hide fbdev support behind config option
08263e91f260 drm/tegra: Removed fb from struct tegra_fbdev
434434608a91 drm/tegra: Remove struct tegra_fbdev
dc06f4a495df drm/tegra: Include <linux/i2c.h>
f68b63ebc433 drm/tegra: Include <linux/of.h>
437405403ab4 drm/tegra: rgb: Make tegra_dc_rgb_remove() return void
The changes have been back-ported to ensure that they build for all
kernel versions supported and utilise conftest as necessary to handle
kernel differences.
Bug 4876974
Change-Id: I6c8403325a7b4874f3ad1c6a0b1f662c1494c397
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3267798
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Upstream commit 690da22dbfa8 ("asm-generic/io.h: kill vmalloc.h
dependency") removed the vmalloc.h header file from io.h and this breaks
building various drivers with the latest -next kernels. Fix this
by ensuring vmalloc.h is included and in most cases slab is not actually
needed and so remove this where possible. Note that it is fine to make
this change for all current supported kernels.
Bug 4593750
Change-Id: I003d1302bda226d356467e6ede99949b2716940a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141984
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Instead of using kernel version checks in the Tegra DRM driver for the
tegra_fb_ops structure, just check if the appropriate definition is
defined and if so use it. This fixes building the Tegra DRM driver
against some 3rd party kernels that include backports from upstream.
Note that this also aligns the driver closer to the upstream code by
using the same definitions that the upstream driver uses.
Bug 4346767
Change-Id: I8cb40899d0bf7cdc233e5f4cee7b6afb6f12d015
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027832
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
The FB deferred IO ops helper name is changed in Linux 6.6 with
below mainline kernel change:
---
commit 744d35d3436fbeed9131f6ab717aeb3f775b19c4
Author: Thomas Zimmermann <tzimmermann@suse.de>
Date: Sat Jul 29 21:26:49 2023 +0200
fbdev: Align deferred I/O with naming of helpers
---
Use the new macros name.
Bug 4346767
Change-Id: Idc2e2319994fd2ed7040d8d5528a0d6074257420
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008092
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Instead of relying on kernel version to determine if certain functions
or structure are present in the kernel, use the conftest.sh script to
test which functions, structures, etc are present at compile time. This
is beneficial for working with 3rd party Linux kernels that may have
back-ported upstream changes into their kernel and so the kernel version
checks do not work.
Bug 4119327
Change-Id: If315b18af74c830e9ba3993208de3a3326c4187d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2984415
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Building the Tegra DRM driver is failing due to changes made by the
following upstream commits:
1. Commit 650f2dc97053 ("gpiolib: of: remove
[devm_]gpiod_get_from_of_node() APIs")
2. Commit 6c80a93be62d ("drm/fb-helper: Initialize fb-helper's preferred
BPP in prepare function")
3. Commit bc292ab00f6c ("(HEAD) mm: introduce vma->vm_flags wrapper
functions")
Address the above to fix building the driver for Linux v6.3.
Bug 4014315
Change-Id: Ic5242291295b84dd13e8ef651533077444ac62d2
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2867137
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
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>
Add the upstream tegra-drm driver with the 'Host1x/Tegra UAPI' series
[0] applied. This driver will be built as an external module for testing
and development with upstream Linux kernels.
The following modifications have been made to the series posted upstream
1. Update the Makefile to always build the driver as a module
2. Always enable the tegra_drm_ioctl_xxx in the tegra_drm_ioctls and
remove the dependency on CONFIG_DRM_TEGRA_STAGING.
3. Rename the include/uapi/drm/tegra_drm.h to
include/uapi/drm/tegra_drm_next.h to avoid conflicts with upstream
headers when building as an external module.
5. Rename the module that is built to be tegra-drm-next.ko instead of
tegra-drm.ko to avoid any depmod conflicts with the upstream driver.
[0] https://patchwork.ozlabs.org/project/linux-tegra/list/?series=215770
Bug 3156385
Change-Id: I19206f989325c9c6ff3c2b9301d964140d52234f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2435802
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit