uapi/drm:change Preamble Description
Subsystems (3)
PATCH 1/4 uapi/drm:change Preamble Description
Preamble in linux doesn't mean it is CE PREAMBLE IB, instead it means this IB could be dropped if no ctx switch happens.
--- include/uapi/drm/amdgpu_drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/drm/amdgpu_drm.h +1 -1
@@ -426,7 +426,7 @@ union drm_amdgpu_cs {/* This IB should be submitted to CE */ #define AMDGPU_IB_FLAG_CE (1<<0) -/* CE Preamble */ +/* Preamble flag, which means the IB could be dropped if no context switch */ #define AMDGPU_IB_FLAG_PREAMBLE (1<<1)struct drm_amdgpu_cs_chunk_ib {
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1488959642-15014-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org
PATCH 2/4 uapi/drm:add new flag for Preemption
when MCBP supported, we will set pre_enb bit for those IBs with PREEMPT flag tagged
--- include/uapi/drm/amdgpu_drm.h | 3 +++ 1 file changed, 3 insertions(+)
include/uapi/drm/amdgpu_drm.h +3 -0
@@ -429,6 +429,9 @@ union drm_amdgpu_cs {/* Preamble flag, which means the IB could be dropped if no context switch */ #define AMDGPU_IB_FLAG_PREAMBLE (1<<1) +/* Preempt flag, IB should set Pre_enb bit if PREEMPT flag detected */ +#define AMDGPU_IB_FLAG_PREEMPT (1<<2) +struct drm_amdgpu_cs_chunk_ib {__u32 _pad;/** AMDGPU_IB_FLAG_* */
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 drm/amdgpu:protect cs submit
In reply to a message not in the archiveto prevent submit two or more IBs with PREEMPT flags.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +12 -1
@@ -877,7 +877,7 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,struct amdgpu_fpriv *fpriv = parser->filp->driver_priv;struct amdgpu_vm *vm = &fpriv->vm;int i, j; -int r; +int r, ce_preempt =0 , de_preempt =0 ;for (i =0 , j =0 ; i < parser->nchunks && j < parser->job->num_ibs; i++) {struct amdgpu_cs_chunk *chunk;
@@ -892,6 +892,17 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,if (chunk->chunk_id !=AMDGPU_CHUNK_ID_IB )continue ; +if (ib->flags &AMDGPU_IB_FLAG_PREEMPT ) { +if (ib->flags &AMDGPU_IB_FLAG_CE ) + ce_preempt++; +else + de_preempt++; + } + +/* only one preemptible IB per submit for me/ce */ +if (ce_preempt >1 || de_preempt >1 ) +return -EINVAL ; + r =amdgpu_cs_get_ring (adev, chunk_ib->ip_type, chunk_ib->ip_instance, chunk_ib->ring, &ring);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/4 drm/amdgpu:enable MCBP for SR-IOV
In reply to a message not in the archive--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +4 -0
@@ -6552,6 +6552,10 @@ static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring, control |= ib->length_dw | (vm_id <<24 ); +if (ring &&amdgpu_sriov_vf (ring->adev) && + ib->flags &AMDGPU_IB_FLAG_PREEMPT ) + control |= (1 <<21 ); +amdgpu_ring_write (ring, header); amdgpu_ring_write(ring,#ifdef __BIG_ENDIAN
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1488959642-15014-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org
答复: [PATCH 4/4] drm/amdgpu:enable MCBP for SR-IOV
Anyone review the 4 patches and another libdrm patch ?
-----邮件原件-----
发件人: amd-gfx [mailto:[email protected]] 代表 Monk Liu 发送时间: Wednesday, March 08, 2017 3:54 PM
收件人: [email protected]
抄送: Liu, Monk <[email protected]>
主题: [PATCH 4/4] drm/amdgpu:enable MCBP for SR-IOV
--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +4 -0
@@ -6552,6 +6552,10 @@ static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring, control |= ib->length_dw | (vm_id <<24 ); +if (ring &&amdgpu_sriov_vf (ring->adev) && + ib->flags &AMDGPU_IB_FLAG_PREEMPT ) + control |= (1 <<21 ); +amdgpu_ring_write (ring, header); amdgpu_ring_write(ring,#ifdef __BIG_ENDIAN
Signature · 10 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): DM5PR12MB1610D5E943F061927431C7C784210-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Re: 答复: [PATCH 4/4] drm/amdgpu:enable MCBP for SR-IOV
Sorry my spam filter completely blocked this set, not idea why.
Did send out a review about a minute ago.
Christian.
Am 09.03.2017 um 05:19 schrieb Liu, Monk:
Quoted 22 lines
Anyone review the 4 patches and another libdrm patch ?
-----邮件原件-----
发件人: amd-gfx [mailto:[email protected]] 代表 Monk Liu 发送时间: Wednesday, March 08, 2017 3:54 PM
收件人: [email protected]
抄送: Liu, Monk <[email protected]>
主题: [PATCH 4/4] drm/amdgpu:enable MCBP for SR-IOVChange-Id I779abc6a47593be0ff5234c3e2f2cdfd25ba70caSigned-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring, · line 6561
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +4
-0@@ -6552,6 +6552,10 @@ static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring, control |= ib->length_dw | (vm_id <<24 ); +if (ring &&amdgpu_sriov_vf (ring->adev) && + ib->flags &AMDGPU_IB_FLAG_PREEMPT ) + control |= (1 <<21 ); +amdgpu_ring_write (ring, header); amdgpu_ring_write(ring,#ifdef __BIG_ENDIAN
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 4/4] drm/amdgpu:enable MCBP for SR-IOV
In reply to a message not in the archiveYou need a commit message here. Something like "apply the new IB flag during command submission".
Am 08.03.2017 um 08:54 schrieb Monk Liu:
Quoted 11 lines
Change-Id I779abc6a47593be0ff5234c3e2f2cdfd25ba70caSigned-off-by Monk Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring, · line 6558
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +4
-0@@ -6552,6 +6552,10 @@ static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring, control |= ib->length_dw | (vm_id <<24 ); +if (ring &&amdgpu_sriov_vf (ring->adev) && + ib->flags &AMDGPU_IB_FLAG_PREEMPT ) + control |= (1 <<21 ); +
The check for ring being NULL is superfluous and the indentation of the "ib->flags & AMDGPU_IB_FLAG_PREEMPT" is wrong.
Apart from that the series is Reviewed-by: Christian König <[email protected]>.
Christian
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static void gfx_v8_0_ring_emit_ib_gfx(struct amdgpu_ring *ring, · line 6561
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0
-0amdgpu_ring_write (ring, header); amdgpu_ring_write(ring,#ifdef __BIG_ENDIAN
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx