* [PATCH] drm/radeon/uvd: revert lower msg&fb buffer requirements on UVD3
@ 2013-10-15 18:12 Christian König
2013-10-15 21:05 ` Alex Deucher
2013-10-15 22:05 ` Grigori Goronzy
0 siblings, 2 replies; 4+ messages in thread
From: Christian König @ 2013-10-15 18:12 UTC (permalink / raw)
To: dri-devel
From: Christian König <christian.koenig@amd.com>
This only seem to work for H.264 but not for VC-1 streams.
Need to investigate further why exactly.
This reverts commit 4b40e5921230beb1951f04d2b1b92c4c88fbad43.
Signed-off-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/radeon/radeon_cs.c | 3 +--
drivers/gpu/drm/radeon/radeon_uvd.c | 3 ++-
drivers/gpu/drm/radeon/uvd_v1_0.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 66c2228..80285e3 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -85,9 +85,8 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
VRAM, also but everything into VRAM on AGP cards to avoid
image corruptions */
if (p->ring == R600_RING_TYPE_UVD_INDEX &&
- p->rdev->family < CHIP_PALM &&
(i == 0 || drm_pci_device_is_agp(p->rdev->ddev))) {
-
+ /* TODO: is this still needed for NI+ ? */
p->relocs[i].lobj.domain =
RADEON_GEM_DOMAIN_VRAM;
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
index 4f2e73f..308eff5 100644
--- a/drivers/gpu/drm/radeon/radeon_uvd.c
+++ b/drivers/gpu/drm/radeon/radeon_uvd.c
@@ -476,7 +476,8 @@ static int radeon_uvd_cs_reloc(struct radeon_cs_parser *p,
return -EINVAL;
}
- if (p->rdev->family < CHIP_PALM && (cmd == 0 || cmd == 0x3) &&
+ /* TODO: is this still necessary on NI+ ? */
+ if ((cmd == 0 || cmd == 0x3) &&
(start >> 28) != (p->rdev->uvd.gpu_addr >> 28)) {
DRM_ERROR("msg/fb buffer %LX-%LX out of 256MB segment!\n",
start, end);
diff --git a/drivers/gpu/drm/radeon/uvd_v1_0.c b/drivers/gpu/drm/radeon/uvd_v1_0.c
index 3100fa9..7266805 100644
--- a/drivers/gpu/drm/radeon/uvd_v1_0.c
+++ b/drivers/gpu/drm/radeon/uvd_v1_0.c
@@ -212,8 +212,8 @@ int uvd_v1_0_start(struct radeon_device *rdev)
/* enable VCPU clock */
WREG32(UVD_VCPU_CNTL, 1 << 9);
- /* enable UMC and NC0 */
- WREG32_P(UVD_LMI_CTRL2, 1 << 13, ~((1 << 8) | (1 << 13)));
+ /* enable UMC */
+ WREG32_P(UVD_LMI_CTRL2, 0, ~(1 << 8));
/* boot up the VCPU */
WREG32(UVD_SOFT_RESET, 0);
--
1.8.1.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/radeon/uvd: revert lower msg&fb buffer requirements on UVD3
2013-10-15 18:12 [PATCH] drm/radeon/uvd: revert lower msg&fb buffer requirements on UVD3 Christian König
@ 2013-10-15 21:05 ` Alex Deucher
2013-10-15 22:05 ` Grigori Goronzy
1 sibling, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2013-10-15 21:05 UTC (permalink / raw)
To: Christian König; +Cc: Maling list - DRI developers
On Tue, Oct 15, 2013 at 2:12 PM, Christian König
<deathsimple@vodafone.de> wrote:
> From: Christian König <christian.koenig@amd.com>
>
> This only seem to work for H.264 but not for VC-1 streams.
>
> Need to investigate further why exactly.
>
> This reverts commit 4b40e5921230beb1951f04d2b1b92c4c88fbad43.
>
Applied.
Thanks.
Alex
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_cs.c | 3 +--
> drivers/gpu/drm/radeon/radeon_uvd.c | 3 ++-
> drivers/gpu/drm/radeon/uvd_v1_0.c | 4 ++--
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index 66c2228..80285e3 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -85,9 +85,8 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
> VRAM, also but everything into VRAM on AGP cards to avoid
> image corruptions */
> if (p->ring == R600_RING_TYPE_UVD_INDEX &&
> - p->rdev->family < CHIP_PALM &&
> (i == 0 || drm_pci_device_is_agp(p->rdev->ddev))) {
> -
> + /* TODO: is this still needed for NI+ ? */
> p->relocs[i].lobj.domain =
> RADEON_GEM_DOMAIN_VRAM;
>
> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
> index 4f2e73f..308eff5 100644
> --- a/drivers/gpu/drm/radeon/radeon_uvd.c
> +++ b/drivers/gpu/drm/radeon/radeon_uvd.c
> @@ -476,7 +476,8 @@ static int radeon_uvd_cs_reloc(struct radeon_cs_parser *p,
> return -EINVAL;
> }
>
> - if (p->rdev->family < CHIP_PALM && (cmd == 0 || cmd == 0x3) &&
> + /* TODO: is this still necessary on NI+ ? */
> + if ((cmd == 0 || cmd == 0x3) &&
> (start >> 28) != (p->rdev->uvd.gpu_addr >> 28)) {
> DRM_ERROR("msg/fb buffer %LX-%LX out of 256MB segment!\n",
> start, end);
> diff --git a/drivers/gpu/drm/radeon/uvd_v1_0.c b/drivers/gpu/drm/radeon/uvd_v1_0.c
> index 3100fa9..7266805 100644
> --- a/drivers/gpu/drm/radeon/uvd_v1_0.c
> +++ b/drivers/gpu/drm/radeon/uvd_v1_0.c
> @@ -212,8 +212,8 @@ int uvd_v1_0_start(struct radeon_device *rdev)
> /* enable VCPU clock */
> WREG32(UVD_VCPU_CNTL, 1 << 9);
>
> - /* enable UMC and NC0 */
> - WREG32_P(UVD_LMI_CTRL2, 1 << 13, ~((1 << 8) | (1 << 13)));
> + /* enable UMC */
> + WREG32_P(UVD_LMI_CTRL2, 0, ~(1 << 8));
>
> /* boot up the VCPU */
> WREG32(UVD_SOFT_RESET, 0);
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/radeon/uvd: revert lower msg&fb buffer requirements on UVD3
2013-10-15 18:12 [PATCH] drm/radeon/uvd: revert lower msg&fb buffer requirements on UVD3 Christian König
2013-10-15 21:05 ` Alex Deucher
@ 2013-10-15 22:05 ` Grigori Goronzy
2013-10-16 7:15 ` Christian König
1 sibling, 1 reply; 4+ messages in thread
From: Grigori Goronzy @ 2013-10-15 22:05 UTC (permalink / raw)
To: Christian König, dri-devel
On 15.10.2013 20:12, Christian König wrote:
> From: Christian König <christian.koenig@amd.com>
>
> This only seem to work for H.264 but not for VC-1 streams.
>
> Need to investigate further why exactly.
>
Thanks for the quick investigation. This is really strange. The
corruption looks very similar to what I saw with VC-1 simple/main
earlier, before it was disabled. Could there be some kind of connection?
Grigori
> This reverts commit 4b40e5921230beb1951f04d2b1b92c4c88fbad43.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_cs.c | 3 +--
> drivers/gpu/drm/radeon/radeon_uvd.c | 3 ++-
> drivers/gpu/drm/radeon/uvd_v1_0.c | 4 ++--
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index 66c2228..80285e3 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -85,9 +85,8 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
> VRAM, also but everything into VRAM on AGP cards to avoid
> image corruptions */
> if (p->ring == R600_RING_TYPE_UVD_INDEX &&
> - p->rdev->family < CHIP_PALM &&
> (i == 0 || drm_pci_device_is_agp(p->rdev->ddev))) {
> -
> + /* TODO: is this still needed for NI+ ? */
> p->relocs[i].lobj.domain =
> RADEON_GEM_DOMAIN_VRAM;
>
> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
> index 4f2e73f..308eff5 100644
> --- a/drivers/gpu/drm/radeon/radeon_uvd.c
> +++ b/drivers/gpu/drm/radeon/radeon_uvd.c
> @@ -476,7 +476,8 @@ static int radeon_uvd_cs_reloc(struct radeon_cs_parser *p,
> return -EINVAL;
> }
>
> - if (p->rdev->family < CHIP_PALM && (cmd == 0 || cmd == 0x3) &&
> + /* TODO: is this still necessary on NI+ ? */
> + if ((cmd == 0 || cmd == 0x3) &&
> (start >> 28) != (p->rdev->uvd.gpu_addr >> 28)) {
> DRM_ERROR("msg/fb buffer %LX-%LX out of 256MB segment!\n",
> start, end);
> diff --git a/drivers/gpu/drm/radeon/uvd_v1_0.c b/drivers/gpu/drm/radeon/uvd_v1_0.c
> index 3100fa9..7266805 100644
> --- a/drivers/gpu/drm/radeon/uvd_v1_0.c
> +++ b/drivers/gpu/drm/radeon/uvd_v1_0.c
> @@ -212,8 +212,8 @@ int uvd_v1_0_start(struct radeon_device *rdev)
> /* enable VCPU clock */
> WREG32(UVD_VCPU_CNTL, 1 << 9);
>
> - /* enable UMC and NC0 */
> - WREG32_P(UVD_LMI_CTRL2, 1 << 13, ~((1 << 8) | (1 << 13)));
> + /* enable UMC */
> + WREG32_P(UVD_LMI_CTRL2, 0, ~(1 << 8));
>
> /* boot up the VCPU */
> WREG32(UVD_SOFT_RESET, 0);
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/radeon/uvd: revert lower msg&fb buffer requirements on UVD3
2013-10-15 22:05 ` Grigori Goronzy
@ 2013-10-16 7:15 ` Christian König
0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2013-10-16 7:15 UTC (permalink / raw)
To: Grigori Goronzy, dri-devel
Am 16.10.2013 00:05, schrieb Grigori Goronzy:
> On 15.10.2013 20:12, Christian König wrote:
>> From: Christian König <christian.koenig@amd.com>
>>
>> This only seem to work for H.264 but not for VC-1 streams.
>>
>> Need to investigate further why exactly.
>>
>
> Thanks for the quick investigation. This is really strange. The
> corruption looks very similar to what I saw with VC-1 simple/main
> earlier, before it was disabled. Could there be some kind of connection?
>
Codecs usually work from top left to bottom right. What happens here is
that the decoding process initially works fine and then hits a point
where it needs a parameter from the message buffer. This parameter is
missing/incorrect because it uses the wrong segment identifier for the
memory access.
So decoding fails and we only end up with a few correct pixels at the
top and only garbage in the rest of the image. The same thing currently
happens with MPEG1 streams as well.
It's not really related apart from the fact that all failed decoding
processes look more or less the same.
Christian.
> Grigori
>
>> This reverts commit 4b40e5921230beb1951f04d2b1b92c4c88fbad43.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> ---
>> drivers/gpu/drm/radeon/radeon_cs.c | 3 +--
>> drivers/gpu/drm/radeon/radeon_uvd.c | 3 ++-
>> drivers/gpu/drm/radeon/uvd_v1_0.c | 4 ++--
>> 3 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c
>> b/drivers/gpu/drm/radeon/radeon_cs.c
>> index 66c2228..80285e3 100644
>> --- a/drivers/gpu/drm/radeon/radeon_cs.c
>> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
>> @@ -85,9 +85,8 @@ static int radeon_cs_parser_relocs(struct
>> radeon_cs_parser *p)
>> VRAM, also but everything into VRAM on AGP cards to avoid
>> image corruptions */
>> if (p->ring == R600_RING_TYPE_UVD_INDEX &&
>> - p->rdev->family < CHIP_PALM &&
>> (i == 0 || drm_pci_device_is_agp(p->rdev->ddev))) {
>> -
>> + /* TODO: is this still needed for NI+ ? */
>> p->relocs[i].lobj.domain =
>> RADEON_GEM_DOMAIN_VRAM;
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c
>> b/drivers/gpu/drm/radeon/radeon_uvd.c
>> index 4f2e73f..308eff5 100644
>> --- a/drivers/gpu/drm/radeon/radeon_uvd.c
>> +++ b/drivers/gpu/drm/radeon/radeon_uvd.c
>> @@ -476,7 +476,8 @@ static int radeon_uvd_cs_reloc(struct
>> radeon_cs_parser *p,
>> return -EINVAL;
>> }
>>
>> - if (p->rdev->family < CHIP_PALM && (cmd == 0 || cmd == 0x3) &&
>> + /* TODO: is this still necessary on NI+ ? */
>> + if ((cmd == 0 || cmd == 0x3) &&
>> (start >> 28) != (p->rdev->uvd.gpu_addr >> 28)) {
>> DRM_ERROR("msg/fb buffer %LX-%LX out of 256MB segment!\n",
>> start, end);
>> diff --git a/drivers/gpu/drm/radeon/uvd_v1_0.c
>> b/drivers/gpu/drm/radeon/uvd_v1_0.c
>> index 3100fa9..7266805 100644
>> --- a/drivers/gpu/drm/radeon/uvd_v1_0.c
>> +++ b/drivers/gpu/drm/radeon/uvd_v1_0.c
>> @@ -212,8 +212,8 @@ int uvd_v1_0_start(struct radeon_device *rdev)
>> /* enable VCPU clock */
>> WREG32(UVD_VCPU_CNTL, 1 << 9);
>>
>> - /* enable UMC and NC0 */
>> - WREG32_P(UVD_LMI_CTRL2, 1 << 13, ~((1 << 8) | (1 << 13)));
>> + /* enable UMC */
>> + WREG32_P(UVD_LMI_CTRL2, 0, ~(1 << 8));
>>
>> /* boot up the VCPU */
>> WREG32(UVD_SOFT_RESET, 0);
>>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-16 7:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 18:12 [PATCH] drm/radeon/uvd: revert lower msg&fb buffer requirements on UVD3 Christian König
2013-10-15 21:05 ` Alex Deucher
2013-10-15 22:05 ` Grigori Goronzy
2013-10-16 7:15 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.