drm/tegra: Update to Linux v6.13

Update the Tegra DRM driver to align with Linux v6.13. A function
pointer 'fbdev_probe' was added to the drm_driver structure in Linux
v6.13 and so use conftest to detect this and make the necessary changes
to the Tegra DRM driver.

JIRA LINQPJ14-47

Change-Id: I0120fe9f13bc39446ce4e0a8827eb5d8b42a082c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333836
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2025-04-03 14:04:56 +01:00
parent 6be033ba85
commit 540737a228
6 changed files with 61 additions and 1 deletions

View File

@@ -23,6 +23,9 @@
#endif
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT) /* Linux v6.13 */
#include <drm/drm_client_setup.h>
#endif
#include <drm/drm_debugfs.h>
#include <drm/drm_drv.h>
#include <drm/drm_fourcc.h>
@@ -743,6 +746,10 @@ static const struct drm_driver tegra_drm_driver = {
.dumb_create = tegra_bo_dumb_create,
#if defined(NV_DRM_DRIVER_HAS_FBDEV_PROBE) /* Linux v6.13 */
TEGRA_FBDEV_DRIVER_OPS,
#endif
.ioctls = tegra_drm_ioctls,
.num_ioctls = ARRAY_SIZE(tegra_drm_ioctls),
.fops = &tegra_drm_fops,
@@ -1199,7 +1206,11 @@ static int host1x_drm_probe(struct host1x_device *dev)
if (err < 0)
goto hub;
#if defined(NV_DRM_DRIVER_HAS_FBDEV_PROBE) /* Linux v6.13 */
drm_client_setup(drm, NULL);
#else
tegra_fbdev_setup(drm);
#endif
return 0;