Re: [PATCH] drm/amdgpu: fix structurally dead code vcn_v2_5_hw_init

2019-10-02 Thread Gustavo A. R. Silva
On 10/1/19 17:21, Liu, Leo wrote: OK. So, maybe we can add a comment pointing that out? >>> That could be better. >>> >> Great. I'm glad it's not a bug. I'll write a patch for that so other >> people don't waste time taking a look. > > Thanks, just sent two patches to add comment, and lon

Re: [PATCH] drm/amdgpu: fix structurally dead code vcn_v2_5_hw_init

2019-10-01 Thread Liu, Leo
On 2019-10-01 5:57 p.m., Gustavo A. R. Silva wrote: > > On 10/1/19 16:46, Liu, Leo wrote: > > + ring->sched.ready = true; This is redundant. all the sched->ready is initialized as true, please refer to drm_sched_init() >>> I see... so in the following commit 1b61de45dfaf

Re: [PATCH] drm/amdgpu: fix structurally dead code vcn_v2_5_hw_init

2019-10-01 Thread Gustavo A. R. Silva
On 10/1/19 16:46, Liu, Leo wrote: + ring->sched.ready = true; >>> This is redundant. all the sched->ready is initialized as true, please >>> refer to drm_sched_init() >>> >> I see... so in the following commit 1b61de45dfaf ("drm/amdgpu: add initial >> VCN2.0 support (v2)") >> that

Re: [PATCH] drm/amdgpu: fix structurally dead code vcn_v2_5_hw_init

2019-10-01 Thread Gustavo A. R. Silva
Hi, On 10/1/19 16:29, Liu, Leo wrote: > > On 2019-10-01 1:16 p.m., Gustavo A. R. Silva wrote: >> Notice that there is a *continue* statement in the middle of the >> for loop and that prevents the code below from ever being reached: >> >> r = amdgpu_ring_test_ring(ring); >> if (r) { >>

Re: [PATCH] drm/amdgpu: fix structurally dead code vcn_v2_5_hw_init

2019-10-01 Thread Liu, Leo
On 2019-10-01 5:43 p.m., Gustavo A. R. Silva wrote: > Hi, > > On 10/1/19 16:29, Liu, Leo wrote: >> On 2019-10-01 1:16 p.m., Gustavo A. R. Silva wrote: >>> Notice that there is a *continue* statement in the middle of the >>> for loop and that prevents the code below from ever being reached: >>> >>>

Re: [PATCH] drm/amdgpu: fix structurally dead code vcn_v2_5_hw_init

2019-10-01 Thread Liu, Leo
On 2019-10-01 1:16 p.m., Gustavo A. R. Silva wrote: > Notice that there is a *continue* statement in the middle of the > for loop and that prevents the code below from ever being reached: > > r = amdgpu_ring_test_ring(ring); > if (r) { > ring->sched.ready = false; >

[PATCH] drm/amdgpu: fix structurally dead code vcn_v2_5_hw_init

2019-10-01 Thread Gustavo A. R. Silva
Notice that there is a *continue* statement in the middle of the for loop and that prevents the code below from ever being reached: r = amdgpu_ring_test_ring(ring); if (r) { ring->sched.ready = false; goto done; } Fix this by removing the co