No need to do the reservation dance,
we can just wait on the fence directly.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/virtio
On Fri, Aug 23, 2019 at 10:30:35AM +0200, Daniel Vetter wrote:
> On Fri, Aug 23, 2019 at 10:14 AM Gerd Hoffmann wrote:
> >
> > Whole series or just the i915 patch?
>
> Ok I just checked and this all landed in 5.1 already, I thought it was
> more recent. I think that
On Thu, Aug 22, 2019 at 03:13:14PM +0200, Daniel Vetter wrote:
> On Thu, Aug 22, 2019 at 11:06:45AM +0200, Gerd Hoffmann wrote:
> > No need for a home-grown version, the generic helper should work just
> > fine. It also handles vgacon removal these days, see commit
> >
Also update the comment with a reference to the virglrenderer fix.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_object.c | 44 ++---
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c
b/drivers/gpu/drm
Use drm_atomic_helper_check_plane_state()
to sanity check the plane state.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
b/drivers/gpu/drm
Reported-by: Yann Droneaud
Signed-off-by: Gerd Hoffmann
---
drivers/dma-buf/udmabuf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 9635897458a0..6c3ec8fcef01 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf
Signed-off-by: Gerd Hoffmann
Reported-by: Yann Droneaud
---
drivers/dma-buf/udmabuf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 6c3ec8fcef01..ca1364102b18 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf
Signed-off-by: Gerd Hoffmann
---
include/uapi/linux/udmabuf.h | 52 ++--
Documentation/driver-api/dma-buf.rst | 8 +
2 files changed, 57 insertions(+), 3 deletions(-)
diff --git a/include/uapi/linux/udmabuf.h b/include/uapi/linux/udmabuf.h
index 46b6532ed855
Just noticed a bunch of udmabuf tweaks (add documentation & sanity checks)
are still lingering in a local branch. Resending.
Gerd Hoffmann (3):
udmabuf: add documentation
udmabuf: check that __pad is zero
udmabuf: check that flags has no unsupported bits set
include/uapi/linux/udmab
Not needed any more for remove_conflicting_pci_framebuffers calls.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_fb_helper.h | 4 +---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-
drivers/gpu/drm/bochs/bochs_drv.c | 2 +-
drivers/gpu/drm/cirrus/cirrus.c | 2
No need for a home-grown version, the generic helper should work just
fine. It also handles vgacon removal these days, see commit
1c74ca7a1a9a ("drm/fb-helper: call vga_remove_vgacon automatically."),
so that can be removed too.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/i915/
Gerd Hoffmann (3):
fbdev: drop res_id parameter from remove_conflicting_pci_framebuffers
drm: drop resource_id parameter from
drm_fb_helper_remove_conflicting_pci_framebuffers
drm/i915: switch to drm_fb_helper_remove_conflicting_pci_framebuffers
include/drm/drm_fb_helper.h
nup: Drop the res_id
parameter, drop the sanity checks. Also downgrade the logging from
"info" level to "debug" level and update documentation.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_fb_helper.h | 2 +-
include/linux/fb.h | 2 +-
drivers
On Mon, Aug 05, 2019 at 12:54:01PM +0200, Gerd Hoffmann wrote:
> qxl has two modes: "native" (used by the drm driver) and "vga" (vga
> compatibility mode, typically used for boot display and firmware
> framebuffers).
>
> Accessing any vga ioport will switch the
Gerd Hoffmann (4):
drm/bochs: pass framebuffer to bochs_hw_setbase
drm/bochs: drop yres_virtual from struct bochs_device
drm/bochs: drop stride and bpp from struct bochs_device
drm/bochs: move bochs_hw_setformat() call
drivers/gpu/drm/bochs/bochs.h | 10 +++-
drivers/gpu/drm
Call it from bochs_hw_setfb().
This also allows to make bochs_hw_setformat static.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/bochs/bochs.h | 2 --
drivers/gpu/drm/bochs/bochs_hw.c | 5 +++--
drivers/gpu/drm/bochs/bochs_kms.c | 1 -
3 files changed, 3 insertions(+), 5 deletions
Also rename bochs_hw_setbase to bochs_hw_setfb,
we have to set more than just the base address.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/bochs/bochs.h | 5 +++--
drivers/gpu/drm/bochs/bochs_hw.c | 24 +++-
drivers/gpu/drm/bochs/bochs_kms.c | 11 +++
3
No need to store these values. bpp is fixed (32) anyway.
We lookup the stride from struct drm_framebuffer if needed.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/bochs/bochs.h | 2 --
drivers/gpu/drm/bochs/bochs_hw.c | 8 +++-
drivers/gpu/drm/bochs/bochs_kms.c | 2 +-
3 files
Not needed, writing to VBE_DISPI_INDEX_VIRT_HEIGHT has no effect anyway.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/bochs/bochs.h| 1 -
drivers/gpu/drm/bochs/bochs_hw.c | 8 ++--
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/bochs/bochs.h b/drivers
We must make sure our scatterlist segments are not too big, otherwise
we might see swiotlb failures (happens with sev, also reproducable with
swiotlb=force).
Suggested-by: Laszlo Ersek
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_object.c | 10 --
1 file changed, 8
On Mon, Aug 19, 2019 at 01:08:18PM -0500, Wenwen Wang wrote:
> In qxl_bo_create(), the temporary 'bo' is allocated through kzalloc().
> However, it is not deallocated in the following execution if ttm_bo_init()
> fails, leading to a memory leak bug. To fix this issue, free 'bo' before
> returning t
hat when necessary the GEM
> object can be initialized in between. I think that's slightly more
> flexible and easier to understand than a boolean flag.
Yes, that should work too.
Acked-by: Gerd Hoffmann
cheers,
Gerd
___
dri-devel mailing list
ng the order doesn't look hard. Patch attached (untested, have no
test hardware). But maybe I missed some detail ...
The other patch attached works around the issue with a flag, to avoid
drm_vma_node_reset() being called twice.
cheers,
Gerd
>From af43f933533140e2df58176a68df0c60ba08227
We must make sure our scatterlist segments are not too big, otherwise
we might see swiotlb failures (happens with sev, also reproducable with
swiotlb=force).
Suggested-by: Laszlo Ersek
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_object.c | 10 --
1 file changed, 8
We must make sure our scatterlist segments are not too big, otherwise
we might see swiotlb failures (happens with sev, also reproducable with
swiotlb=force).
Suggested-by: Laszlo Ersek
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_object.c | 10 --
1 file changed, 8
Gerd Hoffmann (2):
drm/virtio: cleanup queue functions
drm/virtio: notify virtqueues without holding spinlock
drivers/gpu/drm/virtio/virtgpu_vq.c | 54 ++---
1 file changed, 27 insertions(+), 27 deletions(-)
--
2.18.1
rather bad spinlock contention.
Suggested-by: Chia-I Wu
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 25 +++--
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
Make the queue functions return void, none of
the call sites checks the return value.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 41 ++---
1 file changed, 14 insertions(+), 27 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b
We must make sure our scatterlist segments are not too big, otherwise
we might see swiotlb failures (happens with sev, also reproducable with
swiotlb=force).
Suggested-by: Laszlo Ersek
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_object.c | 10 --
1 file changed, 8
On Fri, Aug 09, 2019 at 09:47:00AM +0200, Borislav Petkov wrote:
> Hi,
>
> On Fri, Aug 09, 2019 at 09:21:33AM +0200, Gerd Hoffmann wrote:
> > On Thu, Aug 08, 2019 at 07:45:42PM +0200, Borislav Petkov wrote:
> > > Hi,
> > >
> > > for some unfathomable t
On Thu, Aug 08, 2019 at 07:45:42PM +0200, Borislav Petkov wrote:
> Hi,
>
> for some unfathomable to me reason, the commit in $Subject breaks
> booting of the 32-bit partition of one of my test boxes. The box doesn't
> finish booting (normally it boots in text mode, there is no X server
> setup on
On Thu, Aug 08, 2019 at 08:39:11AM -0600, Rob Herring wrote:
> On Thu, Aug 8, 2019 at 7:44 AM Gerd Hoffmann wrote:
> >
> >
> >
> > Gerd Hoffmann (17):
> > drm/ttm: turn ttm_bo_device.vma_manager into a pointer
> > drm/ttm: add gem_ttm_bo_device_init()
We must make sure our scatterlist segments are not too big, otherwise
we might see swiotlb failures (happens with sev, also reproducable with
swiotlb=force).
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_object.c | 10 --
1 file changed, 8 insertions(+), 2 deletions
Not needed any more because we don't have vram specific functions any
more. DEFINE_DRM_GEM_FOPS() can be used instead.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_vram_mm_helper.h| 17 -
drivers/gpu/drm/ast/ast_drv.c | 5 +
dr
DEFINE_DRM_GEM_SHMEM_FOPS is identical to DEFINE_DRM_GEM_FOPS now,
drop it.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_shmem_helper.h | 26 -
drivers/gpu/drm/cirrus/cirrus.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
drivers/gpu/drm
... using the new drm_gem_ttm_mmap() helper function.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_vram_mm_helper.h | 9 +
drivers/gpu/drm/drm_gem_vram_helper.c | 4 +++-
drivers/gpu/drm/drm_vram_mm_helper.c | 27 ---
3 files changed, 4 insertions
Not needed any more.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_vram_helper.h | 3 ---
include/drm/drm_vram_mm_helper.h | 3 ---
drivers/gpu/drm/drm_gem_vram_helper.c | 1 -
drivers/gpu/drm/drm_vram_mm_helper.c | 11 ---
4 files changed, 18 deletions(-)
diff
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_drv.c| 8
drivers/gpu/drm/qxl/qxl_object.c | 12
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index 12cf85a06bed..38467478c7b2
.
Signed-off-by: Gerd Hoffmann
---
include/drm/ttm/ttm_bo_driver.h | 11 +--
drivers/gpu/drm/ttm/ttm_bo.c| 29 +
drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 +++---
3 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/include/drm/ttm/ttm_bo_driver.h b
We have no qxl-specific fops any more.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_drv.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index 2fb1641c817e..4853082ba924 100644
--- a/drivers
Not needed any more.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_ttm.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
index dbaed0e67c21..d1d8fe6e1e93 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers
Factor out ttm vma setup to a new function.
Signed-off-by: Gerd Hoffmann
---
include/drm/ttm/ttm_bo_api.h| 8 ++
drivers/gpu/drm/ttm/ttm_bo_vm.c | 47 ++---
2 files changed, 33 insertions(+), 22 deletions(-)
diff --git a/include/drm/ttm/ttm_bo_api.h b
Switch gem shmem helper from gem_driver->fops->mmap to
drm_gem_object_funcs->mmap.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_shmem_helper.h | 4 ++--
drivers/gpu/drm/drm_gem_shmem_helper.c | 18 +++---
drivers/gpu/drm/panfrost/panfrost_gem.c | 1 +
driver
drm_gem_object_funcs->vm_ops alone can't handle
everything mmap() needs. Add a new callback for it.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem.h | 9 +
drivers/gpu/drm/drm_gem.c | 6 ++
2 files changed, 15 insertions(+)
diff --git a/include/drm/drm_gem.h b
Not sure what this hook is supposed to do. vmf->vma->vm_private_data
should never be NULL, so the extra check in qxl_ttm_fault should have no
effect.
Drop it.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_ttm.c | 27 +--
1 file changed, 1 insertion(
... using the use drm_gem_ttm_mmap() helper function.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_drv.h| 1 -
drivers/gpu/drm/qxl/qxl_drv.c| 2 +-
drivers/gpu/drm/qxl/qxl_object.c | 1 +
drivers/gpu/drm/qxl/qxl_ttm.c| 16
4 files changed, 2
This allows to drop drm_gem_vram_mmap_offset() and
drm_gem_vram_driver_dumb_mmap_offset(), the default
gem function works just fine.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_vram_helper.h | 6 +--
drivers/gpu/drm/drm_gem_vram_helper.c | 48
Add helper function to mmap ttm bo's via drm_gem_object_funcs->mmap().
Note that with this code path access verification is done by
drm_gem_mmap() and ttm_bo_driver.verify_access() is not used.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_ttm_helper.h | 2 ++
drivers
manager used by gem, to make
sure gem and ttm have the same view on vma offsets.
With that in place gem+ttm drivers don't need their private
drm_driver.dumb_map_offset implementation any more.
v3:
- complete rewrite
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_ttm_helper.h
Gerd Hoffmann (17):
drm/ttm: turn ttm_bo_device.vma_manager into a pointer
drm/ttm: add gem_ttm_bo_device_init()
drm/vram: switch vram helpers to the new gem_ttm_bo_device_init()
drm/qxl: switch qxl to the new gem_ttm_bo_device_init()
drm: add mmap() to drm_gem_object_funcs
drm/shmem
This allows to drop qxl_mode_dumb_mmap() and qxl_bo_mmap_offset(),
the default gem function works just fine.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_drv.h| 4 +---
drivers/gpu/drm/qxl/qxl_object.h | 5 -
drivers/gpu/drm/qxl/qxl_drv.c| 1 -
drivers/gpu/drm/qxl
Hi,
> > > That would also make the verify_access callback completely superfluous
> > > and looks like a good step into the right direction of de-midlayering.
> >
> > Hmm, right, noticed that too while working on another patch series.
> > Guess I'll try to merge those two and see where I end up
On Thu, Aug 08, 2019 at 09:48:49AM +, Koenig, Christian wrote:
> Am 08.08.19 um 11:36 schrieb Gerd Hoffmann:
> > Rename the embedded struct vma_offset_manager, it is named _vma_manager
> > now. ttm_bo_device.vma_manager is a pointer now, pointing to the
> > embedded ttm_b
On Thu, Aug 08, 2019 at 11:36:55AM +0200, Gerd Hoffmann wrote:
> From: Christoph Hellwig
>
> We should only call dma_max_mapping_size for devices that have a DMA mask
> set, otherwise we can run into a NULL pointer dereference that will crash
> the system.
>
> Also we need
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_ttm_helper.h | 2 ++
drivers/gpu/drm/drm_gem_ttm_helper.c | 22 ++
2 files changed, 24 insertions(+)
diff --git a/include/drm/drm_gem_ttm_helper.h b/include/drm/drm_gem_ttm_helper.h
index 43c9db3583cc..78e4d8930fec
Christoph Hellwig (1):
scsi: core: fix the dma_max_mapping_size call
Gerd Hoffmann (7):
ttm: turn ttm_bo_device.vma_manager into a pointer
drm/ttm: add gem_ttm_bo_device_init()
drm/vram: switch vram helpers to the new gem_ttm_bo_device_init()
drm/qxl: switch qxl to the new
.
Signed-off-by: Gerd Hoffmann
---
include/drm/ttm/ttm_bo_driver.h | 11 +--
drivers/gpu/drm/ttm/ttm_bo.c| 29 +
drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 +++---
3 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/include/drm/ttm/ttm_bo_driver.h b
From: Christoph Hellwig
We should only call dma_max_mapping_size for devices that have a DMA mask
set, otherwise we can run into a NULL pointer dereference that will crash
the system.
Also we need to do right shift to get the sectors from the size in bytes,
not a left shift.
Fixes: bdd17bdef7d8
manager used by gem, to make
sure gem and ttm have the same view on vma offsets.
With that in place gem+ttm drivers don't need their private
drm_driver.dumb_map_offset implementation any more.
v3:
- complete rewrite
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_ttm_helper.h
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_ttm.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
index 3a24145dd516..bcf48b062a85 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers/gpu
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_vram_helper.h | 6 +--
drivers/gpu/drm/drm_gem_vram_helper.c | 48 ---
drivers/gpu/drm/drm_vram_mm_helper.c | 6 +--
.../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 1 -
drivers/gpu/drm/Kconfig
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_vram_helper.h | 3 ---
drivers/gpu/drm/drm_gem_vram_helper.c | 22 +-
2 files changed, 1 insertion(+), 24 deletions(-)
diff --git a/include/drm/drm_gem_vram_helper.h
b/include/drm/drm_gem_vram_helper.h
index
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_drv.h| 4 +---
drivers/gpu/drm/qxl/qxl_object.h | 5 -
drivers/gpu/drm/qxl/qxl_drv.c| 1 -
drivers/gpu/drm/qxl/qxl_dumb.c | 17 -
drivers/gpu/drm/qxl/qxl_ioctl.c | 5 +++--
drivers/gpu/drm/qxl/qxl_ttm.c
Hi,
> > > > I don't think so. drm_gem_dumb_map_offset() calls
> > > > drm_gem_create_mmap_offset(), which I think is not correct for ttm
> > > > objects because ttm_bo_init() handles vma_node initialization.
> Ok I looked again, and your ttm version seems to exactly match
> drm_gem_dumb_map_of
.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_ttm_helper.h | 27 +
drivers/gpu/drm/drm_gem_ttm_helper.c | 45
Documentation/gpu/drm-mm.rst | 12
drivers/gpu/drm/Kconfig | 7 +
drivers/gpu/drm/Makefile
Gerd Hoffmann (3):
drm: add gem ttm helpers
drm/vram: switch vram helpers to use the new ttm helpers.
drm/qxl: switch qxl to use the new ttm helpers.
drivers/gpu/drm/qxl/qxl_drv.h | 4 +-
drivers/gpu/drm/qxl/qxl_object.h | 5 --
include/drm
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_vram_helper.h | 7 +--
drivers/gpu/drm/drm_gem_vram_helper.c | 48 ---
.../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +-
drivers/gpu/drm/Kconfig | 1 +
4 files changed, 4
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_drv.h| 4 +---
drivers/gpu/drm/qxl/qxl_object.h | 5 -
drivers/gpu/drm/qxl/qxl_drv.c| 2 +-
drivers/gpu/drm/qxl/qxl_dumb.c | 17 -
drivers/gpu/drm/qxl/qxl_ioctl.c | 5 +++--
drivers/gpu/drm/qxl/Kconfig
Hi,
> > > Same for this, you're just upcasting to ttm_bo and then downcasting to
> > > gem_bo again ... I think just a series to roll out the existing gem
> > > helpers everywhere should work?
> >
> > I don't think so. drm_gem_dumb_map_offset() calls
> > drm_gem_create_mmap_offset(), which I th
> > +/**
> > + * drm_gem_ttm_mmap_offset() - Returns a GEM ttm object's mmap offset
> > + * @gbo: the GEM ttm object
> > + *
> > + * See drm_vma_node_offset_addr() for more information.
> > + *
> > + * Returns:
> > + * The buffer object's offset for userspace mappings on success, or
> > + * 0 if
Gerd Hoffmann (3):
drm: add gem ttm helpers
drm/vram: switch vram helpers to use the new ttm helpers.
drm/qxl: switch qxl to use the new ttm helpers.
drivers/gpu/drm/qxl/qxl_drv.h | 4 +-
drivers/gpu/drm/qxl/qxl_object.h | 5 --
include/drm
Now with ttm_buffer_object being a subclass of drm_gem_object we can
easily lookup ttm_buffer_object for a given drm_gem_object, which in
turm allows to create common helper functions. This patch starts off
with dump mmap helpers.
Signed-off-by: Gerd Hoffmann
---
include/drm
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_vram_helper.h | 7 +--
drivers/gpu/drm/drm_gem_vram_helper.c | 48 ---
.../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 +-
drivers/gpu/drm/Kconfig | 1 +
4 files changed, 4
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_drv.h| 4 +---
drivers/gpu/drm/qxl/qxl_object.h | 5 -
drivers/gpu/drm/qxl/qxl_drv.c| 2 +-
drivers/gpu/drm/qxl/qxl_dumb.c | 17 -
drivers/gpu/drm/qxl/qxl_ioctl.c | 5 +++--
drivers/gpu/drm/qxl/Kconfig
On Tue, Jul 23, 2019 at 06:40:00PM +0800, Chuhong Yuan wrote:
> Instead of using to_pci_dev + pci_get_drvdata,
> use dev_get_drvdata to make code simpler.
>
> Signed-off-by: Chuhong Yuan
Queued for drm-misc-next (the bochs patch too).
thanks,
Gerd
Drop vma_node from ttm_buffer_object, use the gem struct
(base.vma_node) instead.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +-
drivers/gpu/drm/qxl/qxl_object.h | 2 +-
drivers/gpu/drm/radeon/radeon_object.h | 2
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 8 ++---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 6 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 +-
drivers
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
drivers/gpu/drm/radeon/radeon_benchmark.c | 4 ++--
drivers/gpu/drm/radeon/radeon_cs.c| 2 +-
drivers/gpu/drm/radeon/radeon_display.c | 2 +-
drivers/gpu/drm/radeon/radeon_gem.c | 6 +++---
drivers/gpu/drm/radeon
Signed-off-by: Gerd Hoffmann
Acked-by: Christian König
---
drivers/gpu/drm/qxl/qxl_debugfs.c | 2 +-
drivers/gpu/drm/qxl/qxl_release.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c
b/drivers/gpu/drm/qxl/qxl_debugfs.c
index
All users moved to ttm_buffer_object->base.resv
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
include/drm/ttm/ttm_bo_api.h | 1 -
drivers/gpu/drm/ttm/ttm_bo.c | 2 --
2 files changed, 3 deletions(-)
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
in
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Hellstrom
---
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 4 ++--
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 8
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 4 ++--
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 6 +++---
4 files changed, 11
Drop drm_gem_object from drm_gem_vram_object, use the
ttm_buffer_object.base instead.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
Acked-by: Thomas Zimmermann
---
include/drm/drm_gem_vram_helper.h | 3 +--
drivers/gpu/drm/ast/ast_main.c | 2 +-
drivers
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
include/drm/ttm/ttm_bo_driver.h| 12 ++--
drivers/gpu/drm/ttm/ttm_bo.c | 98 +-
drivers/gpu/drm/ttm/ttm_bo_util.c | 16 ++---
drivers/gpu/drm/ttm/ttm_bo_vm.c| 6 +-
drivers/gpu
Initialize both ttm_buffer_object->resv and ttm_buffer_object->base.resv
pointers. This allows to move users from the former to the latter. When
all users are moved we can drop ttm_buffer_object->resv.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
drivers/gpu/drm/ttm
Signed-off-by: Gerd Hoffmann
Acked-by: Christian König
---
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 4 ++--
drivers/gpu/drm/virtio/virtgpu_plane.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
b/drivers/gpu/drm/virtio
Drop drm_gem_object from radeon_bo, use the
ttm_buffer_object.base instead.
Build tested only.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
drivers/gpu/drm/radeon/radeon.h | 3 +--
drivers/gpu/drm/radeon/radeon_cs.c | 2 +-
drivers/gpu/drm/radeon
Drop drm_gem_object from amdgpu_bo, use the
ttm_buffer_object.base instead.
Build tested only.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 -
drivers/gpu/drm/amd/amdgpu
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_bo.c| 5 ++---
drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +-
4 files changed, 5 insertions(+), 6
Drop drm_gem_object from nouveau_bo, use the
ttm_buffer_object.base instead.
Build tested only.
Signed-off-by: Gerd Hoffmann
Acked-by: Christian König
---
drivers/gpu/drm/nouveau/nouveau_bo.h | 5 -
drivers/gpu/drm/nouveau/nouveau_gem.h | 2 +-
drivers/gpu/drm/nouveau
-next, adapt to vram helper changes.
v3:
- comment updates
- rebased on daniels resv series
(https://patchwork.freedesktop.org/series/62735/)
v2:
- build fixes.
- also drop ttm_buffer_object->resv
Gerd Hoffmann (17):
drm/ttm: add gem base object
drm/vram: use embedded gem object
drm/
Drop ttm_resv from ttm_buffer_object, use the gem reservation object
(base._resv) instead.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
include/drm/ttm/ttm_bo_api.h | 1 -
drivers/gpu/drm/ttm/ttm_bo.c | 39 ++-
drivers/gpu/drm/ttm
Drop drm_gem_object from qxl_bo, use the
ttm_buffer_object.base instead.
Signed-off-by: Gerd Hoffmann
Acked-by: Christian König
---
drivers/gpu/drm/qxl/qxl_drv.h | 6 +++---
drivers/gpu/drm/qxl/qxl_object.h | 4 ++--
drivers/gpu/drm/qxl/qxl_cmd.c | 4 ++--
drivers/gpu/drm/qxl
Add drm_gem_object struct to ttm_buffer_object, so ttm objects are a gdm
object superclass. Add a function to check whenever a given bo actually
uses the embedded drm_gem_object.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
include/drm/ttm/ttm_bo_api.h | 23
On Mon, Aug 05, 2019 at 02:43:03PM +0200, Gerd Hoffmann wrote:
> ---
> drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index b3d628b3f038..73d407494586 100644
&
Drop vma_node from ttm_buffer_object, use the gem struct
(base.vma_node) instead.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +-
drivers/gpu/drm/qxl/qxl_object.h | 2 +-
drivers/gpu/drm/radeon/radeon_object.h | 2
Drop drm_gem_object from radeon_bo, use the
ttm_buffer_object.base instead.
Build tested only.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
drivers/gpu/drm/radeon/radeon.h | 3 +--
drivers/gpu/drm/radeon/radeon_cs.c | 2 +-
drivers/gpu/drm/radeon
Drop drm_gem_object from amdgpu_bo, use the
ttm_buffer_object.base instead.
Build tested only.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 -
drivers/gpu/drm/amd/amdgpu
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 8 ++---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 6 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 +-
drivers
Signed-off-by: Gerd Hoffmann
Reviewed-by: Christian König
---
drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_bo.c| 5 ++---
drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +-
4 files changed, 5 insertions(+), 6
Signed-off-by: Gerd Hoffmann
Acked-by: Christian König
---
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 4 ++--
drivers/gpu/drm/virtio/virtgpu_plane.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
b/drivers/gpu/drm/virtio
801 - 900 of 2019 matches
Mail list logo