Skip to contentSkip to conversation

drm/hyperv-drm: Include framebuffer and EDID headers

PATCH In review Thomas Zimmermann 3 participants 3 messages Jun 22, 2022

Subsystems (6)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 drm/hyperv-drm: Include framebuffer and EDID headers

Fix a number of compile errors by including the correct header files. Examples are shown below.

../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c: In function 'hyperv_blit_to_vram_rect':
../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:25:48: error: invalid use of undefined type 'struct drm_framebuffer'
25 | struct hyperv_drm_device *hv = to_hv(fb->dev);
| ^~

../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c: In function 'hyperv_connector_get_modes':
../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:59:17: error: implicit declaration of function 'drm_add_modes_noedid' [-Werror=implicit-function-declaration]
59 | count = drm_add_modes_noedid(connector,

      |                 ^~~~~~~~~~~~~~~~~~~~

../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:62:9: error: implicit declaration of function 'drm_set_preferred_mode'; did you mean 'drm_mm_reserve_node'? [-Werror=implicit-function-declaration]

   62 |         drm_set_preferred_mode(connector, hv->preferred_width,
      |         ^~~~~~~~~~~~~~~~~~~~~~
Fixes 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device")
Cc Deepak Rawat <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc <[email protected]> # v5.14+
---
 drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/hyperv/hyperv_drm_modeset.c +2 -0
index 27f4fcb058f9..b8e64dd8d3a6 100644
@@ -7,9 +7,11 @@
 
 #include <drm/drm_damage_helper.h>
 #include <drm/drm_drv.h>
+#include <drm/drm_edid.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_format_helper.h>
 #include <drm/drm_fourcc.h>
+#include <drm/drm_framebuffer.h>
 #include <drm/drm_gem_atomic_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_gem_shmem_helper.h>
Signature · 1 line
2.36.1
Acked-by on v1 1/1
#1 lore raw
Quoted 17 lines · Thomas Zimmermann

Fix a number of compile errors by including the correct header files. Examples are shown below.

../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c: In function 'hyperv_blit_to_vram_rect':
../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:25:48: error: invalid use of undefined type 'struct drm_framebuffer'
25 | struct hyperv_drm_device *hv = to_hv(fb->dev);
| ^~

../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c: In function 'hyperv_connector_get_modes':
../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:59:17: error: implicit declaration of function 'drm_add_modes_noedid' [-Werror=implicit-function-declaration]
59 | count = drm_add_modes_noedid(connector,

      |                 ^~~~~~~~~~~~~~~~~~~~

../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:62:9: error: implicit declaration of function 'drm_set_preferred_mode'; did you mean 'drm_mm_reserve_node'? [-Werror=implicit-function-declaration]

   62 |         drm_set_preferred_mode(connector, hv->preferred_width,
      |         ^~~~~~~~~~~~~~~~~~~~~~
Quoted 9 lines
Fixes 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device")
Cc Deepak Rawat <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc <[email protected]> # v5.14+

Maxime

Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Zimmermann
Quoted 11 lines · Thomas Zimmermann

Fix a number of compile errors by including the correct header files. Examples are shown below.

../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c: In function 'hyperv_blit_to_vram_rect':
../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:25:48: error: invalid use of undefined type 'struct drm_framebuffer'
25 | struct hyperv_drm_device *hv = to_hv(fb->dev);
| ^~

../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c: In function 'hyperv_connector_get_modes':
../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:59:17: error: implicit declaration of function 'drm_add_modes_noedid' [-Werror=implicit-function-declaration]
59 | count = drm_add_modes_noedid(connector,

Quoted 8 lines
      |                 ^~~~~~~~~~~~~~~~~~~~

../drivers/gpu/drm/hyperv/hyperv_drm_modeset.c:62:9: error: implicit declaration of function 'drm_set_preferred_mode'; did you mean 'drm_mm_reserve_node'? [-Werror=implicit-function-declaration]

   62 |         drm_set_preferred_mode(connector, hv->preferred_width,
      |         ^~~~~~~~~~~~~~~~~~~~~~
Fixes 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device")

Presumably should be

Fixes 720cf96d8fec ("drm: Drop drm_framebuffer.h from drm_crtc.h")
Fixes 255490f9150d ("drm: Drop drm_edid.h from drm_crtc.h")

Mea culpa

Quoted 29 lines
Cc Deepak Rawat <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc <[email protected]> # v5.14+
---
 drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/hyperv/hyperv_drm_modeset.c +2 -0
index 27f4fcb058f9..b8e64dd8d3a6 100644
@@ -7,9 +7,11 @@
 
 #include <drm/drm_damage_helper.h>
 #include <drm/drm_drv.h>
+#include <drm/drm_edid.h>
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_format_helper.h>
 #include <drm/drm_fourcc.h>
+#include <drm/drm_framebuffer.h>
 #include <drm/drm_gem_atomic_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_gem_shmem_helper.h>
Signature · 1 line
2.36.1
Signature · 2 lines
Ville Syrjälä
Intel