diff options
author | Pekka Paalanen <[email protected]> | 2017-05-30 17:23:34 +0530 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2017-05-30 13:56:20 +0100 |
commit | 9434f057c8f4297e94e08a06257ea66e354deaa7 (patch) | |
tree | 32da5cbce52a7eac016660ccf049a2afa3e857e5 /src/egl/drivers/dri2 | |
parent | 76aa1bbb8919c3cc2b9cb5467640bf996b8d31dc (diff) |
egl: introduce DMA_BUF_MAX_PLANES
Rather than hardcoding 3, use a #define. Makes it easier to bump this
later to 4.
Signed-off-by: Pekka Paalanen <[email protected]>
Signed-off-by: Varad Gautam <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 80d366d244a..a2c9e417cc0 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -2092,7 +2092,7 @@ dri2_check_dma_buf_format(const _EGLImageAttribs *attrs) * generated if any of the EGL_DMA_BUF_PLANE1_* or EGL_DMA_BUF_PLANE2_* * attributes are specified." */ - for (i = plane_n; i < 3; ++i) { + for (i = plane_n; i < DMA_BUF_MAX_PLANES; ++i) { if (attrs->DMABufPlaneFds[i].IsPresent || attrs->DMABufPlaneOffsets[i].IsPresent || attrs->DMABufPlanePitches[i].IsPresent) { @@ -2125,9 +2125,9 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx, __DRIimage *dri_image; unsigned num_fds; unsigned i; - int fds[3]; - int pitches[3]; - int offsets[3]; + int fds[DMA_BUF_MAX_PLANES]; + int pitches[DMA_BUF_MAX_PLANES]; + int offsets[DMA_BUF_MAX_PLANES]; unsigned error; /** |