Module: Mesa
Branch: main
Commit: 86f203f60e4210e661f4b3afc5992a1b4c407ea9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=86f203f60e4210e661f4b3afc5992a1b4c407ea9

Author: Yonggang Luo <[email protected]>
Date:   Tue Oct 18 13:30:49 2022 +0800

nouveau: Remove XVMC_VL environment variable usage

Signed-off-by: Yonggang Luo <[email protected]>
Acked-by: David Heidelberg <[email protected]>
Reviewed-by: Karol Herbst <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19133>

---

 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 a5596f980a5..eb3fe8c0361 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 02cbe246520..ab46b3df6a6 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 f013d57c6f2..683f59c8b83 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 44e6f26daad..a1a51368f34 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 d2aed4a7030..1823225f387 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;

Reply via email to