From 32f23c8ab2fa3b777fda528f2d26a4c20f8675e9 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Mon, 4 Dec 2023 09:57:11 +0000 Subject: [PATCH] gpu/drm: tegra: Fix build for Linux v6.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building the Tegra DRM driver with Linux v6.8 fails with the following error ... drivers/gpu/drm/tegra/hdmi.c:623:25: error: implicit declaration of function ‘drm_eld_size’; did you mean ‘mm_cid_size’? [-Werror=implicit-function-declaration] 623 | size_t length = drm_eld_size(hdmi->output.connector.eld), i; | ^~~~~~~~~~~~ Commit ("8eb80946ab0c drm/edid: split out drm_eld.h from drm_edid.h") added the header file 'drm/drm_eld.h' which now needs to be included to build the Tegra DRM driver. Fix the build issue by using conftest to detect the presence of the header 'drm/drm_eld.h' and include this header if present. Bug 4448428 Change-Id: Ifb17648d1dc721e1f0de3f864f4cc76450eea394 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027485 (cherry picked from commit 8d5286c379948a5fc7d45c283e66a0128febcf36) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055252 Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit --- drivers/gpu/drm/tegra/hdmi.c | 3 +++ drivers/gpu/drm/tegra/sor.c | 3 +++ scripts/conftest/Makefile | 1 + 3 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index c85c7fdd..71362ecc 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -25,6 +25,9 @@ #include #include #include +#if defined(NV_DRM_DRM_ELD_H_PRESENT) +#include +#endif #include #include #include diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 794ae1ea..9947d44d 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -32,6 +32,9 @@ #endif #include #include +#if defined(NV_DRM_DRM_ELD_H_PRESENT) +#include +#endif #include #include #include diff --git a/scripts/conftest/Makefile b/scripts/conftest/Makefile index ac919e51..84ad8a47 100644 --- a/scripts/conftest/Makefile +++ b/scripts/conftest/Makefile @@ -182,6 +182,7 @@ NV_HEADER_PRESENCE_TESTS = \ drm/dp/drm_dp_aux_bus.h \ drm/dp/drm_dp_helper.h \ drm/drm_dp_aux_bus.h \ + drm/drm_eld.h \ generated/autoconf.h \ linux/kconfig.h \ linux/iosys-map.h \