diff --git a/test/v4l2_videodevice/buffer_cache.cpp b/test/v4l2_videodevice/buffer_cache.cpp
index 0a8cb0d28ca9b204..c951bc9650dc4e0e 100644
--- a/test/v4l2_videodevice/buffer_cache.cpp
+++ b/test/v4l2_videodevice/buffer_cache.cpp
@@ -11,6 +11,8 @@
 
 #include <libcamera/stream.h>
 
+#include <linux/drm_fourcc.h>
+
 #include "buffer_source.h"
 
 #include "test.h"
@@ -142,7 +144,7 @@ public:
 		const unsigned int numBuffers = 8;
 
 		StreamConfiguration cfg;
-		cfg.pixelFormat = V4L2_PIX_FMT_YUYV;
+		cfg.pixelFormat = DRM_FORMAT_YUYV;
 		cfg.size = Size(600, 800);
 		cfg.bufferCount = numBuffers;
 
