Message ID | 1513142278-4294-2-git-send-email-Hongbo.He@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Am 13.12.2017 um 06:17 schrieb Roger He: > Change-Id: I0c6571c2a64e6c5bdad80ccbcccb40eba1c20b4e > Signed-off-by: Roger He <Hongbo.He@amd.com> We should supply the resv object in amdgpu_cs_bo_validate() as well, or otherwise the deleted object handling won't work as desired any more. Apart from that looks good to me. Christian. > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > index dc0a8be..7c7f56f5 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > @@ -327,7 +327,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, > uint64_t init_value, > struct amdgpu_bo **bo_ptr) > { > - struct ttm_operation_ctx ctx = { !kernel, false }; > + struct ttm_operation_ctx ctx = { !kernel, false, true, resv }; > struct amdgpu_bo *bo; > enum ttm_bo_type type; > unsigned long page_align;
On 2017-12-13 06:17 AM, Roger He wrote: > Change-Id: I0c6571c2a64e6c5bdad80ccbcccb40eba1c20b4e > Signed-off-by: Roger He <Hongbo.He@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > index dc0a8be..7c7f56f5 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c > @@ -327,7 +327,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, > uint64_t init_value, > struct amdgpu_bo **bo_ptr) > { > - struct ttm_operation_ctx ctx = { !kernel, false }; > + struct ttm_operation_ctx ctx = { !kernel, false, true, resv }; Please use named initializers, to make it easier to understand which field is initialized to which value.
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index dc0a8be..7c7f56f5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -327,7 +327,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, uint64_t init_value, struct amdgpu_bo **bo_ptr) { - struct ttm_operation_ctx ctx = { !kernel, false }; + struct ttm_operation_ctx ctx = { !kernel, false, true, resv }; struct amdgpu_bo *bo; enum ttm_bo_type type; unsigned long page_align;
Change-Id: I0c6571c2a64e6c5bdad80ccbcccb40eba1c20b4e Signed-off-by: Roger He <Hongbo.He@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)