SWDEV-227334 - No need support vcn decode
Subsystems (2)
PATCH 2/4 SWDEV-227334 - No need support vcn decode
As no need to support vcn decode feature, so diable the ring.
--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +4 -0
@@ -223,6 +223,10 @@ static int vcn_v2_0_hw_init(void *handle)if (r) goto done; +//Disable vcn decode for sriov +if (amdgpu_sriov_vf (adev)) + ring->sched.ready = false; +for (i =0 ; i < adev->vcn.num_enc_rings; ++i) { ring = &adev->vcn.inst->ring_enc[i]; r =amdgpu_ring_test_helper (ring);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 SWDEV-227979 - Add 4k resolution for virtual display
Add 4k resolution for virtual connector.
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +7 -3
@@ -281,7 +281,7 @@ static int dce_virtual_get_modes(struct drm_connector *connector)static const struct mode_size {int w;int h; - } common_modes[17 ] = { + } common_modes[21 ] = { {640 ,480 }, {720 ,480 }, {800 ,600 },
@@ -298,10 +298,14 @@ static int dce_virtual_get_modes(struct drm_connector *connector) {1680, 1050}, {1600, 1200}, {1920, 1080}, - {1920, 1200} + {1920, 1200}, + {4096, 3112}, + {3656, 2664}, + {3840, 2160}, + {4096, 2160}, }; -for (i =0 ; i <17 ; i++) { +for (i =0 ; i <21 ; i++) { mode =drm_cvt_mode (dev, common_modes[i].w, common_modes[i].h,60 , false, false, false);drm_mode_probed_add (connector, mode); }
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display
_____________________________________
Monk Liu|GPU Virtualization Team |AMD
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily Deng
Sent: Wednesday, March 25, 2020 4:33 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display
Add 4k resolution for virtual connector.
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +7 -3
@@ -281,7 +281,7 @@ static int dce_virtual_get_modes(struct drm_connector *connector)static const struct mode_size {int w;int h; - } common_modes[17 ] = { + } common_modes[21 ] = { {640 ,480 }, {720 ,480 }, {800 ,600 },
@@ -298,10 +298,14 @@ static int dce_virtual_get_modes(struct drm_connector *connector) {1680, 1050}, {1600, 1200}, {1920, 1080}, - {1920, 1200} + {1920, 1200}, + {4096, 3112}, + {3656, 2664}, + {3840, 2160}, + {4096, 2160}, }; -for (i =0 ; i <17 ; i++) { +for (i =0 ; i <21 ; i++) { mode =drm_cvt_mode (dev, common_modes[i].w, common_modes[i].h,60 , false, false, false);drm_mode_probed_add (connector, mode); }
Signature · 10 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cmonk.liu%40amd.com%7Cf39c6d882b174facb0b108d7d09740f4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637207220392464369&sdata=NV0xdvR4f%2B76237I5pM8Zd02IU1ZzPZHXpeu8%2BlGb70%3D&reserved=0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display
In reply to Emily DengQuoted 4 lines · Emily Deng
Add 4k resolution for virtual connector.
Signed-off-by Emily Deng <[email protected]>
Please fix the patch title. With that fixed:
Quoted 37 lines
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_virtual.c +7
-4@@ -281,7 +281,7 @@ static int dce_virtual_get_modes(struct drm_connector *connector)static const struct mode_size {int w;int h; - } common_modes[17 ] = { + } common_modes[21 ] = { {640 ,480 }, {720 ,480 }, {800 ,600 },@@ -298,10 +298,14 @@ static int dce_virtual_get_modes(struct drm_connector *connector) {1680, 1050}, {1600, 1200}, {1920, 1080}, - {1920, 1200} + {1920, 1200}, + {4096, 3112}, + {3656, 2664}, + {3840, 2160}, + {4096, 2160}, }; -for (i =0 ; i <17 ; i++) { +for (i =0 ; i <21 ; i++) { mode =drm_cvt_mode (dev, common_modes[i].w, common_modes[i].h,60 , false, false, false);drm_mode_probed_add (connector, mode); } --2.7.4
Quoted 4 lines
_______________________________________________
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
PATCH 4/4 SWDEV-226663 - Ignore the not supported error from psp
In reply to Emily DengAs the VCN firmware will not use
vf vmr now. And new psp policy won't support set tmr now.
For driver compatible issue, ignore the not support error.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +5 -1
@@ -205,6 +205,7 @@ psp_cmd_submit_buf(struct psp_context *psp,int index;int timeout =2000 ;bool ras_intr = false; +bool skip_unsupport = false;mutex_lock (&psp->mutex);
@@ -236,6 +237,9 @@ psp_cmd_submit_buf(struct psp_context *psp,amdgpu_asic_invalidate_hdp (psp->adev,NULL ); } +/* We allow TEE_ERROR_NOT_SUPPORTED for VMR command in SRIOV */ + skip_unsupport = (psp->cmd_buf_mem->resp.status ==0xffff000a ) &&amdgpu_sriov_vf (psp->adev); +/* In some cases, psp response status is not 0 even there is no * problem while the command is submitted. Some version of PSP FW * doesn't write 0 to that field.
@@ -243,7 +247,7 @@ psp_cmd_submit_buf(struct psp_context *psp,* during psp initialization to avoid breaking hw_init and it doesn't * return -EINVAL. */ -if ((psp->cmd_buf_mem->resp.status || !timeout) && !ras_intr) { +if (!skip_unsupport && (psp->cmd_buf_mem->resp.status || !timeout) && !ras_intr) {if (ucode)DRM_WARN ("failed to load ucode id (%d) " , ucode->ucode_id);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp
_____________________________________
Monk Liu|GPU Virtualization Team |AMD
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily Deng
Sent: Wednesday, March 25, 2020 4:33 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp
As the VCN firmware will not use
vf vmr now. And new psp policy won't support set tmr now. For driver compatible issue, ignore the not support error.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +5 -0
@@ -205,6 +205,7 @@ psp_cmd_submit_buf(struct psp_context *psp,int index;int timeout =2000 ;bool ras_intr = false; +bool skip_unsupport = false;mutex_lock (&psp->mutex);
@@ -236,6 +237,9 @@ psp_cmd_submit_buf(struct psp_context *psp,amdgpu_asic_invalidate_hdp (psp->adev,NULL ); } +/* We allow TEE_ERROR_NOT_SUPPORTED for VMR command in SRIOV */ + skip_unsupport = (psp->cmd_buf_mem->resp.status ==0xffff000a ) && +amdgpu_sriov_vf (psp->adev); +/* In some cases, psp response status is not 0 even there is no * problem while the command is submitted. Some version of PSP FW
* doesn't write 0 to that field.
@@ -243,7 +247,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
* during psp initialization to avoid breaking hw_init and it doesn't
* return -EINVAL.
*/
- if ((psp->cmd_buf_mem->resp.status || !timeout) && !ras_intr) {
+ if (!skip_unsupport && (psp->cmd_buf_mem->resp.status || !timeout) &&
+!ras_intr) {
if (ucode)
DRM_WARN("failed to load ucode id (%d) ",
ucode->ucode_id);
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cmonk.liu%40amd.com%7C62d9f9c813ab4abc2d8d08d7d09742a0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637207220397136549&sdata=bdF3bmwXnmsYeJNcgImMHq2o4ambY0VVYCc4gC24zEc%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp
In reply to Emily DengQuoted 7 lines · Emily Deng
As the VCN firmware will not use
vf vmr now. And new psp policy won't support set tmr now.
For driver compatible issue, ignore the not support error.Signed-off-by Emily Deng <[email protected]>
Please fix the patch title. With that fixed:
Quoted 38 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +5
-2@@ -205,6 +205,7 @@ psp_cmd_submit_buf(struct psp_context *psp,int index;int timeout =2000 ;bool ras_intr = false; +bool skip_unsupport = false;mutex_lock (&psp->mutex);@@ -236,6 +237,9 @@ psp_cmd_submit_buf(struct psp_context *psp,amdgpu_asic_invalidate_hdp (psp->adev,NULL ); } +/* We allow TEE_ERROR_NOT_SUPPORTED for VMR command in SRIOV */ + skip_unsupport = (psp->cmd_buf_mem->resp.status ==0xffff000a ) &&amdgpu_sriov_vf (psp->adev); +/* In some cases, psp response status is not 0 even there is no * problem while the command is submitted. Some version of PSP FW * doesn't write 0 to that field. @@ -243,7 +247,7 @@ psp_cmd_submit_buf(struct psp_context *psp,* during psp initialization to avoid breaking hw_init and it doesn't * return -EINVAL. */ -if ((psp->cmd_buf_mem->resp.status || !timeout) && !ras_intr) { +if (!skip_unsupport && (psp->cmd_buf_mem->resp.status || !timeout) && !ras_intr) {if (ucode)DRM_WARN ("failed to load ucode id (%d) " , ucode->ucode_id); --2.7.4
Quoted 4 lines
_______________________________________________
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
Re: [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp
In reply to Emily DengQuoted 4 lines · Emily Deng
As the VCN firmware will not use
vf vmr now. And new psp policy won't support set tmr now.
For driver compatible issue, ignore the not support error.
The line wrap is a bit off here.
Quoted 11 lines
Signed-off-by Emily Deng <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c psp_cmd_submit_buf(struct psp_context *psp, · line 208
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1
-0@@ -205,6 +205,7 @@ psp_cmd_submit_buf(struct psp_context *psp,int index;int timeout =2000 ;bool ras_intr = false; +bool skip_unsupport = false;
I'd name this "skip_unsupported", or "skip_unsupp".
You shouldn't have to initialize "skip_unsupport" to a value. Leave it uninitialized. You want the compiler to warn you if you're using it uninitialized, and show you the path(s) where this happens, so you can check the logic of the patch.
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c psp_cmd_submit_buf(struct psp_context *psp, · line 242
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3
-0mutex_lock (&psp->mutex);@@ -236,6 +237,9 @@ psp_cmd_submit_buf(struct psp_context *psp,amdgpu_asic_invalidate_hdp (psp->adev,NULL ); } +/* We allow TEE_ERROR_NOT_SUPPORTED for VMR command in SRIOV */ + skip_unsupport = (psp->cmd_buf_mem->resp.status ==0xffff000a ) &&amdgpu_sriov_vf (psp->adev); +
It's unconditionally set here, so you don't need to initialize it when you define it.
Regards,
Luben
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c psp_cmd_submit_buf(struct psp_context *psp, · line 253
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1
-1/* In some cases, psp response status is not 0 even there is no * problem while the command is submitted. Some version of PSP FW * doesn't write 0 to that field. @@ -243,7 +247,7 @@ psp_cmd_submit_buf(struct psp_context *psp,* during psp initialization to avoid breaking hw_init and it doesn't * return -EINVAL. */ -if ((psp->cmd_buf_mem->resp.status || !timeout) && !ras_intr) { +if (!skip_unsupport && (psp->cmd_buf_mem->resp.status || !timeout) && !ras_intr) {if (ucode)DRM_WARN ("failed to load ucode id (%d) " , ucode->ucode_id);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 5 lines · Emily Deng
As no need to support vcn decode feature, so diable the ring.
Signed-off-by Emily Deng <[email protected]>
Please fix the patch title prefix to drm/amdgpu. An additional comment below.
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c static int vcn_v2_0_hw_init(void *handle) · line 226
Quoted 13 lines
--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +1
-0@@ -223,6 +223,10 @@ static int vcn_v2_0_hw_init(void *handle)if (r) goto done; +//Disable vcn decode for sriov
Please use C style comments.
With those fixed, the patch is:
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +3
-1+if (amdgpu_sriov_vf (adev)) + ring->sched.ready = false; +for (i =0 ; i < adev->vcn.num_enc_rings; ++i) { ring = &adev->vcn.inst->ring_enc[i]; r =amdgpu_ring_test_helper (ring); --2.7.4
Quoted 4 lines
_______________________________________________
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
Quoted 2 lines · Emily Deng
As no need to support vcn decode feature, so diable the ring.
"diable" --> "disable"
Quoted 11 lines
Signed-off-by Emily Deng <[email protected]>--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c static int vcn_v2_0_hw_init(void *handle) · line 229
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +4
-0@@ -223,6 +223,10 @@ static int vcn_v2_0_hw_init(void *handle)if (r) goto done; +//Disable vcn decode for sriov +if (amdgpu_sriov_vf (adev)) + ring->sched.ready = false; +
This is really just,
ring->sched.ready = !amdgpu_sriov_vf(adev);
But I think the compiler is already optimizing it.
Regards,
Luben
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c static int vcn_v2_0_hw_init(void *handle) · line 232
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0
-0for (i =0 ; i < adev->vcn.num_enc_rings; ++i) { ring = &adev->vcn.inst->ring_enc[i]; r =amdgpu_ring_test_helper (ring);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Ping.....
Best wishes
Emily Deng
Quoted 34 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily Deng
Sent: Wednesday, March 25, 2020 4:33 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH 2/4] SWDEV-227334 - No need support vcn decodeAs no need to support vcn decode feature, so diable the ring.
Signed-off-by Emily Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c| 4 ++++1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +4
-1@@ -223,6 +223,10 @@ static int vcn_v2_0_hw_init(void *handle)if (r) goto done; +//Disable vcn decode for sriov +if (amdgpu_sriov_vf (adev)) + ring->sched.ready = false; +for (i =0 ; i < adev->vcn.num_enc_rings; ++i) { ring = &adev->vcn.inst->ring_enc[i]; r =amdgpu_ring_test_helper (ring); --2.7.4
Quoted 9 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.free
desktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=02%7C01%7CEmily.Deng%40amd.com%7Cd7570f695fc64ab688 b308d7d09733e4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63 7207220147577735&sdata=vTgILeBbCu5CRPs2aEPs4htoiucE3pYMjPiN2B8 mEBk%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Liu, Monk
Reviewed-by_____________________________________
Monk Liu|GPU Virtualization Team |AMD
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Deng, Emily
Sent: Thursday, March 26, 2020 11:16 AM
To: Deng, Emily <[email protected]>; [email protected]
Subject: RE: [PATCH 2/4] SWDEV-227334 - No need support vcn decode
[AMD Official Use Only - Internal Distribution Only]
Ping.....
Best wishes
Emily Deng
Quoted 34 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily Deng
Sent: Wednesday, March 25, 2020 4:33 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH 2/4] SWDEV-227334 - No need support vcn decodeAs no need to support vcn decode feature, so diable the ring.
Signed-off-by Emily Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c| 4 ++++1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +4
-1@@ -223,6 +223,10 @@ static int vcn_v2_0_hw_init(void *handle)if (r) goto done; +//Disable vcn decode for sriov +if (amdgpu_sriov_vf (adev)) + ring->sched.ready = false; +for (i =0 ; i < adev->vcn.num_enc_rings; ++i) { ring = &adev->vcn.inst->ring_enc[i]; r =amdgpu_ring_test_helper (ring); --2.7.4
Quoted 10 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists
.free
desktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=02%7C01%7CEmily.Deng%40amd.com%7Cd7570f695fc64ab688 b308d7d09733e4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63 7207220147577735&sdata=vTgILeBbCu5CRPs2aEPs4htoiucE3pYMjPiN2B8 mEBk%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cmonk.liu%40amd.com%7Ca2aeff978efe4cd76a7e08d7d133fee0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637207894223674822&sdata=7Bh3wa53N8F0Nt1ofvOT5mLoKoI7izGj7UlewfwxQtA%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx