gallium/radeon: use explicit drm_major, drm_minor check
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 8 Mar 2016 10:55:19 +0000 (10:55 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 9 Mar 2016 17:25:22 +0000 (17:25 +0000)
Just like everywhere else in the radeon codebase.

v2: Don't forget about drm_major == 3 (Alex)

Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/radeon_vce.c

index 41603b32403ffe0f8b10ce0a452461c6c2af8aa7..087d9422c04850496ccff3254e0fb14f886d4bfd 100644 (file)
@@ -404,7 +404,8 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context,
 
        if (rscreen->info.drm_major == 3)
                enc->use_vm = true;
-       if ((rscreen->info.drm_major > 2) || (rscreen->info.drm_minor >= 42))
+       if ((rscreen->info.drm_major == 2 && rscreen->info.drm_minor >= 42) ||
+            rscreen->info.drm_major == 3)
                enc->use_vui = true;
        if (rscreen->info.family >= CHIP_TONGA &&
              rscreen->info.family != CHIP_STONEY)