Message ID | 1449168952-4636-1-git-send-email-deathsimple@vodafone.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 04.12.2015 03:55, Christian König wrote: > From: Christian König <christian.koenig@amd.com> > > Not necessary for VRAM. > > Signed-off-by: Christian König <christian.koenig@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > index 8051cb9..298fb10 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > @@ -801,11 +801,12 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm, > if (mem && mem->mem_type != TTM_PL_SYSTEM) > flags |= AMDGPU_PTE_VALID; > > - if (mem && mem->mem_type == TTM_PL_TT) > + if (mem && mem->mem_type == TTM_PL_TT) { > flags |= AMDGPU_PTE_SYSTEM; > > - if (!ttm || ttm->caching_state == tt_cached) > - flags |= AMDGPU_PTE_SNOOPED; > + if (!ttm || ttm->caching_state == tt_cached) > + flags |= AMDGPU_PTE_SNOOPED; > + } Can ttm be NULL here if mem->mem_type == TTM_PL_TT? Patches 2 & 3 are Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
On 04.12.2015 03:50, Michel Dänzer wrote: > On 04.12.2015 03:55, Christian König wrote: >> From: Christian König <christian.koenig@amd.com> >> >> Not necessary for VRAM. >> >> Signed-off-by: Christian König <christian.koenig@amd.com> >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ++++--- >> 1 file changed, 4 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c >> index 8051cb9..298fb10 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c >> @@ -801,11 +801,12 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm, >> if (mem && mem->mem_type != TTM_PL_SYSTEM) >> flags |= AMDGPU_PTE_VALID; >> >> - if (mem && mem->mem_type == TTM_PL_TT) >> + if (mem && mem->mem_type == TTM_PL_TT) { >> flags |= AMDGPU_PTE_SYSTEM; >> >> - if (!ttm || ttm->caching_state == tt_cached) >> - flags |= AMDGPU_PTE_SNOOPED; >> + if (!ttm || ttm->caching_state == tt_cached) >> + flags |= AMDGPU_PTE_SNOOPED; >> + } > Can ttm be NULL here if mem->mem_type == TTM_PL_TT? Good point, I think the answer is no. Update patch is on it's way to the list. Christian. > > > Patches 2 & 3 are > > Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> > >
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 8051cb9..298fb10 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -801,11 +801,12 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm, if (mem && mem->mem_type != TTM_PL_SYSTEM) flags |= AMDGPU_PTE_VALID; - if (mem && mem->mem_type == TTM_PL_TT) + if (mem && mem->mem_type == TTM_PL_TT) { flags |= AMDGPU_PTE_SYSTEM; - if (!ttm || ttm->caching_state == tt_cached) - flags |= AMDGPU_PTE_SNOOPED; + if (!ttm || ttm->caching_state == tt_cached) + flags |= AMDGPU_PTE_SNOOPED; + } if (adev->asic_type >= CHIP_TOPAZ) flags |= AMDGPU_PTE_EXECUTABLE;