This file has useful information regarding the pci-id --> gen
conversion. The gen determines which scanout formats a chipset
supports (for example, the SKL display engine can scanout Y-tiled
formats). This would be useful for the ozone-gbm interface.
Signed-off-by: Gurchetan Singh
---
in
:
> On 28 October 2016 at 04:38, Gurchetan Singh
> wrote:
> > This file has useful information regarding the pci-id --> gen
> > conversion. The gen determines which scanout formats a chipset
> > supports (for example, the SKL display engine can scanout Y-tiled
> >
On ChromeOS devices, readdir() processes the directory in
the following order:
-NAME- -TYPE-
.n/a
.. n/a
vgem n/a
card1 DRM_BUS_PLATFORM
renderD129 DRM_BUS_PLATFORM
card0 DRM_BUS_PCI
renderD128
When a CRTC is disabled and we used an internally created framebuffer,
this patch disables the cursor plane and drops the reference that was
introduced when we called drm_internal_framebuffer_create.
Signed-off-by: Gurchetan Singh <gurchetansi...@chromium.org>
---
drivers/gpu/drm/drm_crtc
On Wed, Jan 17, 2018 at 11:42 PM, Daniel Vetter <dan...@ffwll.ch> wrote:
> On Wed, Jan 17, 2018 at 11:46 PM, Gurchetan Singh
> <gurchetansi...@chromium.org> wrote:
> >> dma api just isn't quite sufficient for implementing fast gpu drivers.
> >
> >
>
On Wed, Jan 17, 2018 at 11:38 PM, Daniel Vetter <dan...@ffwll.ch> wrote:
> On Wed, Jan 17, 2018 at 11:49 PM, Gurchetan Singh
> <gurchetansi...@chromium.org> wrote:
> >
> > On Wed, Jan 17, 2018 at 12:39 AM, Daniel Vetter <dan...@ffwll.ch> wrote:
> >>
On Wed, Jan 24, 2018 at 4:45 AM, Russell King - ARM Linux <
li...@armlinux.org.uk> wrote:
> On Tue, Jan 23, 2018 at 06:56:03PM -0800, Gurchetan Singh wrote:
> > The dma_cache_maint_page function is important for cache maintenance on
> > ARM32 (this was determined via testi
On Wed, Jan 24, 2018 at 1:14 AM, Chris Wilson <ch...@chris-wilson.co.uk>
wrote:
> Quoting Gurchetan Singh (2018-01-24 02:55:30)
> > Since clfush is an x86-only instruction, these function names won't
> > make much sense if we start adding cases for other architectures.
>
We've found the DMA API is effective for flushing the cache on ARM
devices, and it requires a struct device *.
Signed-off-by: Gurchetan Singh <gurchetansi...@chromium.org>
---
drivers/gpu/drm/drm_cache.c | 5 +++--
drivers/gpu/drm/i915/i915_gem.c | 2 +-
drivers/gpu/dr
Since clfush is an x86-only instruction, these function names won't
make much sense if we start adding cases for other architectures.
Signed-off-by: Gurchetan Singh <gurchetansi...@chromium.org>
---
drivers/gpu/drm/drm_cache.c | 12 ++--
drivers/gpu/drm/i915/i915
The DMA API can be used to flush scatter gather tables and physical
pages on ARM devices.
Signed-off-by: Gurchetan Singh <gurchetansi...@chromium.org>
---
drivers/gpu/drm/drm_cache.c | 17 +
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 7 ++-
drivers/g
This is required to use buffers allocated by vgem on AMD and ARM devices.
We're experiencing a case where eviction of the cache races with userspace
writes. To fix this, flush the cache after retrieving a page.
Signed-off-by: Gurchetan Singh <gurchetansi...@chromium.org>
---
drivers/gpu/dr
sembly
(__dma_map_area) after a little indirection. Why do you think that's
inefficient?
On Wed, Jan 17, 2018 at 12:31 AM, Daniel Vetter <dan...@ffwll.ch> wrote:
> On Tue, Jan 16, 2018 at 04:35:58PM -0800, Gurchetan Singh wrote:
> > The DMA API can be used to flush scatter gathe
On Wed, Jan 17, 2018 at 12:39 AM, Daniel Vetter <dan...@ffwll.ch> wrote:
> On Tue, Jan 16, 2018 at 04:35:59PM -0800, Gurchetan Singh wrote:
> > This is required to use buffers allocated by vgem on AMD and ARM devices.
> > We're experiencing a case where evicti
On Wed, Jan 24, 2018 at 11:26 AM, Russell King - ARM Linux
<li...@armlinux.org.uk> wrote:
> On Wed, Jan 24, 2018 at 10:45:28AM -0800, Gurchetan Singh wrote:
>> On Wed, Jan 24, 2018 at 4:45 AM, Russell King - ARM Linux <
>> li...@armlinux.org.uk> wrote:
>> &
On Tue, Jan 30, 2018 at 1:14 AM, Daniel Vetter <dan...@ffwll.ch> wrote:
>
> On Thu, Jan 18, 2018 at 09:23:31AM -0800, Gurchetan Singh wrote:
> > On Wed, Jan 17, 2018 at 11:38 PM, Daniel Vetter <dan...@ffwll.ch> wrote:
> >
> > > On Wed, Jan 17, 2018 at 11:49
Patches 1 to 7 are:
Reviewed-by: Gurchetan Singh <gurchetansi...@chromium.org>
On Thu, Feb 22, 2018 at 3:59 PM, Rodrigo Siqueira
<rodrigosiqueiram...@gmail.com> wrote:
> This patchset fixes warnings and errors found by checkpatch.pl in the
> drm/virtio:
>
> * Removes r
Since clfush is an x86-only instruction, these function names won't
make much sense if we start adding cases for other architectures.
Signed-off-by: Gurchetan Singh <gurchetansi...@chromium.org>
---
drivers/gpu/drm/drm_cache.c | 12 ++--
drivers/gpu/drm/i915/i915
This patch uses the __dma_map_area function to flush the cache
on ARM64.
v2: Don't use DMA API, call functions directly (Daniel)
Signed-off-by: Gurchetan Singh <gurchetansi...@chromium.org>
---
drivers/gpu/drm/drm_cache.c | 13 +
1 file changed, 13 insertions(+)
diff
We should use our common cache maintenance functions when possible.
Signed-off-by: Gurchetan Singh <gurchetansi...@chromium.org>
---
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 7 ++-
drivers/gpu/drm/tegra/gem.c | 7 ++-
2 files changed, 4 insertions(+), 10 del
-off-by: Gurchetan Singh <gurchetansi...@chromium.org>
---
drivers/gpu/drm/drm_cache.c | 61 +
1 file changed, 61 insertions(+)
diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
index 89cdd32fe1f3..5124582451c6 100644
--- a/drive
This is required to use buffers allocated by vgem on AMD and ARM devices.
We're experiencing a case where eviction of the cache races with userspace
writes. To fix this, flush the cache after retrieving a page.
Signed-off-by: Gurchetan Singh <gurchetansi...@chromium.org>
---
drivers/gpu/dr
Otherwise, mmap fails when done with PROT_WRITE.
---
drivers/dma-buf/udmabuf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 5b44ef226904..fc359ca4503d 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@
Otherwise, mmap fails when done with PROT_WRITE.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 5b44ef226904..fc359ca4503d 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b
Reviewed-by: Gurchetan Singh
Tested-by: Gurchetan Singh
On Wed, Nov 14, 2018 at 4:20 AM Gerd Hoffmann wrote:
>
> Otherwise, mmap fails when done with PROT_WRITE.
>
> Suggested-by: Gurchetan Singh
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/dma-buf/udmabuf.c | 1 +
On Wed, Sep 12, 2018 at 12:03 AM Yann Droneaud wrote:
>
> Hi,
>
> Le lundi 27 août 2018 à 11:34 +0200, Gerd Hoffmann a écrit :
> > A driver to let userspace turn memfd regions into dma-bufs.
> >
> > Use case: Allows qemu create dmabufs for the vga framebuffer or
> > virtio-gpu ressources. Then
On Wed, Sep 12, 2018 at 11:44 PM Gerd Hoffmann wrote:
>
> On Wed, Sep 12, 2018 at 08:24:00PM -0700, Gurchetan Singh wrote:
> > On Wed, Sep 12, 2018 at 12:03 AM Yann Droneaud wrote:
> > >
> > > Hi,
> > >
> > > Le lundi 27 août 2018 à 11:34 +0200,
On Mon, Mar 4, 2019 at 12:26 AM Robert Foss
wrote:
> Hey Gurchetan,
>
> Thanks for sending this in!
>
> Reviewed-by: Robert Foss
>
>
Thanks for the review! Ping committers for merge ...
> On 2/28/19 1:52 AM, Gurchetan Singh wrote:
> > Genera
Generated using make headers_install.
This brings in the in/out fence support for explicit
synchronization.
Signed-off-by: Gurchetan Singh
---
include/drm/virtgpu_drm.h | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/include/drm/virtgpu_drm.h b/include/drm
Generated using make headers_install.
This brings in the in/out fence support for explicit
synchronization.
v2: don't use experimental kernel branch
Signed-off-by: Gurchetan Singh
---
include/drm/virtgpu_drm.h | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git
On Wed, Jan 30, 2019 at 1:43 AM Gerd Hoffmann wrote:
>
> There is no need to wait for completion here.
>
> The host will process commands in submit order, so commands can
> reference the new resource just fine even when queued up before
> completion.
Does virtio_gpu_execbuffer_ioctl also wait
On Wed, Apr 10, 2019 at 4:42 AM Gerd Hoffmann wrote:
> Add new command VIRTIO_GPU_CMD_RESOURCE_CREATE_V2 to create resources.
> It adds (a) support planar resources and (b) returns stride and size of
> the resource planes. The later will be needed in case we support
> mapping host resources
On Wed, Apr 10, 2019 at 4:42 AM Gerd Hoffmann wrote:
> Add comments to the existing feature flags,
> documenting which commands belong to them.
>
> Signed-off-by: Gerd Hoffmann
>
This patch is:
Reviewed-by: Gurchetan Singh
> ---
> include/uapi/linux/virtio_gpu.h |
On Wed, Apr 10, 2019 at 10:03 PM Gerd Hoffmann wrote:
>
> > > +/* VIRTIO_GPU_CMD_RESOURCE_CREATE_V2 */
> > > +struct virtio_gpu_cmd_resource_create_v2 {
> > > + struct virtio_gpu_ctrl_hdr hdr;
> > > + __le32 resource_id;
> > > + __le32 format;
> > > + __le32 width;
> > > +
On Thu, Apr 11, 2019 at 10:49 PM Gerd Hoffmann wrote:
>
> On Thu, Apr 11, 2019 at 06:36:15PM -0700, Gurchetan Singh wrote:
> > On Wed, Apr 10, 2019 at 10:03 PM Gerd Hoffmann wrote:
> > >
> > > > > +/* VIRTIO_GPU_CMD_RESOURCE_CREATE_V2 */
> > >
Other DRM drivers use it too.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
index b7f9dfe61d1c
On Tue, Jul 2, 2019 at 7:19 AM Gerd Hoffmann wrote:
> Switch to the virtio_gpu_array_* helper workflow.
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 4 ++--
> drivers/gpu/drm/virtio/virtgpu_gem.c | 24 +++-
>
On Wed, Apr 17, 2019 at 2:57 AM Gerd Hoffmann wrote:
>
> On Fri, Apr 12, 2019 at 04:34:20PM -0700, Chia-I Wu wrote:
> > Hi,
> >
> > I am still new to virgl, and missed the last round of discussion about
> > resource_create_v2.
> >
> > From the discussion below, semantically resource_create_v2
On Fri, Jun 28, 2019 at 5:14 AM Gerd Hoffmann wrote:
>
> Use gem reservation helpers and direct reservation_object_* calls
> instead of ttm.
>
> v5: fix fencing (Chia-I Wu).
> v3: Due to using the gem reservation object it is initialized and ready
> for use before calling ttm_bo_init, so we can
On Wed, Jul 31, 2019 at 11:40 PM Gerd Hoffmann wrote:
>
> On Wed, Jul 31, 2019 at 07:25:13PM -0700, Gurchetan Singh wrote:
> > The main use for udmabuf is sending guest memory pages
> > to the host.
> >
> > It's generally a bad idea to have to separate mappings
With the misc device, we should end up using dma direct ops.
This can allow us to have WC mappings in the guest after some
synchronization, if we disallow cached mappings in the host.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 39 +++
1
Enforce the access flags that were added earlier.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 4ecf2a94fed3..134e53d24c2b 100644
--- a/drivers/dma-buf
either. So we need to map write-combine in the guest.
One way to achieve this is to synchronize on the host.
[warning] -- only compile tested at this point to get feedback
Gurchetan Singh (6):
udmabuf: use cache_sgt_mapping option
udmabuf: add ability to set access flags on udmabuf
udmabuf
Will be used later.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 134e53d24c2b..47003abbf4c2 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b
for
the specific use case.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c| 7 ++-
include/uapi/linux/udmabuf.h | 5 -
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index b345e91d831a..4ecf2a94fed3
Reused later.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 26 +++---
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 47003abbf4c2..5f8bee1862de 100644
--- a/drivers/dma-buf
The GEM prime helpers do it, so should we. It's also possible to make
it optional later.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index
/mesa/merge_requests/2129
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 8 +++-
include/uapi/drm/virtgpu_drm.h | 4
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
b/drivers/gpu/drm/virtio
we don't forget.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 ++
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 9 ++---
drivers/gpu/drm/virtio/virtgpu_vq.c| 6 ++
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/virtio
On Wed, Oct 2, 2019 at 1:49 AM Gerd Hoffmann wrote:
>
> On Tue, Oct 01, 2019 at 06:49:35PM -0700, Gurchetan Singh wrote:
> > This doesn't really break userspace, since it always passes down
> > 0 for stride/layer_stride currently. We could:
> >
> &g
; - drop merged patches (#1 + #2).
>
> please review,
Series is:
Reviewed-by: Gurchetan Singh
> Gerd
>
> Gerd Hoffmann (3):
> drm/virtio: fix byteorder handling in
> virtio_gpu_cmd_transfer_{from,to}_host_3d functions
> drm/virtio: Simplify virtio_gpu_primary_p
On Thu, Nov 28, 2019 at 3:48 AM Gerd Hoffmann wrote:
>
> Hi,
>
> > diff --git a/include/uapi/linux/udmabuf.h b/include/uapi/linux/udmabuf.h
> > index 46b6532ed855..f90831f2bb0d 100644
> > --- a/include/uapi/linux/udmabuf.h
> > +++ b/include/uapi/linux/udmabuf.h
> > @@ -6,6 +6,8 @@
> > #include
With the misc device, we should end up using the result of
get_arch_dma_ops(..) or dma-direct ops.
This can allow us to have WC mappings in the guest after
synchronization.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 39 +++
1 file changed
The GEM prime helpers do it, so should we. It's also possible to make
it optional later.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index
Will be used later.
v2: rename 'udmabuf_misc' to 'device' (kraxel)
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index be15eb6b0586..f0bf3ba7441e
These are nice functions and can be re-used.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 26 +++---
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index f0bf3ba7441e..0a610e09ae23 100644
On Tue, Dec 10, 2019 at 12:58 AM Gerd Hoffmann wrote:
>
> virtio-gpu uses cached mappings. shmem helpers use writecombine though.
> So roll our own mmap function, wrapping drm_gem_shmem_mmap(), to tweak
> vm_page_prot accordingly.
>
> Reported-by: Gurchetan Singh
> Signed-
I'm just going to put Chia's review comment here since it sums
the issue rather nicely:
"(1) Semantically, a dma-buf is in DMA domain. CPU access from the
importer must be surrounded by {begin,end}_cpu_access. This gives the
exporter a chance to move the buffer to the CPU domain temporarily.
ess to
avoid cache issues."
Reported-by: Chia-I Wu
Suggested-by: Chia-I Wu
Fixes: 284562e1f348 ("udmabuf: implement begin_cpu_access/end_cpu_access hooks")
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
Sharing memory between virtio devices is ill-defined, so until
we have something let's get rid of this.
drm_gem_prime_import_dev returns an error if the callback is NULL.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/Makefile| 2 +-
drivers/gpu/drm/virtio/virtgpu_drv.c
virtgpu_drv.h is getting very big, let's try to split it into
smaller header files. Start with virtgpu_vq.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_display.c | 1 +
drivers/gpu/drm/virtio/virtgpu_drv.h | 79 --
drivers/gpu/drm/virtio
That's the only file that uses it.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_display.c | 3 +++
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c
b/drivers/gpu/drm
virtgpu_drv.h is getting very big, let's try to split it into
smaller header files. This time, GEM functions.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.c| 1 +
drivers/gpu/drm/virtio/virtgpu_drv.h| 34
drivers/gpu/drm/virtio/virtgpu_gem.c
Not used anywhere else.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 1 -
drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio/virtgpu_drv.h
With so many new features on the horizon, perhaps it's
time to do a little "winter cleaning" beforehand. Enjoy!
Gurchetan Singh (9):
drm/virtio: static-ify virtio_fence_signaled
drm/virtio: static-ify virtio_gpu_framebuffer_init
drm/virtio: get rid of drm_encoder_to_virtio_gpu_ou
Not used anywhere else.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_display.c | 2 +-
drivers/gpu/drm/virtio/virtgpu_drv.h | 4
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c
b/drivers/gpu/drm/virtio
This is a little simpler.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 8 +---
drivers/gpu/drm/virtio/virtgpu_gem.c | 4 +---
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio
Not used anywhere.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio/virtgpu_drv.h
index b2270153528c..45b4c3324b2c 100644
--- a/drivers/gpu/drm/virtio
That's the only file that uses it.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 --
drivers/gpu/drm/virtio/virtgpu_fence.c | 3 +++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio
Commit b0e40e ("vram: Have VRAM MM call GEM VRAM functions directly")
removed this.
Signed-off-by: Gurchetan Singh
---
include/drm/drm_gem_vram_helper.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/drm/drm_gem_vram_helper.h
b/include/drm/drm_gem_vram_helper.h
index e0
The GEM prime helpers do it, so should we. It's also possible to make
it optional later.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index
The main use for udmabuf is sending guest memory pages
to the host.
It's generally a bad idea to have to separate mappings with
different attributes. For example, a WC mapping the guest
kernel and cached mapping on the host is problematic.
v2: Cache attribute flags instead of read/write flags
These are nice functions and can be re-used.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 26 +++---
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 9e6fdd2bc979..67e89bb034c5 100644
Will be used later.
v2: rename 'udmabuf_misc' to 'device' (kraxel)
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index ce9c9e4b
With the misc device, we should end up using the result of
get_arch_dma_ops(..) or dma-direct ops.
This can allow us to have WC mappings in the guest after
synchronization.
Signed-off-by: Gurchetan Singh
---
drivers/dma-buf/udmabuf.c | 40 +++
1 file changed
Not used anywhere else.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 1 -
drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio/virtgpu_drv.h
That's the only file that uses it.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_display.c | 3 +++
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c
b/drivers/gpu/drm
Not used anywhere else.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_display.c | 2 +-
drivers/gpu/drm/virtio/virtgpu_drv.h | 4
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c
b/drivers/gpu/drm/virtio
Not used anywhere.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio/virtgpu_drv.h
index cf09e4af2fc5..3e0580a8d818 100644
--- a/drivers/gpu/drm/virtio
This is a little simpler.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 8 +---
drivers/gpu/drm/virtio/virtgpu_gem.c | 4 +---
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio
That's the only file that uses it.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 --
drivers/gpu/drm/virtio/virtgpu_fence.c | 3 +++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio
Minor cleanup, change:
- file_priv--> file,
- drm_file --> file.
Reviewed-by: Chia-I Wu
Reviewed-by: Emil Velikov
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drive
initialization.
v2: Move context handle initialization too (olv)
v6: Remove redundant 3D check (emil.velikov)
Reviewed-by: Chia-I Wu
Reviewed-by: Emil Velikov
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 ++
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 13
Use an boolean variable to track whether a context has been
initiated.
v5: Fix possible race and sleep via mutex (olv)
Reviewed-by: Chia-I Wu
Reviewed-by: Emil Velikov
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 ++
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 8
in resource create
v7: Remove check when getting capabilities
Reviewed-by: Chia-I Wu
Reviewed-by: Emil Velikov
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 --
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 29 ++
drivers/gpu/drm/virtio
This renames struct virtio_gpu_object to struct virtio_gpu_shmem.
This will go in line with the planned struct virtio_gpu_vram.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 22 ++---
drivers/gpu/drm/virtio/virtgpu_gem.c| 12 +--
drivers/gpu/drm/virtio
The plan is to use this array with VRAM objects too.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 36
drivers/gpu/drm/virtio/virtgpu_gem.c| 116
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 32 +++
drivers/gpu/drm/virtio
to kraxel for suggesting this
approach on Gitlab.
Suggested by: Gerd Hoffman
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 3 +++
drivers/gpu/drm/virtio/virtgpu_object.c | 9 +++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/
; ??// or *drm_gem_vram_object
?? ?? uint32_t hw_res_handle;
?? ?? {offset, range};
?? ?? (...)
};
Sending this out to solicit feedback on this approach. ??Whichever approach
we decide, landing incremental changes to internal structures is reduces
rebasing costs and avoids mega-changes.
Gurchetan Singh (8):
drm
This is a very, very minor cleanup.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_object.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c
b/drivers/gpu/drm/virtio/virtgpu_object.c
index 3d2a6d489bfc..07de3260118a
Whether the resource is a shmem based resource or a (planned)
vram based resource, it will have a resource handle associated
with it. Since the hypercall interface works on resource handles,
add a function that returns the handle given a GEM object.
Signed-off-by: Gurchetan Singh
---
drivers
This hypercall is reusable for both shmem and (planned) vram
based virtgpu objects.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 2 +-
drivers/gpu/drm/virtio/virtgpu_object.c | 2 +-
drivers/gpu/drm/virtio/virtgpu_vq.c | 17 +++--
3 files
Currently, struct virtio_gpu_object refers to the SHMEM based object,
which is fair. We want to expand that a bit, so let's expand the
creation params too.
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 10 +-
drivers/gpu/drm/virtio/virtgpu_gem.c| 4
A resource will be a shmem based resource or a (planned)
vram based resource, so it makes sense to factor out common fields
(resource handle, dumb).
v2: move mapped field to shmem object
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 13 +++
drivers/gpu
This function can be reused for hostmem objects.
v2: move virtio_gpu_is_shmem() check to virtio_gpu_cleanup_object()
v3: use-after free fix
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 2 +-
drivers/gpu/drm/virtio/virtgpu_object.c | 33
On Mon, Mar 2, 2020 at 4:15 AM David Stevens wrote:
>
> Add support for UUID-based resource sharing mechanism to virtgpu. This
> implements the new virtgpu commands and hooks them up to dma-buf's
> get_uuid callback.
>
> Signed-off-by: David Stevens
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.c
This function can be reused for hostmem objects.
v2: move virtio_gpu_is_shmem() check to virtio_gpu_cleanup_object()
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 2 +-
drivers/gpu/drm/virtio/virtgpu_object.c | 32 +++--
2 files changed, 20
A resource will be a shmem based resource or a (planned)
vram based resource, so it makes sense to factor out common fields
(resource handle, dumb).
v2: move mapped field to shmem object
Signed-off-by: Gurchetan Singh
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 13 +++
drivers/gpu
On Tue, Mar 3, 2020 at 1:56 AM Gerd Hoffmann wrote:
> Hi,
>
> > struct virtio_gpu_object {
> > struct drm_gem_shmem_object base;
> > uint32_t hw_res_handle;
> > -
> > - struct sg_table *pages;
> > uint32_t mapped;
> > -
> > bool dumb;
> > bool created;
> >
On Wed, Feb 26, 2020 at 11:23 PM Gerd Hoffmann wrote:
>
> On Wed, Feb 26, 2020 at 04:25:53PM -0800, Gurchetan Singh wrote:
> > The main motivation behind this is to have eventually have something like
> > this:
> >
> > struct virtio_gpu_shmem {
> >
1 - 100 of 389 matches
Mail list logo