[Mesa-dev] [PATCH] nvc0: Display an error when DRM version is too old to use performance counters

Samuel Pitoiset samuel.pitoiset at gmail.com
Thu Jun 20 02:58:14 PDT 2013


From: Samuel <samuel.pitoiset at gmail.com>

---
 src/gallium/drivers/nvc0/nvc0_query.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nvc0/nvc0_query.c b/src/gallium/drivers/nvc0/nvc0_query.c
index 75c515a..7fc1ca9 100644
--- a/src/gallium/drivers/nvc0/nvc0_query.c
+++ b/src/gallium/drivers/nvc0/nvc0_query.c
@@ -1141,8 +1141,12 @@ nvc0_screen_get_driver_query_info(struct pipe_screen *pscreen,
    count += NVC0_QUERY_DRV_STAT_COUNT;
 
    if (screen->base.class_3d >= NVE4_3D_CLASS) {
-      if (screen->base.device->drm_version >= 0x01000101)
+      if (screen->base.device->drm_version >= 0x01000101) {
          count += NVE4_PM_QUERY_COUNT;
+      } else {
+         NOUVEAU_ERR("DRM version is too old to use performance counters!\n");
+         return count;
+      }
    }
    if (!info)
       return count;
-- 
1.8.3.1



More information about the mesa-dev mailing list