Re: 答复: [PATCH] drm/amdgpu:fix amdgpu_sa_bo_new error

Christian König deathsimple at vodafone.de
Wed Feb 8 15:30:58 UTC 2017


The IB test make the decision if the hardware is working or not.

So they should be the first commands (except for the ring tests) we send 
to the hardware.

When we allocate the fb before the test we send the clear command to the 
hardware without knowing if the hardware really works or not.

Not a big issue, but I think the order makes more sense that way.

Regards,
Christian.

Am 08.02.2017 um 16:21 schrieb Liu, Monk:
>
> yeah, make sense
>
> @Christian, why move fbdev_init() further down after ib test ? any 
> consideration ?
>
> ------------------------------------------------------------------------
> *发件人:* Michel Dänzer <michel at daenzer.net>
> *发送时间:* 2017年2月8日 23:19:23
> *收件人:* Christian König; Liu, Monk
> *抄送:* amd-gfx at lists.freedesktop.org
> *主题:* Re: [PATCH] drm/amdgpu:fix amdgpu_sa_bo_new error
> On 08/02/17 07:52 PM, Christian König wrote:
> > Am 08.02.2017 um 10:41 schrieb Monk Liu:
> >> ib_pool init should prior to fbdev_init, otherwise
> >> there will be error from amdgpu_sa_bo_new
> >> (amdgpu_sa.c:323)
> >>
> >> fbdev_init will call ttm_validate which further call
> >> amdgpu_sa_bo_new.
> >>
> >> Change-Id: I3a969570d443f61a44f67b0d76b3871ca5c3ea81
> >> Signed-off-by: Monk Liu <Monk.Liu at amd.com>
> >> ---
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
> >>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> >> index afcae15..4169bb1 100644
> >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> >> @@ -1918,14 +1918,14 @@ int amdgpu_device_init(struct amdgpu_device
> >> *adev,
> >>       /* Get a log2 for easy divisions. */
> >>       adev->mm_stats.log2_max_MBps = ilog2(max(1u, max_MBps));
> >>   -    amdgpu_fbdev_init(adev);
> >> -
> >>       r = amdgpu_ib_pool_init(adev);
> >>       if (r) {
> >>           dev_err(adev->dev, "IB initialization failed (%d).\n", r);
> >>           goto failed;
> >>       }
> >>   +    amdgpu_fbdev_init(adev);
> >> +
> >
> > As noted internally as well, please more that one more further down
> > behind the call to amdgpu_ib_ring_tests().
>
> If I understand correctly, that could result in no console output in the
> worst case if there's trouble with the ring & IB tests? That doesn't
> seem very good.
>
>
> -- 
> Earthling Michel Dänzer               | http://www.amd.com 
> <http://www.amd.com>
> Libre software enthusiast             |             Mesa and X developer
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20170208/d0f613c8/attachment.html>


More information about the amd-gfx mailing list