Message ID | 20180807174748.4503-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: Remove defunct dma_buf_kmap stubs | expand |
Am 07.08.2018 um 19:47 schrieb Chris Wilson: > Since commit 09ea0dfbf972 ("dma-buf: make map_atomic and map function > pointers optional"), we no longer need to provide stub no-op functions > as the core now provides them directly. > > References: 09ea0dfbf972 ("dma-buf: make map_atomic and map function pointers optional") > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: Gerd Hoffmann <kraxel@redhat.com> > Cc: Alex Deucher <alexander.deucher@amd.com> > Cc: "Christian König" <christian.koenig@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 2 -- > drivers/gpu/drm/drm_prime.c | 30 ----------------------- > include/drm/drm_prime.h | 3 --- > 3 files changed, 35 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c > index 1c5d97f4b4dd..3fdd5688da0b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c > @@ -338,8 +338,6 @@ static const struct dma_buf_ops amdgpu_dmabuf_ops = { > .unmap_dma_buf = drm_gem_unmap_dma_buf, > .release = drm_gem_dmabuf_release, > .begin_cpu_access = amdgpu_gem_begin_cpu_access, > - .map = drm_gem_dmabuf_kmap, > - .unmap = drm_gem_dmabuf_kunmap, > .mmap = drm_gem_dmabuf_mmap, > .vmap = drm_gem_dmabuf_vmap, > .vunmap = drm_gem_dmabuf_vunmap, > diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c > index 186db2e4c57a..e03d3bdaa59b 100644 > --- a/drivers/gpu/drm/drm_prime.c > +++ b/drivers/gpu/drm/drm_prime.c > @@ -433,34 +433,6 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) > } > EXPORT_SYMBOL(drm_gem_dmabuf_vunmap); > > -/** > - * drm_gem_dmabuf_kmap - map implementation for GEM > - * @dma_buf: buffer to be mapped > - * @page_num: page number within the buffer > - * > - * Not implemented. This can be used as the &dma_buf_ops.map callback. > - */ > -void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num) > -{ > - return NULL; > -} > -EXPORT_SYMBOL(drm_gem_dmabuf_kmap); > - > -/** > - * drm_gem_dmabuf_kunmap - unmap implementation for GEM > - * @dma_buf: buffer to be unmapped > - * @page_num: page number within the buffer > - * @addr: virtual address of the buffer > - * > - * Not implemented. This can be used as the &dma_buf_ops.unmap callback. > - */ > -void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num, > - void *addr) > -{ > - > -} > -EXPORT_SYMBOL(drm_gem_dmabuf_kunmap); > - > /** > * drm_gem_dmabuf_mmap - dma_buf mmap implementation for GEM > * @dma_buf: buffer to be mapped > @@ -489,8 +461,6 @@ static const struct dma_buf_ops drm_gem_prime_dmabuf_ops = { > .map_dma_buf = drm_gem_map_dma_buf, > .unmap_dma_buf = drm_gem_unmap_dma_buf, > .release = drm_gem_dmabuf_release, > - .map = drm_gem_dmabuf_kmap, > - .unmap = drm_gem_dmabuf_kunmap, > .mmap = drm_gem_dmabuf_mmap, > .vmap = drm_gem_dmabuf_vmap, > .vunmap = drm_gem_dmabuf_vunmap, > diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h > index d716d653b096..e2032fbc0f08 100644 > --- a/include/drm/drm_prime.h > +++ b/include/drm/drm_prime.h > @@ -93,9 +93,6 @@ void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, > enum dma_data_direction dir); > void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf); > void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); > -void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num); > -void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num, > - void *addr); > int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); > > int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages,
On Tue, Aug 07, 2018 at 06:47:48PM +0100, Chris Wilson wrote: > Since commit 09ea0dfbf972 ("dma-buf: make map_atomic and map function > pointers optional"), we no longer need to provide stub no-op functions > as the core now provides them directly. > > References: 09ea0dfbf972 ("dma-buf: make map_atomic and map function pointers optional") > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: Gerd Hoffmann <kraxel@redhat.com> > Cc: Alex Deucher <alexander.deucher@amd.com> > Cc: "Christian König" <christian.koenig@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 2 -- > drivers/gpu/drm/drm_prime.c | 30 ----------------------- > include/drm/drm_prime.h | 3 --- > 3 files changed, 35 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c > index 1c5d97f4b4dd..3fdd5688da0b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c > @@ -338,8 +338,6 @@ static const struct dma_buf_ops amdgpu_dmabuf_ops = { > .unmap_dma_buf = drm_gem_unmap_dma_buf, > .release = drm_gem_dmabuf_release, > .begin_cpu_access = amdgpu_gem_begin_cpu_access, > - .map = drm_gem_dmabuf_kmap, > - .unmap = drm_gem_dmabuf_kunmap, > .mmap = drm_gem_dmabuf_mmap, > .vmap = drm_gem_dmabuf_vmap, > .vunmap = drm_gem_dmabuf_vunmap, > diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c > index 186db2e4c57a..e03d3bdaa59b 100644 > --- a/drivers/gpu/drm/drm_prime.c > +++ b/drivers/gpu/drm/drm_prime.c > @@ -433,34 +433,6 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) > } > EXPORT_SYMBOL(drm_gem_dmabuf_vunmap); > > -/** > - * drm_gem_dmabuf_kmap - map implementation for GEM > - * @dma_buf: buffer to be mapped > - * @page_num: page number within the buffer > - * > - * Not implemented. This can be used as the &dma_buf_ops.map callback. > - */ > -void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num) > -{ > - return NULL; > -} > -EXPORT_SYMBOL(drm_gem_dmabuf_kmap); > - > -/** > - * drm_gem_dmabuf_kunmap - unmap implementation for GEM > - * @dma_buf: buffer to be unmapped > - * @page_num: page number within the buffer > - * @addr: virtual address of the buffer > - * > - * Not implemented. This can be used as the &dma_buf_ops.unmap callback. > - */ > -void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num, > - void *addr) > -{ > - > -} > -EXPORT_SYMBOL(drm_gem_dmabuf_kunmap); > - > /** > * drm_gem_dmabuf_mmap - dma_buf mmap implementation for GEM > * @dma_buf: buffer to be mapped > @@ -489,8 +461,6 @@ static const struct dma_buf_ops drm_gem_prime_dmabuf_ops = { > .map_dma_buf = drm_gem_map_dma_buf, > .unmap_dma_buf = drm_gem_unmap_dma_buf, > .release = drm_gem_dmabuf_release, > - .map = drm_gem_dmabuf_kmap, > - .unmap = drm_gem_dmabuf_kunmap, > .mmap = drm_gem_dmabuf_mmap, > .vmap = drm_gem_dmabuf_vmap, > .vunmap = drm_gem_dmabuf_vunmap, > diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h > index d716d653b096..e2032fbc0f08 100644 > --- a/include/drm/drm_prime.h > +++ b/include/drm/drm_prime.h > @@ -93,9 +93,6 @@ void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, > enum dma_data_direction dir); > void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf); > void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); > -void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num); > -void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num, > - void *addr); > int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); > > int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages, > -- > 2.18.0 >
Quoting Patchwork (2018-08-07 19:09:06) > == Series Details == > > Series: drm: Remove defunct dma_buf_kmap stubs > URL : https://patchwork.freedesktop.org/series/47829/ > State : failure > > == Summary == > > = CI Bug Log - changes from CI_DRM_4627 -> Patchwork_9871 = > > == Summary - FAILURE == > > Serious unknown changes coming with Patchwork_9871 absolutely need to be > verified manually. > > If you think the reported changes have nothing to do with the changes > introduced in Patchwork_9871, please notify your bug team to allow them > to document this new failure mode, which will reduce false positives in CI. > > External URL: https://patchwork.freedesktop.org/api/1.0/series/47829/revisions/1/mbox/ > > == Possible new issues == > > Here are the unknown changes that may have been introduced in Patchwork_9871: > > === IGT changes === > > ==== Possible regressions ==== > > igt@gem_exec_fence@basic-await-default: > fi-gdg-551: SKIP -> DMESG-FAIL +3 Grr. One little extra check to kill in dma_buf_export first(). Gerd, come back here! :) -Chris
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c index 1c5d97f4b4dd..3fdd5688da0b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c @@ -338,8 +338,6 @@ static const struct dma_buf_ops amdgpu_dmabuf_ops = { .unmap_dma_buf = drm_gem_unmap_dma_buf, .release = drm_gem_dmabuf_release, .begin_cpu_access = amdgpu_gem_begin_cpu_access, - .map = drm_gem_dmabuf_kmap, - .unmap = drm_gem_dmabuf_kunmap, .mmap = drm_gem_dmabuf_mmap, .vmap = drm_gem_dmabuf_vmap, .vunmap = drm_gem_dmabuf_vunmap, diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index 186db2e4c57a..e03d3bdaa59b 100644 --- a/drivers/gpu/drm/drm_prime.c +++ b/drivers/gpu/drm/drm_prime.c @@ -433,34 +433,6 @@ void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr) } EXPORT_SYMBOL(drm_gem_dmabuf_vunmap); -/** - * drm_gem_dmabuf_kmap - map implementation for GEM - * @dma_buf: buffer to be mapped - * @page_num: page number within the buffer - * - * Not implemented. This can be used as the &dma_buf_ops.map callback. - */ -void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num) -{ - return NULL; -} -EXPORT_SYMBOL(drm_gem_dmabuf_kmap); - -/** - * drm_gem_dmabuf_kunmap - unmap implementation for GEM - * @dma_buf: buffer to be unmapped - * @page_num: page number within the buffer - * @addr: virtual address of the buffer - * - * Not implemented. This can be used as the &dma_buf_ops.unmap callback. - */ -void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num, - void *addr) -{ - -} -EXPORT_SYMBOL(drm_gem_dmabuf_kunmap); - /** * drm_gem_dmabuf_mmap - dma_buf mmap implementation for GEM * @dma_buf: buffer to be mapped @@ -489,8 +461,6 @@ static const struct dma_buf_ops drm_gem_prime_dmabuf_ops = { .map_dma_buf = drm_gem_map_dma_buf, .unmap_dma_buf = drm_gem_unmap_dma_buf, .release = drm_gem_dmabuf_release, - .map = drm_gem_dmabuf_kmap, - .unmap = drm_gem_dmabuf_kunmap, .mmap = drm_gem_dmabuf_mmap, .vmap = drm_gem_dmabuf_vmap, .vunmap = drm_gem_dmabuf_vunmap, diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h index d716d653b096..e2032fbc0f08 100644 --- a/include/drm/drm_prime.h +++ b/include/drm/drm_prime.h @@ -93,9 +93,6 @@ void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, enum dma_data_direction dir); void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf); void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); -void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num); -void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num, - void *addr); int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages,
Since commit 09ea0dfbf972 ("dma-buf: make map_atomic and map function pointers optional"), we no longer need to provide stub no-op functions as the core now provides them directly. References: 09ea0dfbf972 ("dma-buf: make map_atomic and map function pointers optional") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 2 -- drivers/gpu/drm/drm_prime.c | 30 ----------------------- include/drm/drm_prime.h | 3 --- 3 files changed, 35 deletions(-)