]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu:enable MCBP for SR-IOV (v2)
authorMonk Liu <Monk.Liu@amd.com>
Wed, 8 Mar 2017 07:53:19 +0000 (15:53 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Mar 2017 03:55:36 +0000 (23:55 -0400)
Apply the new IB during IB emit for SRIOV with MCBP

v2: agd: use define instead of magic number

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
drivers/gpu/drm/amd/amdgpu/vid.h

index 0050b09d588367199037d21a7c17778f18fea50e..c59bb38c091f438c7e6478fad91f35bd54605300 100644 (file)
@@ -6564,6 +6564,9 @@ static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
 
        control |= ib->length_dw | (vm_id << 24);
 
+       if (amdgpu_sriov_vf(ring->adev) && ib->flags & AMDGPU_IB_FLAG_PREEMPT)
+               control |= INDIRECT_BUFFER_PRE_ENB(1);
+
        amdgpu_ring_write(ring, header);
        amdgpu_ring_write(ring,
 #ifdef __BIG_ENDIAN
index 7a3863a45f0af64e07a2b4657b6011a67133c4c2..b3a86e0e96e6b2470e105ebbeb7c5ef48090235a 100644 (file)
                 * 1 - Stream
                 * 2 - Bypass
                 */
+#define     INDIRECT_BUFFER_PRE_ENB(x)          ((x) << 21)
 #define        PACKET3_COPY_DATA                               0x40
 #define        PACKET3_PFP_SYNC_ME                             0x42
 #define        PACKET3_SURFACE_SYNC                            0x43