[6/6] libcamera: egl: Don't depend on libdrm
diff mbox series

Message ID 20260504000431.1340150-7-laurent.pinchart@ideasonboard.com
State New
Headers show
Series
  • libcamera: kernel headers update
Related show

Commit Message

Laurent Pinchart May 4, 2026, 12:04 a.m. UTC
egl.cpp includes libdrm/drm_fourcc.h, creating an implicit dependency on
libdrm that is not declared in meson.build. This is a leftover from GBM
usage, which was dropped in commit 7350d6cc5dd1 and ensured that libdrm
was present.

We could add an explicit dependency on libdrm, but this is not required
as drm_fourcc.h is also present in the Linux kernel headers. Replace
libdrm/drm_fourcc.h with linux/drm_fourcc.h.

Fixes: 7350d6cc5dd1 ("Revert "libcamera: software_isp: gbm: Add a GBM helper class for GPU surface access"")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/egl.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Kieran Bingham May 4, 2026, 8:49 a.m. UTC | #1
Quoting Laurent Pinchart (2026-05-04 01:04:31)
> egl.cpp includes libdrm/drm_fourcc.h, creating an implicit dependency on
> libdrm that is not declared in meson.build. This is a leftover from GBM
> usage, which was dropped in commit 7350d6cc5dd1 and ensured that libdrm
> was present.
> 
> We could add an explicit dependency on libdrm, but this is not required
> as drm_fourcc.h is also present in the Linux kernel headers. Replace
> libdrm/drm_fourcc.h with linux/drm_fourcc.h.
> 

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Fixes: 7350d6cc5dd1 ("Revert "libcamera: software_isp: gbm: Add a GBM helper class for GPU surface access"")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  src/libcamera/egl.cpp | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
> index f659294709f2..357918711e83 100644
> --- a/src/libcamera/egl.cpp
> +++ b/src/libcamera/egl.cpp
> @@ -16,11 +16,10 @@
>  
>  #include <linux/dma-buf.h>
>  #include <linux/dma-heap.h>
> +#include <linux/drm_fourcc.h>
>  
>  #include <libcamera/base/thread.h>
>  
> -#include <libdrm/drm_fourcc.h>
> -
>  namespace libcamera {
>  
>  LOG_DEFINE_CATEGORY(eGL)
> -- 
> Regards,
> 
> Laurent Pinchart
>
Barnabás Pőcze May 4, 2026, 9:12 a.m. UTC | #2
2026. 05. 04. 2:04 keltezéssel, Laurent Pinchart írta:
> egl.cpp includes libdrm/drm_fourcc.h, creating an implicit dependency on
> libdrm that is not declared in meson.build. This is a leftover from GBM
> usage, which was dropped in commit 7350d6cc5dd1 and ensured that libdrm
> was present.
> 
> We could add an explicit dependency on libdrm, but this is not required
> as drm_fourcc.h is also present in the Linux kernel headers. Replace
> libdrm/drm_fourcc.h with linux/drm_fourcc.h.
> 
> Fixes: 7350d6cc5dd1 ("Revert "libcamera: software_isp: gbm: Add a GBM helper class for GPU surface access"")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---

Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>


>   src/libcamera/egl.cpp | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
> index f659294709f2..357918711e83 100644
> --- a/src/libcamera/egl.cpp
> +++ b/src/libcamera/egl.cpp
> @@ -16,11 +16,10 @@
>   
>   #include <linux/dma-buf.h>
>   #include <linux/dma-heap.h>
> +#include <linux/drm_fourcc.h>
>   
>   #include <libcamera/base/thread.h>
>   
> -#include <libdrm/drm_fourcc.h>
> -
>   namespace libcamera {
>   
>   LOG_DEFINE_CATEGORY(eGL)

Patch
diff mbox series

diff --git a/src/libcamera/egl.cpp b/src/libcamera/egl.cpp
index f659294709f2..357918711e83 100644
--- a/src/libcamera/egl.cpp
+++ b/src/libcamera/egl.cpp
@@ -16,11 +16,10 @@ 
 
 #include <linux/dma-buf.h>
 #include <linux/dma-heap.h>
+#include <linux/drm_fourcc.h>
 
 #include <libcamera/base/thread.h>
 
-#include <libdrm/drm_fourcc.h>
-
 namespace libcamera {
 
 LOG_DEFINE_CATEGORY(eGL)