[Piglit] [PATCH] utils: Move DRM_FORMATS defines to piglit_drm_dma_buf.h.

Dylan Baker dylan at pnwbakers.com
Mon Oct 3 22:15:55 UTC 2016


Quoting Vinson Lee (2016-10-03 14:58:23)
> This patch fixes this build error.
> 
> transcode-nv12-as-r8-gr88.c: In function ‘create_textures’:
> transcode-nv12-as-r8-gr88.c:178:7: error: ‘DRM_FORMAT_R8’ undeclared (first use in this function)
>        DRM_FORMAT_R8, r8_pixels);
>        ^
> 
> Fixes: 0222f5db00fd ("dmabuf: fix YUV tests for drivers other than intel")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97951
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  tests/util/piglit-framework-gl/piglit_drm_dma_buf.c | 15 ---------------
>  tests/util/piglit-framework-gl/piglit_drm_dma_buf.h | 17 +++++++++++++++++
>  2 files changed, 17 insertions(+), 15 deletions(-)
> 
> diff --git a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c
> index a0a2fc42f483..c3225c3990c6 100644
> --- a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c
> +++ b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c
> @@ -40,21 +40,6 @@
>  #include <drm.h>
>  #include <unistd.h>
>  
> -/* These definitions were added in libdrm 2.4.68, since that's still pretty
> - * recent defined these to allow older libdrm to continue working.
> - */
> -#ifndef DRM_FORMAT_R8
> -#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ')
> -#endif
> -
> -#ifndef DRM_FORMAT_RG88
> -#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8')
> -#endif
> -
> -#ifndef DRM_FORMAT_GR88
> -#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8')
> -#endif
> -
>  #define ALIGN(value, alignment) (((value) + alignment - 1) & ~(alignment - 1))
>  
>  struct piglit_drm_driver {
> diff --git a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h
> index 5872df93c460..36777a835a7c 100644
> --- a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h
> +++ b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h
> @@ -23,6 +23,23 @@
>  #ifndef PIGLIT_DRM_DMA_BUF_H
>  #define PIGLIT_DRM_DMA_BUF_H
>  
> +#include "drm_fourcc.h"
> +
> +/* These definitions were added in libdrm 2.4.68, since that's still pretty
> + * recent defined these to allow older libdrm to continue working.
> + */
> +#ifndef DRM_FORMAT_R8
> +#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ')
> +#endif
> +
> +#ifndef DRM_FORMAT_RG88
> +#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8')
> +#endif
> +
> +#ifndef DRM_FORMAT_GR88
> +#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8')
> +#endif
> +
>  struct piglit_dma_buf {
>         unsigned w;
>         unsigned h;
> -- 
> 2.7.4
> 

Which is where I meant to put them in the first place, oops.
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20161003/272f4eb3/attachment-0001.sig>


More information about the Piglit mailing list