Message ID | 20190918125914.38497-3-thomas_os@shipmail.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Emulated coherent graphics memory take 2 | expand |
Hi, Christian! Since I introduced this patch and changed the TTM VM helper patch enough to motivate removing your R-B, I wonder whether you could do a quick review on these two and if OK also ack merging through vmwgfx? Thanks, Thomas On Wed, 2019-09-18 at 14:59 +0200, Thomas Hellström (VMware) wrote: > From: Thomas Hellstrom <thellstrom@vmware.com> > > The explicit typcasts are meaningless, so remove them. > > Suggested-by: Matthew Wilcox <willy@infradead.org> > Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> > --- > drivers/gpu/drm/ttm/ttm_bo_vm.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c > b/drivers/gpu/drm/ttm/ttm_bo_vm.c > index 76eedb963693..8963546bf245 100644 > --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c > +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c > @@ -109,8 +109,7 @@ static unsigned long ttm_bo_io_mem_pfn(struct > ttm_buffer_object *bo, > static vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf) > { > struct vm_area_struct *vma = vmf->vma; > - struct ttm_buffer_object *bo = (struct ttm_buffer_object *) > - vma->vm_private_data; > + struct ttm_buffer_object *bo = vma->vm_private_data; > struct ttm_bo_device *bdev = bo->bdev; > unsigned long page_offset; > unsigned long page_last; > @@ -302,8 +301,7 @@ static vm_fault_t ttm_bo_vm_fault(struct vm_fault > *vmf) > > static void ttm_bo_vm_open(struct vm_area_struct *vma) > { > - struct ttm_buffer_object *bo = > - (struct ttm_buffer_object *)vma->vm_private_data; > + struct ttm_buffer_object *bo = vma->vm_private_data; > > WARN_ON(bo->bdev->dev_mapping != vma->vm_file->f_mapping); > > @@ -312,7 +310,7 @@ static void ttm_bo_vm_open(struct vm_area_struct > *vma) > > static void ttm_bo_vm_close(struct vm_area_struct *vma) > { > - struct ttm_buffer_object *bo = (struct ttm_buffer_object *)vma- > >vm_private_data; > + struct ttm_buffer_object *bo = vma->vm_private_data; > > ttm_bo_put(bo); > vma->vm_private_data = NULL;
Hi Thomas, this one and patch #3 are still Reviewed-by: Christian König <christian.koenig@amd.com> Any objections that I cherry pick them over into our branch? Upstreaming that stuff got delayed quite a bit and I want to base a cleanup on this. Thanks, Christian. Am 18.09.19 um 15:20 schrieb Thomas Hellstrom: > Hi, Christian! > > Since I introduced this patch and changed the TTM VM helper patch > enough to motivate removing your R-B, I wonder whether you could do a > quick review on these two and if OK also ack merging through vmwgfx? > > Thanks, > Thomas > > > On Wed, 2019-09-18 at 14:59 +0200, Thomas Hellström (VMware) wrote: >> From: Thomas Hellstrom <thellstrom@vmware.com> >> >> The explicit typcasts are meaningless, so remove them. >> >> Suggested-by: Matthew Wilcox <willy@infradead.org> >> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> >> --- >> drivers/gpu/drm/ttm/ttm_bo_vm.c | 8 +++----- >> 1 file changed, 3 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c >> b/drivers/gpu/drm/ttm/ttm_bo_vm.c >> index 76eedb963693..8963546bf245 100644 >> --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c >> +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c >> @@ -109,8 +109,7 @@ static unsigned long ttm_bo_io_mem_pfn(struct >> ttm_buffer_object *bo, >> static vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf) >> { >> struct vm_area_struct *vma = vmf->vma; >> - struct ttm_buffer_object *bo = (struct ttm_buffer_object *) >> - vma->vm_private_data; >> + struct ttm_buffer_object *bo = vma->vm_private_data; >> struct ttm_bo_device *bdev = bo->bdev; >> unsigned long page_offset; >> unsigned long page_last; >> @@ -302,8 +301,7 @@ static vm_fault_t ttm_bo_vm_fault(struct vm_fault >> *vmf) >> >> static void ttm_bo_vm_open(struct vm_area_struct *vma) >> { >> - struct ttm_buffer_object *bo = >> - (struct ttm_buffer_object *)vma->vm_private_data; >> + struct ttm_buffer_object *bo = vma->vm_private_data; >> >> WARN_ON(bo->bdev->dev_mapping != vma->vm_file->f_mapping); >> >> @@ -312,7 +310,7 @@ static void ttm_bo_vm_open(struct vm_area_struct >> *vma) >> >> static void ttm_bo_vm_close(struct vm_area_struct *vma) >> { >> - struct ttm_buffer_object *bo = (struct ttm_buffer_object *)vma- >>> vm_private_data; >> + struct ttm_buffer_object *bo = vma->vm_private_data; >> >> ttm_bo_put(bo); >> vma->vm_private_data = NULL;
On 9/25/19 2:30 PM, Christian König wrote: > Hi Thomas, > > this one and patch #3 are still Reviewed-by: Christian König > <christian.koenig@amd.com> > > Any objections that I cherry pick them over into our branch? Upstreaming > that stuff got delayed quite a bit and I want to base a cleanup on this. > > Thanks, > Christian. Sure, please do. We can sort out any merge problems later. Let me quickly fix the commit message of patch #3 since it doesn't reflect that we export more helpers, and I'll send out these two as a separate patchset. Thanks, Thomas > > Am 18.09.19 um 15:20 schrieb Thomas Hellstrom: >> Hi, Christian! >> >> Since I introduced this patch and changed the TTM VM helper patch >> enough to motivate removing your R-B, I wonder whether you could do a >> quick review on these two and if OK also ack merging through vmwgfx? >> >> Thanks, >> Thomas >> >> >> On Wed, 2019-09-18 at 14:59 +0200, Thomas Hellström (VMware) wrote: >>> From: Thomas Hellstrom <thellstrom@vmware.com> >>> >>> The explicit typcasts are meaningless, so remove them. >>> >>> Suggested-by: Matthew Wilcox <willy@infradead.org> >>> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> >>> --- >>> drivers/gpu/drm/ttm/ttm_bo_vm.c | 8 +++----- >>> 1 file changed, 3 insertions(+), 5 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c >>> b/drivers/gpu/drm/ttm/ttm_bo_vm.c >>> index 76eedb963693..8963546bf245 100644 >>> --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c >>> +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c >>> @@ -109,8 +109,7 @@ static unsigned long ttm_bo_io_mem_pfn(struct >>> ttm_buffer_object *bo, >>> static vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf) >>> { >>> struct vm_area_struct *vma = vmf->vma; >>> - struct ttm_buffer_object *bo = (struct ttm_buffer_object *) >>> - vma->vm_private_data; >>> + struct ttm_buffer_object *bo = vma->vm_private_data; >>> struct ttm_bo_device *bdev = bo->bdev; >>> unsigned long page_offset; >>> unsigned long page_last; >>> @@ -302,8 +301,7 @@ static vm_fault_t ttm_bo_vm_fault(struct vm_fault >>> *vmf) >>> >>> static void ttm_bo_vm_open(struct vm_area_struct *vma) >>> { >>> - struct ttm_buffer_object *bo = >>> - (struct ttm_buffer_object *)vma->vm_private_data; >>> + struct ttm_buffer_object *bo = vma->vm_private_data; >>> >>> WARN_ON(bo->bdev->dev_mapping != vma->vm_file->f_mapping); >>> >>> @@ -312,7 +310,7 @@ static void ttm_bo_vm_open(struct vm_area_struct >>> *vma) >>> >>> static void ttm_bo_vm_close(struct vm_area_struct *vma) >>> { >>> - struct ttm_buffer_object *bo = (struct ttm_buffer_object *)vma- >>>> vm_private_data; >>> + struct ttm_buffer_object *bo = vma->vm_private_data; >>> >>> ttm_bo_put(bo); >>> vma->vm_private_data = NULL; >
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 76eedb963693..8963546bf245 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c @@ -109,8 +109,7 @@ static unsigned long ttm_bo_io_mem_pfn(struct ttm_buffer_object *bo, static vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; - struct ttm_buffer_object *bo = (struct ttm_buffer_object *) - vma->vm_private_data; + struct ttm_buffer_object *bo = vma->vm_private_data; struct ttm_bo_device *bdev = bo->bdev; unsigned long page_offset; unsigned long page_last; @@ -302,8 +301,7 @@ static vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf) static void ttm_bo_vm_open(struct vm_area_struct *vma) { - struct ttm_buffer_object *bo = - (struct ttm_buffer_object *)vma->vm_private_data; + struct ttm_buffer_object *bo = vma->vm_private_data; WARN_ON(bo->bdev->dev_mapping != vma->vm_file->f_mapping); @@ -312,7 +310,7 @@ static void ttm_bo_vm_open(struct vm_area_struct *vma) static void ttm_bo_vm_close(struct vm_area_struct *vma) { - struct ttm_buffer_object *bo = (struct ttm_buffer_object *)vma->vm_private_data; + struct ttm_buffer_object *bo = vma->vm_private_data; ttm_bo_put(bo); vma->vm_private_data = NULL;