nouveau: Remove XVMC_VL environment variable usage

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19133>
This commit is contained in:
Yonggang Luo
2022-10-18 13:30:49 +08:00
committed by Marge Bot
parent 6570136e15
commit 86f203f60e
5 changed files with 3 additions and 14 deletions
+1 -3
View File
@@ -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);
@@ -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);
@@ -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) {
@@ -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;
@@ -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;