Somalapuram Amaranath
2023-Jan-25 14:24 UTC
[Nouveau] [PATCH v3 3/4] drm/amdgpu: Movie the amdgpu_gtt_mgr start and size from pages to bytes
To support GTT manager amdgpu_res_first, amdgpu_res_next from pages to bytes and clean up PAGE_SHIFT operation. v1 -> v2: reorder patch sequence Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram at amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h index 5c4f93ee0c57..5c78f0b09351 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h @@ -94,8 +94,8 @@ static inline void amdgpu_res_first(struct ttm_resource *res, while (start >= node->size << PAGE_SHIFT) start -= node++->size << PAGE_SHIFT; - cur->start = (node->start << PAGE_SHIFT) + start; - cur->size = min((node->size << PAGE_SHIFT) - start, size); + cur->start = node->start + start; + cur->size = min(node->size - start, size); cur->remaining = size; cur->node = node; break; @@ -155,8 +155,8 @@ static inline void amdgpu_res_next(struct amdgpu_res_cursor *cur, uint64_t size) node = cur->node; cur->node = ++node; - cur->start = node->start << PAGE_SHIFT; - cur->size = min(node->size << PAGE_SHIFT, cur->remaining); + cur->start = node->start; + cur->size = min(node->size, cur->remaining); break; default: return; -- 2.32.0
Christian König
2023-Jan-25 14:29 UTC
[Nouveau] [PATCH v3 3/4] drm/amdgpu: Movie the amdgpu_gtt_mgr start and size from pages to bytes
Am 25.01.23 um 15:24 schrieb Somalapuram Amaranath:> To support GTT manager amdgpu_res_first, amdgpu_res_next > from pages to bytes and clean up PAGE_SHIFT operation. > v1 -> v2: reorder patch sequenceOk once more: You need to squash this patch here together with the other patches. Otherwise this patch would break the driver if applied alone. Christian.> > Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram at amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h > index 5c4f93ee0c57..5c78f0b09351 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h > @@ -94,8 +94,8 @@ static inline void amdgpu_res_first(struct ttm_resource *res, > while (start >= node->size << PAGE_SHIFT) > start -= node++->size << PAGE_SHIFT; > > - cur->start = (node->start << PAGE_SHIFT) + start; > - cur->size = min((node->size << PAGE_SHIFT) - start, size); > + cur->start = node->start + start; > + cur->size = min(node->size - start, size); > cur->remaining = size; > cur->node = node; > break; > @@ -155,8 +155,8 @@ static inline void amdgpu_res_next(struct amdgpu_res_cursor *cur, uint64_t size) > node = cur->node; > > cur->node = ++node; > - cur->start = node->start << PAGE_SHIFT; > - cur->size = min(node->size << PAGE_SHIFT, cur->remaining); > + cur->start = node->start; > + cur->size = min(node->size, cur->remaining); > break; > default: > return;
Possibly Parallel Threads
- [PATCH v3 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
- [PATCH v2 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
- [PATCH v2 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
- [PATCH] Change the meaning of the fields in the ttm_place structure from pfn to bytes
- FAVVIO.COM Watch Movies Online For Free Full Movie Downloads