Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 1 | From: Vincent Davis Jr <vince@underview.tech> |
| 2 | Date: Fri, 07 Jan 2022 07:01:47 PM CST |
| 3 | Subject: [PATCH] Fix EGL macro undeclared and EGLImageKHR |
| 4 | |
| 5 | * Fixes compiler issues related to EGL macro constant/enum value type not being defined |
| 6 | * Updates EGLImage to EGLImageKHR |
| 7 | |
| 8 | Upstream-status: Pending |
| 9 | |
| 10 | Signed-off-by: Vincent Davis Jr <vince@underview.tech> |
| 11 | diff --git a/modules/hw/mmal/converter_mmal.c b/modules/hw/mmal/converter_mmal.c |
| 12 | index f31cb81d8..426af668b 100644 |
| 13 | --- a/modules/hw/mmal/converter_mmal.c |
| 14 | +++ b/modules/hw/mmal/converter_mmal.c |
| 15 | @@ -28,6 +28,34 @@ |
| 16 | |
| 17 | #define TRACE_ALL 0 |
| 18 | |
| 19 | +// Pass Yocto related build errors |
| 20 | +#define EGL_LINUX_DMA_BUF_EXT 0x3270 |
| 21 | +#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 |
| 22 | +#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 |
| 23 | +#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 |
| 24 | +#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 |
| 25 | +#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 |
| 26 | +#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 |
| 27 | +#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 |
| 28 | +#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 |
| 29 | +#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 |
| 30 | +#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A |
| 31 | +#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B |
| 32 | +#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C |
| 33 | +#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D |
| 34 | +#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E |
| 35 | +#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443 |
| 36 | +#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444 |
| 37 | +#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445 |
| 38 | +#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446 |
| 39 | +#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447 |
| 40 | +#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448 |
| 41 | +#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440 |
| 42 | +#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441 |
| 43 | +#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442 |
| 44 | +#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449 |
| 45 | +#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A |
| 46 | + |
| 47 | typedef struct mmal_gl_converter_s |
| 48 | { |
| 49 | EGLint drm_fourcc; |
| 50 | @@ -199,7 +227,7 @@ static tex_context_t * get_tex_context(const opengl_tex_converter_t * const tc, |
| 51 | |
| 52 | *a = EGL_NONE; |
| 53 | |
| 54 | - const EGLImage image = tc->gl->egl.createImageKHR(tc->gl, EGL_LINUX_DMA_BUF_EXT, NULL, attribs); |
| 55 | + const EGLImageKHR image = tc->gl->egl.createImageKHR(tc->gl, EGL_LINUX_DMA_BUF_EXT, NULL, attribs); |
| 56 | if (!image) { |
| 57 | msg_Err(tc, "Failed to import fd %d: Err=%#x", fd, tc->vt->GetError()); |
| 58 | goto fail; |