[04/18] winsys/amdgpu: add vcn enc cs support

Submitted by Zhang, Boyuan on Nov. 7, 2017, 9:58 p.m.

Details

Message ID 1510091953-3192-4-git-send-email-boyuan.zhang@amd.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Zhang, Boyuan Nov. 7, 2017, 9:58 p.m.
From: Boyuan Zhang <boyuan.zhang@amd.com>

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
---
 src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index 0b47af9..75e1891 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -25,6 +25,10 @@ 
  * next paragraph) shall be included in all copies or substantial portions
  * of the Software.
  */
+/*
+ * Authors:
+ *      Marek Olšák <maraeo@gmail.com>
+ */
 
 #include "amdgpu_cs.h"
 #include "os/os_time.h"
@@ -326,7 +330,8 @@  static bool amdgpu_cs_has_user_fence(struct amdgpu_cs_context *cs)
 {
    return cs->ib[IB_MAIN].ip_type != AMDGPU_HW_IP_UVD &&
           cs->ib[IB_MAIN].ip_type != AMDGPU_HW_IP_VCE &&
-          cs->ib[IB_MAIN].ip_type != AMDGPU_HW_IP_VCN_DEC;
+          cs->ib[IB_MAIN].ip_type != AMDGPU_HW_IP_VCN_DEC &&
+          cs->ib[IB_MAIN].ip_type != AMDGPU_HW_IP_VCN_ENC;
 }
 
 static bool amdgpu_cs_has_chaining(struct amdgpu_cs *cs)
@@ -779,6 +784,10 @@  static bool amdgpu_init_cs_context(struct amdgpu_cs_context *cs,
       cs->ib[IB_MAIN].ip_type = AMDGPU_HW_IP_VCN_DEC;
       break;
 
+  case RING_VCN_ENC:
+      cs->ib[IB_MAIN].ip_type = AMDGPU_HW_IP_VCN_ENC;
+      break;
+
    default:
    case RING_GFX:
       cs->ib[IB_MAIN].ip_type = AMDGPU_HW_IP_GFX;

Comments

On Tue, Nov 7, 2017 at 4:58 PM,  <boyuan.zhang@amd.com> wrote:
> From: Boyuan Zhang <boyuan.zhang@amd.com>
>
> Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
> ---
>  src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
> index 0b47af9..75e1891 100644
> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
> @@ -25,6 +25,10 @@
>   * next paragraph) shall be included in all copies or substantial portions
>   * of the Software.
>   */
> +/*
> + * Authors:
> + *      Marek Olšák <maraeo@gmail.com>
> + */

Drop this hunk.

>
>  #include "amdgpu_cs.h"
>  #include "os/os_time.h"
> @@ -326,7 +330,8 @@ static bool amdgpu_cs_has_user_fence(struct amdgpu_cs_context *cs)
>  {
>     return cs->ib[IB_MAIN].ip_type != AMDGPU_HW_IP_UVD &&
>            cs->ib[IB_MAIN].ip_type != AMDGPU_HW_IP_VCE &&
> -          cs->ib[IB_MAIN].ip_type != AMDGPU_HW_IP_VCN_DEC;
> +          cs->ib[IB_MAIN].ip_type != AMDGPU_HW_IP_VCN_DEC &&
> +          cs->ib[IB_MAIN].ip_type != AMDGPU_HW_IP_VCN_ENC;
>  }
>
>  static bool amdgpu_cs_has_chaining(struct amdgpu_cs *cs)
> @@ -779,6 +784,10 @@ static bool amdgpu_init_cs_context(struct amdgpu_cs_context *cs,
>        cs->ib[IB_MAIN].ip_type = AMDGPU_HW_IP_VCN_DEC;
>        break;
>
> +  case RING_VCN_ENC:
> +      cs->ib[IB_MAIN].ip_type = AMDGPU_HW_IP_VCN_ENC;
> +      break;
> +
>     default:
>     case RING_GFX:
>        cs->ib[IB_MAIN].ip_type = AMDGPU_HW_IP_GFX;
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev