From 86f203f60e4210e661f4b3afc5992a1b4c407ea9 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Tue, 18 Oct 2022 13:30:49 +0800 Subject: [PATCH] nouveau: Remove XVMC_VL environment variable usage Signed-off-by: Yonggang Luo Acked-by: David Heidelberg Reviewed-by: Karol Herbst Part-of: --- src/gallium/drivers/nouveau/nouveau_video.c | 4 +--- src/gallium/drivers/nouveau/nouveau_vp3_video.c | 2 +- src/gallium/drivers/nouveau/nv50/nv84_video.c | 5 +---- src/gallium/drivers/nouveau/nv50/nv98_video.c | 3 --- src/gallium/drivers/nouveau/nvc0/nvc0_video.c | 3 --- 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/gallium/drivers/nouveau/nouveau_video.c b/src/gallium/drivers/nouveau/nouveau_video.c index a5596f9..eb3fe8c 100644 --- a/src/gallium/drivers/nouveau/nouveau_video.c +++ b/src/gallium/drivers/nouveau/nouveau_video.c @@ -511,8 +511,6 @@ nouveau_create_decoder(struct pipe_context *context, debug_printf("Acceleration level: %s\n", templ->entrypoint <= PIPE_VIDEO_ENTRYPOINT_BITSTREAM ? "bit": templ->entrypoint == PIPE_VIDEO_ENTRYPOINT_IDCT ? "IDCT" : "MC"); - if (getenv("XVMC_VL")) - goto vl; if (u_reduce_video_profile(templ->profile) != PIPE_VIDEO_FORMAT_MPEG12) goto vl; if (screen->device->chipset >= 0x98 && screen->device->chipset != 0xa0) @@ -777,7 +775,7 @@ nouveau_video_buffer_create(struct pipe_context *pipe, * hardware decoder is only supported on some chipsets * and it only supports the NV12 format */ - if (templat->buffer_format != PIPE_FORMAT_NV12 || getenv("XVMC_VL") || + if (templat->buffer_format != PIPE_FORMAT_NV12 || (screen->device->chipset >= 0x98 && screen->device->chipset != 0xa0) || screen->device->chipset < 0x40) return vl_video_buffer_create(pipe, templat); diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video.c b/src/gallium/drivers/nouveau/nouveau_vp3_video.c index 02cbe24..ab46b3d 100644 --- a/src/gallium/drivers/nouveau/nouveau_vp3_video.c +++ b/src/gallium/drivers/nouveau/nouveau_vp3_video.c @@ -86,7 +86,7 @@ nouveau_vp3_video_buffer_create(struct pipe_context *pipe, struct pipe_sampler_view sv_templ; struct pipe_surface surf_templ; - if (getenv("XVMC_VL") || templat->buffer_format != PIPE_FORMAT_NV12) + if (templat->buffer_format != PIPE_FORMAT_NV12) return vl_video_buffer_create(pipe, templat); assert(templat->interlaced); diff --git a/src/gallium/drivers/nouveau/nv50/nv84_video.c b/src/gallium/drivers/nouveau/nv50/nv84_video.c index f013d57..683f59c 100644 --- a/src/gallium/drivers/nouveau/nv50/nv84_video.c +++ b/src/gallium/drivers/nouveau/nv50/nv84_video.c @@ -278,9 +278,6 @@ nv84_create_decoder(struct pipe_context *context, int is_h264 = u_reduce_video_profile(templ->profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC; int is_mpeg12 = u_reduce_video_profile(templ->profile) == PIPE_VIDEO_FORMAT_MPEG12; - if (getenv("XVMC_VL")) - return vl_create_decoder(context, templ); - if ((is_h264 && templ->entrypoint != PIPE_VIDEO_ENTRYPOINT_BITSTREAM) || (is_mpeg12 && templ->entrypoint > PIPE_VIDEO_ENTRYPOINT_IDCT)) { debug_printf("%x\n", templ->entrypoint); @@ -614,7 +611,7 @@ nv84_video_buffer_create(struct pipe_context *pipe, union nouveau_bo_config cfg; unsigned bo_size; - if (getenv("XVMC_VL") || template->buffer_format != PIPE_FORMAT_NV12) + if (template->buffer_format != PIPE_FORMAT_NV12) return vl_video_buffer_create(pipe, template); if (!template->interlaced) { diff --git a/src/gallium/drivers/nouveau/nv50/nv98_video.c b/src/gallium/drivers/nouveau/nv50/nv98_video.c index 44e6f26..a1a5136 100644 --- a/src/gallium/drivers/nouveau/nv50/nv98_video.c +++ b/src/gallium/drivers/nouveau/nv50/nv98_video.c @@ -96,9 +96,6 @@ nv98_create_decoder(struct pipe_context *context, uint32_t timeout; u32 tmp_size = 0; - if (getenv("XVMC_VL")) - return vl_create_decoder(context, templ); - if (templ->entrypoint != PIPE_VIDEO_ENTRYPOINT_BITSTREAM) { debug_printf("%x\n", templ->entrypoint); return NULL; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_video.c b/src/gallium/drivers/nouveau/nvc0/nvc0_video.c index d2aed4a..1823225 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_video.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_video.c @@ -106,9 +106,6 @@ nvc0_create_decoder(struct pipe_context *context, uint32_t timeout; u32 tmp_size = 0; - if (getenv("XVMC_VL")) - return vl_create_decoder(context, templ); - if (templ->entrypoint != PIPE_VIDEO_ENTRYPOINT_BITSTREAM) { debug_printf("%x\n", templ->entrypoint); return NULL; -- 2.7.4