[PATCH 3/5] drm/amdgpu/vce:set ring priorities
Sharma, Shashank
shashank.sharma at amd.com
Thu Aug 26 11:38:41 UTC 2021
Hi Satyajit,
On 8/26/2021 1:51 PM, Christian König wrote:
> Am 26.08.21 um 09:13 schrieb Satyajit Sahu:
>> Set proper ring priority while initializing the ring.
>
> Might be merged with patch #1, apart from that looks good to me.
>
> Christian.
Actually it was my suggestion to him to split the patch in such a way
that all IP sw_init changes to go into single patch, as patch 1 was
getting too big with that.
If it is not a problem with Christian, LGTM
Feel free to use: Reviewed-by: Shashank Sharma <shashank.sharma at amd.com>
- Shashank
>
>>
>> Signed-off-by: Satyajit Sahu <satyajit.sahu at amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 4 +++-
>> drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 4 +++-
>> drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 4 +++-
>> 3 files changed, 9 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
>> b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
>> index c7d28c169be5..8ce37e2d5ffd 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
>> @@ -431,10 +431,12 @@ static int vce_v2_0_sw_init(void *handle)
>> return r;
>> for (i = 0; i < adev->vce.num_rings; i++) {
>> + unsigned int hw_prio = amdgpu_vce_get_ring_prio(i);
>> +
>> ring = &adev->vce.ring[i];
>> sprintf(ring->name, "vce%d", i);
>> r = amdgpu_ring_init(adev, ring, 512, &adev->vce.irq, 0,
>> - AMDGPU_RING_PRIO_DEFAULT, NULL);
>> + hw_prio, NULL);
>> if (r)
>> return r;
>> }
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> index 3b82fb289ef6..e0bc42e1e2b3 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
>> @@ -440,10 +440,12 @@ static int vce_v3_0_sw_init(void *handle)
>> return r;
>> for (i = 0; i < adev->vce.num_rings; i++) {
>> + unsigned int hw_prio = amdgpu_vce_get_ring_prio(i);
>> +
>> ring = &adev->vce.ring[i];
>> sprintf(ring->name, "vce%d", i);
>> r = amdgpu_ring_init(adev, ring, 512, &adev->vce.irq, 0,
>> - AMDGPU_RING_PRIO_DEFAULT, NULL);
>> + hw_prio, NULL);
>> if (r)
>> return r;
>> }
>> diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
>> b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
>> index 90910d19db12..931d3ae09c65 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
>> @@ -463,6 +463,8 @@ static int vce_v4_0_sw_init(void *handle)
>> }
>> for (i = 0; i < adev->vce.num_rings; i++) {
>> + unsigned int hw_prio = amdgpu_vce_get_ring_prio(i);
>> +
>> ring = &adev->vce.ring[i];
>> sprintf(ring->name, "vce%d", i);
>> if (amdgpu_sriov_vf(adev)) {
>> @@ -478,7 +480,7 @@ static int vce_v4_0_sw_init(void *handle)
>> ring->doorbell_index =
>> adev->doorbell_index.uvd_vce.vce_ring2_3 * 2 + 1;
>> }
>> r = amdgpu_ring_init(adev, ring, 512, &adev->vce.irq, 0,
>> - AMDGPU_RING_PRIO_DEFAULT, NULL);
>> + hw_prio, NULL);
>> if (r)
>> return r;
>> }
>
More information about the amd-gfx
mailing list