amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/4] SWDEV-227334 - No need support vcn decode
@ 2020-03-25  8:32 Emily Deng
  2020-03-25  8:33 ` [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display Emily Deng
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Emily Deng @ 2020-03-25  8:32 UTC (permalink / raw)
  To: amd-gfx; +Cc: Emily Deng

As no need to support vcn decode feature, so diable the
ring.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
index ec8091a..febd4c2 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
@@ -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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display
  2020-03-25  8:32 [PATCH 2/4] SWDEV-227334 - No need support vcn decode Emily Deng
@ 2020-03-25  8:33 ` Emily Deng
  2020-03-25 10:49   ` Liu, Monk
  2020-03-25 15:18   ` Alex Deucher
  2020-03-25  8:33 ` [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp Emily Deng
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 12+ messages in thread
From: Emily Deng @ 2020-03-25  8:33 UTC (permalink / raw)
  To: amd-gfx; +Cc: Emily Deng

Add 4k resolution for virtual connector.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
index 3c9f2d2..8656cb7 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
@@ -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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp
  2020-03-25  8:32 [PATCH 2/4] SWDEV-227334 - No need support vcn decode Emily Deng
  2020-03-25  8:33 ` [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display Emily Deng
@ 2020-03-25  8:33 ` Emily Deng
  2020-03-25 10:49   ` Liu, Monk
                     ` (2 more replies)
  2020-03-25 15:17 ` [PATCH 2/4] SWDEV-227334 - No need support vcn decode Alex Deucher
                   ` (2 subsequent siblings)
  4 siblings, 3 replies; 12+ messages in thread
From: Emily Deng @ 2020-03-25  8:33 UTC (permalink / raw)
  To: amd-gfx; +Cc: 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 <Emily.Deng@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index c2bf2d9..1a46050 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* RE: [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display
  2020-03-25  8:33 ` [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display Emily Deng
@ 2020-03-25 10:49   ` Liu, Monk
  2020-03-25 15:18   ` Alex Deucher
  1 sibling, 0 replies; 12+ messages in thread
From: Liu, Monk @ 2020-03-25 10:49 UTC (permalink / raw)
  To: Deng, Emily, amd-gfx; +Cc: Deng, Emily

Reviewed-by: Monk Liu < monk.liu@amd.com>

_____________________________________
Monk Liu|GPU Virtualization Team |AMD


-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Emily Deng
Sent: Wednesday, March 25, 2020 4:33 PM
To: amd-gfx@lists.freedesktop.org
Cc: Deng, Emily <Emily.Deng@amd.com>
Subject: [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display

Add 4k resolution for virtual connector.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
index 3c9f2d2..8656cb7 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
@@ -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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cmonk.liu%40amd.com%7Cf39c6d882b174facb0b108d7d09740f4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637207220392464369&amp;sdata=NV0xdvR4f%2B76237I5pM8Zd02IU1ZzPZHXpeu8%2BlGb70%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* RE: [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp
  2020-03-25  8:33 ` [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp Emily Deng
@ 2020-03-25 10:49   ` Liu, Monk
  2020-03-25 15:19   ` Alex Deucher
  2020-03-25 15:41   ` Luben Tuikov
  2 siblings, 0 replies; 12+ messages in thread
From: Liu, Monk @ 2020-03-25 10:49 UTC (permalink / raw)
  To: Deng, Emily, amd-gfx; +Cc: Deng, Emily

Reviewed-by: Monk Liu < monk.liu@amd.com>

_____________________________________
Monk Liu|GPU Virtualization Team |AMD


-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Emily Deng
Sent: Wednesday, March 25, 2020 4:33 PM
To: amd-gfx@lists.freedesktop.org
Cc: Deng, Emily <Emily.Deng@amd.com>
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.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index c2bf2d9..1a46050 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -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
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cmonk.liu%40amd.com%7C62d9f9c813ab4abc2d8d08d7d09742a0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637207220397136549&amp;sdata=bdF3bmwXnmsYeJNcgImMHq2o4ambY0VVYCc4gC24zEc%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/4] SWDEV-227334 - No need support vcn decode
  2020-03-25  8:32 [PATCH 2/4] SWDEV-227334 - No need support vcn decode Emily Deng
  2020-03-25  8:33 ` [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display Emily Deng
  2020-03-25  8:33 ` [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp Emily Deng
@ 2020-03-25 15:17 ` Alex Deucher
  2020-03-25 15:33 ` Luben Tuikov
  2020-03-26  3:15 ` Deng, Emily
  4 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2020-03-25 15:17 UTC (permalink / raw)
  To: Emily Deng; +Cc: amd-gfx list

On Wed, Mar 25, 2020 at 4:33 AM Emily Deng <Emily.Deng@amd.com> wrote:
>
> As no need to support vcn decode feature, so diable the
> ring.
>
> Signed-off-by: Emily Deng <Emily.Deng@amd.com>

Please fix the patch title prefix to drm/amdgpu.  An additional comment below.

> ---
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> index ec8091a..febd4c2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> @@ -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:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>


> +       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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display
  2020-03-25  8:33 ` [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display Emily Deng
  2020-03-25 10:49   ` Liu, Monk
@ 2020-03-25 15:18   ` Alex Deucher
  1 sibling, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2020-03-25 15:18 UTC (permalink / raw)
  To: Emily Deng; +Cc: amd-gfx list

On Wed, Mar 25, 2020 at 4:33 AM Emily Deng <Emily.Deng@amd.com> wrote:
>
> Add 4k resolution for virtual connector.
>
> Signed-off-by: Emily Deng <Emily.Deng@amd.com>

Please fix the patch title.  With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> index 3c9f2d2..8656cb7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> @@ -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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp
  2020-03-25  8:33 ` [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp Emily Deng
  2020-03-25 10:49   ` Liu, Monk
@ 2020-03-25 15:19   ` Alex Deucher
  2020-03-25 15:41   ` Luben Tuikov
  2 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2020-03-25 15:19 UTC (permalink / raw)
  To: Emily Deng; +Cc: amd-gfx list

On Wed, Mar 25, 2020 at 4:33 AM Emily Deng <Emily.Deng@amd.com> wrote:
>
> 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 <Emily.Deng@amd.com>

Please fix the patch title.  With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index c2bf2d9..1a46050 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -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
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/4] SWDEV-227334 - No need support vcn decode
  2020-03-25  8:32 [PATCH 2/4] SWDEV-227334 - No need support vcn decode Emily Deng
                   ` (2 preceding siblings ...)
  2020-03-25 15:17 ` [PATCH 2/4] SWDEV-227334 - No need support vcn decode Alex Deucher
@ 2020-03-25 15:33 ` Luben Tuikov
  2020-03-26  3:15 ` Deng, Emily
  4 siblings, 0 replies; 12+ messages in thread
From: Luben Tuikov @ 2020-03-25 15:33 UTC (permalink / raw)
  To: Emily Deng; +Cc: amd-gfx

On 2020-03-25 04:32, Emily Deng wrote:
> As no need to support vcn decode feature, so diable the
> ring.

"diable" --> "disable"

> 
> Signed-off-by: Emily Deng <Emily.Deng@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> index ec8091a..febd4c2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> @@ -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

>  	for (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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp
  2020-03-25  8:33 ` [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp Emily Deng
  2020-03-25 10:49   ` Liu, Monk
  2020-03-25 15:19   ` Alex Deucher
@ 2020-03-25 15:41   ` Luben Tuikov
  2 siblings, 0 replies; 12+ messages in thread
From: Luben Tuikov @ 2020-03-25 15:41 UTC (permalink / raw)
  To: Emily Deng, amd-gfx

On 2020-03-25 04:33, Emily Deng wrote:
> 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.

> 
> Signed-off-by: Emily Deng <Emily.Deng@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index c2bf2d9..1a46050 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -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.

>  
>  	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);
> +

It's unconditionally set here, so you don't need to initialize it when you define it.

Regards,
Luben

>  	/* 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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH 2/4] SWDEV-227334 - No need support vcn decode
  2020-03-25  8:32 [PATCH 2/4] SWDEV-227334 - No need support vcn decode Emily Deng
                   ` (3 preceding siblings ...)
  2020-03-25 15:33 ` Luben Tuikov
@ 2020-03-26  3:15 ` Deng, Emily
  2020-03-26  5:25   ` Liu, Monk
  4 siblings, 1 reply; 12+ messages in thread
From: Deng, Emily @ 2020-03-26  3:15 UTC (permalink / raw)
  To: Deng, Emily, amd-gfx

[AMD Official Use Only - Internal Distribution Only]

Ping.....

Best wishes
Emily Deng
>-----Original Message-----
>From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Emily
>Deng
>Sent: Wednesday, March 25, 2020 4:33 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deng, Emily <Emily.Deng@amd.com>
>Subject: [PATCH 2/4] SWDEV-227334 - No need support vcn decode
>
>As no need to support vcn decode feature, so diable the ring.
>
>Signed-off-by: Emily Deng <Emily.Deng@amd.com>
>---
> drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>index ec8091a..febd4c2 100644
>--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>@@ -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
>
>_______________________________________________
>amd-gfx mailing list
>amd-gfx@lists.freedesktop.org
>https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.free
>desktop.org%2Fmailman%2Flistinfo%2Famd-
>gfx&amp;data=02%7C01%7CEmily.Deng%40amd.com%7Cd7570f695fc64ab688
>b308d7d09733e4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63
>7207220147577735&amp;sdata=vTgILeBbCu5CRPs2aEPs4htoiucE3pYMjPiN2B8
>mEBk%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH 2/4] SWDEV-227334 - No need support vcn decode
  2020-03-26  3:15 ` Deng, Emily
@ 2020-03-26  5:25   ` Liu, Monk
  0 siblings, 0 replies; 12+ messages in thread
From: Liu, Monk @ 2020-03-26  5:25 UTC (permalink / raw)
  To: Deng, Emily, Deng, Emily, amd-gfx

Reviewed-by: Monk Liu <monk.liu@amd.com>

_____________________________________
Monk Liu|GPU Virtualization Team |AMD


-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Deng, Emily
Sent: Thursday, March 26, 2020 11:16 AM
To: Deng, Emily <Emily.Deng@amd.com>; amd-gfx@lists.freedesktop.org
Subject: RE: [PATCH 2/4] SWDEV-227334 - No need support vcn decode

[AMD Official Use Only - Internal Distribution Only]

Ping.....

Best wishes
Emily Deng
>-----Original Message-----
>From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of 
>Emily Deng
>Sent: Wednesday, March 25, 2020 4:33 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deng, Emily <Emily.Deng@amd.com>
>Subject: [PATCH 2/4] SWDEV-227334 - No need support vcn decode
>
>As no need to support vcn decode feature, so diable the ring.
>
>Signed-off-by: Emily Deng <Emily.Deng@amd.com>
>---
> drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>index ec8091a..febd4c2 100644
>--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
>@@ -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
>
>_______________________________________________
>amd-gfx mailing list
>amd-gfx@lists.freedesktop.org
>https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists
>.free
>desktop.org%2Fmailman%2Flistinfo%2Famd-
>gfx&amp;data=02%7C01%7CEmily.Deng%40amd.com%7Cd7570f695fc64ab688
>b308d7d09733e4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63
>7207220147577735&amp;sdata=vTgILeBbCu5CRPs2aEPs4htoiucE3pYMjPiN2B8
>mEBk%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cmonk.liu%40amd.com%7Ca2aeff978efe4cd76a7e08d7d133fee0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637207894223674822&amp;sdata=7Bh3wa53N8F0Nt1ofvOT5mLoKoI7izGj7UlewfwxQtA%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-03-26  5:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25  8:32 [PATCH 2/4] SWDEV-227334 - No need support vcn decode Emily Deng
2020-03-25  8:33 ` [PATCH 3/4] SWDEV-227979 - Add 4k resolution for virtual display Emily Deng
2020-03-25 10:49   ` Liu, Monk
2020-03-25 15:18   ` Alex Deucher
2020-03-25  8:33 ` [PATCH 4/4] SWDEV-226663 - Ignore the not supported error from psp Emily Deng
2020-03-25 10:49   ` Liu, Monk
2020-03-25 15:19   ` Alex Deucher
2020-03-25 15:41   ` Luben Tuikov
2020-03-25 15:17 ` [PATCH 2/4] SWDEV-227334 - No need support vcn decode Alex Deucher
2020-03-25 15:33 ` Luben Tuikov
2020-03-26  3:15 ` Deng, Emily
2020-03-26  5:25   ` Liu, Monk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).