Summary: | piglit_drm_dma_buf.c:142:7: error: ‘DRM_FORMAT_R8’ undeclared (first use in this function) | ||
---|---|---|---|
Product: | piglit | Reporter: | Vinson Lee <vlee> |
Component: | tests | Assignee: | Piglit Mailing List <piglit> |
Status: | RESOLVED FIXED | QA Contact: | Piglit Mailing List <piglit> |
Severity: | normal | ||
Priority: | medium | CC: | eric, krh, robclark |
Version: | unspecified | Keywords: | bisected, regression |
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Vinson Lee
2016-09-27 16:30:41 UTC
This commit compiles fine in our CI against mesa master, what driver or version of mesa are you testing against? I get the build failure on Ubuntu 16.04 with 11.2.0-1ubuntu2.2. (In reply to Vinson Lee from comment #2) > I get the build failure on Ubuntu 16.04 with 11.2.0-1ubuntu2.2. this actually needs a newer mesa, since the R8 and GR88 formats were recent additions to mesa. See: b4e88b500c93d9728d2a3e30f6b0365bcb224b88 Vinson, are you testing on Intel hardware? (In reply to Dylan Baker from comment #4) > Vinson, are you testing on Intel hardware? I guess the problem is he is building mesa against an older mesa master, so the test for mesa/gbm 12.1 to enable gbm dmabuf backend passes, even though it isn't a new-enough 12.1. short version, if building piglit against master, use more recent master. The problem will solve itself once 12.1 release branch is cut. Well, we check for a gbm 12.0 (which I think is correct), and for intel_libdrm of some version, which I think is incorrect now. He's building against 11.x, so I would expect it to fail the 12.0 check, but if he's on intel then that libdrm check may be tripping things up. hmm, well, this hunk was supposed to make it not build that code unless you have 12.1.. although it's possible my cmake-fu was lacking somehow.. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ce7f3f8..4002fe9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") if(GBM_FOUND) set(PIGLIT_HAS_GBM True) add_definitions(-DPIGLIT_HAS_GBM) - if (GBM_VERSION VERSION_EQUAL "12.0" OR GBM_VERSION VERSION_GREATER "12.0") + if (GBM_VERSION VERSION_EQUAL "12.1" OR GBM_VERSION VERSION_GREATER "12.1") set(PIGLIT_HAS_GBM_BO_MAP True) add_definitions(-DPIGLIT_HAS_GBM_BO_MAP) endif() I think the problem is further down: if(LIBDRM_FOUND AND XCB_DRI2_FOUND AND ((LIBDRM_INTEL_VERSION VERSION_GREATER "2.4.37") OR PIGLIT_HAS_GBM_BO_MAP)) set(PIGLIT_BUILD_DMA_BUF_TESTS_IS_VALID true) else() set(PIGLIT_BUILD_DMA_BUF_TESTS_IS_VALID false) endif() This will do what you expect on every piece of hardware, except Intel, where if the GBM version is new enough it will still turn it on if the DRM_INTEL version is also new enough. I think we just need to remove that LIBDRM_INTEL check (or modify it). Err, that should be "if the GBM version is *not* new enough" (In reply to Dylan Baker from comment #9) > > Err, that should be "if the GBM version is *not* new enough" (In reply to Dylan Baker from comment #8) > > I think the problem is further down: > > if(LIBDRM_FOUND AND XCB_DRI2_FOUND AND > ((LIBDRM_INTEL_VERSION VERSION_GREATER "2.4.37") OR > PIGLIT_HAS_GBM_BO_MAP)) > set(PIGLIT_BUILD_DMA_BUF_TESTS_IS_VALID true) > else() > set(PIGLIT_BUILD_DMA_BUF_TESTS_IS_VALID false) > endif() > > This will do what you expect on every piece of hardware, except Intel, where > if the GBM version is new enough it will still turn it on if the DRM_INTEL > version is also new enough. > > I think we just need to remove that LIBDRM_INTEL check (or modify it). oh, my bad.. I read the error message too quickly, as GBM_FORMAT_R8/etc.. not DRM_FORMAT_xyz. So that part won't be built unless you have -DPIGLIT_HAS_GBM_BO_MAP, so existing check is fine. The problem is actually that he has too old drm_fourcc.h I guess? Not sure what the best way to check for that would be.. I think that we just need to update the check on intel, those formats were added in this commit from danvet (268ae7cae5afd76462c3ef14ed9021a2d40c2e57). I'll send a patch. Now I'm getting this build error. tests/spec/ext_image_dma_buf_import/transcode-nv12-as-r8-gr88.c: In function ‘create_textures’: tests/spec/ext_image_dma_buf_import/transcode-nv12-as-r8-gr88.c:178:7: error: ‘DRM_FORMAT_R8’ undeclared (first use in this function) DRM_FORMAT_R8, r8_pixels); ^ commit 5a87c57f9ba6581f2c091d7065c3c2cc1b001f2a Author: Vinson Lee <vlee@freedesktop.org> Date: Mon Oct 3 14:34:23 2016 -0700 utils: Move DRM_FORMATS defines to piglit_drm_dma_buf.h. 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@freedesktop.org> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.