summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_modes.h
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2021-01-08 10:53:06 +0100
committerPhilipp Zabel <p.zabel@pengutronix.de>2021-01-08 19:42:14 +0100
commit82581fcf070b68a91fb3a3ade08d9a76380a4789 (patch)
tree76953629a54b1a0c5d8eef5dd7625686c499e60c /include/drm/drm_modes.h
parentdrm/imx: dw_hdmi-imx: depend on OF to fix randconfig compile tests on x86_64 (diff)
downloadlinux-82581fcf070b68a91fb3a3ade08d9a76380a4789.tar.xz
linux-82581fcf070b68a91fb3a3ade08d9a76380a4789.zip
drm/modes: add non-OF stub for of_get_drm_display_mode
If CONFIG_OF is disabled, of_get_drm_display_mode is not compiled in, and drivers using it fail to build: ld: drivers/gpu/drm/imx/parallel-display.o: in function `imx_pd_connector_get_modes': parallel-display.c:(.text+0x8d): undefined reference to `of_get_drm_display_mode' Add an inline stub so they can be build-tested with non-OF configurations. Reported-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'include/drm/drm_modes.h')
-rw-r--r--include/drm/drm_modes.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
index a0d79d1c51e2..29ba4adf0c53 100644
--- a/include/drm/drm_modes.h
+++ b/include/drm/drm_modes.h
@@ -461,9 +461,19 @@ void drm_display_mode_from_videomode(const struct videomode *vm,
void drm_display_mode_to_videomode(const struct drm_display_mode *dmode,
struct videomode *vm);
void drm_bus_flags_from_videomode(const struct videomode *vm, u32 *bus_flags);
+
+#if defined(CONFIG_OF)
int of_get_drm_display_mode(struct device_node *np,
struct drm_display_mode *dmode, u32 *bus_flags,
int index);
+#else
+static inline int of_get_drm_display_mode(struct device_node *np,
+ struct drm_display_mode *dmode,
+ u32 *bus_flags, int index)
+{
+ return -EINVAL;
+}
+#endif
void drm_mode_set_name(struct drm_display_mode *mode);
int drm_mode_vrefresh(const struct drm_display_mode *mode);