Hi,
> > Like I said, for most drivers
> > > you can pretty much assume that their unload sequence has been broken
> > > since forever. It's not often tested, and especially the hotunbind
> > > from a device (as opposed to driver unload) stuff wasn't even possible
> > > to get right until just
Add map_cached bool to drm_gem_shmem_object, to request cached mappings
on a per-object base. Check the flag before adding writecombine to
pgprot bits.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_shmem_helper.h | 5 +
drivers/gpu/drm/drm_gem_shmem_helper.c | 12
-by: Gerd Hoffmann
---
drivers/gpu/drm/udl/udl_gem.c | 62 ++-
1 file changed, 3 insertions(+), 59 deletions(-)
diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c
index b6e26f98aa0a..7e3a88b25b6b 100644
--- a/drivers/gpu/drm/udl/udl_gem.c
+++ b
virtio-gpu uses cached mappings, set
drm_gem_shmem_object.map_cached accordingly.
Reported-by: Gurchetan Singh
Signed-off-by: Gerd Hoffmann
virtio fixup
---
drivers/gpu/drm/virtio/virtgpu_object.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c
b
v4: back to v2-ish design, but simplified a bit.
v3: switch to drm_gem_object_funcs callback.
v2: make shmem helper caching configurable.
Gerd Hoffmann (3):
drm/shmem: add support for per object caching flags.
drm/virtio: fix mmap page attributes
drm/udl: simplify gem object mapping
On Tue, Dec 17, 2019 at 04:59:20PM -0800, Gurchetan Singh wrote:
> With so many new features on the horizon, perhaps it's
> time to do a little "winter cleaning" beforehand. Enjoy!
>
> drm/virtio: static-ify virtio_gpu_framebuffer_init
Doesn't apply cleanly. What kernel is this against?
>
On Tue, Dec 17, 2019 at 03:02:28PM -0800, Gurchetan Singh wrote:
> 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
On Fri, Dec 13, 2019 at 11:33:59AM -0800, Gurchetan Singh wrote:
> 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
Hi,
> > I suspect for imported dma-bufs we should leave the mmap() to the
> > exporter instead of pulling the pages out of the sgt and map them
> > ourself.
>
> Uh yes. If we still do that, then yes very much we shouldn't.
Looking again. drm_gem_dumb_map_offset() throws an error in case
.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 6 ++
drivers/gpu/drm/virtio/virtgpu_plane.c | 4
drivers/gpu/drm/virtio/virtgpu_vq.c| 23 +--
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio
v2: remove shift by src_{x,y}, drm_atomic_helper_damage_merged()
handles that for us (Chia-I Wu).
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 41 +++---
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/virtio
v2: fix src rect handling (Chia-I Wu).
Gerd Hoffmann (3):
drm/virtio: skip set_scanout if framebuffer didn't change
virtio-gpu: batch display update commands.
virtio-gpu: use damage info for display updates.
drivers/gpu/drm/virtio/virtgpu_drv.h | 6 ++
drivers/gpu/drm/virtio
v2: also check src rect (Chia-I Wu).
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 35 +++---
1 file changed, 21 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
b/drivers/gpu/drm/virtio/virtgpu_plane.c
index
Hi,
> btw on why udl does this: Imported bo are usually rendered by real hw, and
> reading it uncached/wc is the more defensive setting. It would be kinda
> nice if dma-buf would expose this, but I fear dma-api maintainers would
> murder us if we even just propose that ... so it's a mess right
> > + /**
> > +* @pgprot:
> > +*
> > +* Tweak pgprot as needed, typically used to set cache bits.
> > +*
> > +* This callback is optional.
> > +*
> > +* If unset drm_gem_pgprot_wc() will be used.
> > +*/
> > + pgprot_t (*pgprot)(struct drm_gem_object *obj,
() and vmap() functions.
The patch also adds two implementations for the callback, for cached and
writecombine mappings, and the drm_gem_pgprot() function to update
pgprot for a given object, using the new _gem_object_funcs.pgprot
callback if available.
Signed-off-by: Gerd Hoffmann
---
include/drm
Use drm_gem_pgprot_wc() as pgprot callback in drm_gem_shmem_funcs.
Use drm_gem_pgprot() to update pgprot caching flags.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm
virtio-gpu uses cached mappings, set virtio_gpu_gem_funcs.pgprot
accordingly.
Reported-by: Gurchetan Singh
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_object.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c
b/drivers/gpu/drm
v3: switch to drm_gem_object_funcs callback.
v2: make shmem helper caching configurable.
Gerd Hoffmann (4):
drm: add pgprot callback to drm_gem_object_funcs
drm/shmem: add support for per object caching flags.
drm/virtio: fix mmap page attributes
drm/udl: simplify gem object mapping
With shmem helpers allowing to update pgprot caching flags via
drm_gem_object_funcs.pgprot we can just use that and ditch our own
implementations of mmap() and vmap().
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/udl/udl_gem.c | 62 ---
1 file changed, 7
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 41 +++---
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 2e0d14e005db..1a0fbbb91ec7 100644
.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 6 ++
drivers/gpu/drm/virtio/virtgpu_plane.c | 4
drivers/gpu/drm/virtio/virtgpu_vq.c| 23 +--
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/virtio
Gerd Hoffmann (3):
drm/virtio: skip set_scanout if framebuffer didn't change
virtio-gpu: batch display update commands.
virtio-gpu: use damage info for display updates.
drivers/gpu/drm/virtio/virtgpu_drv.h | 6 ++
drivers/gpu/drm/virtio/virtgpu_plane.c | 76
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 31 ++
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
b/drivers/gpu/drm/virtio/virtgpu_plane.c
index bc4bc4475a8c..a0f91658c2bc 100644
override that later if
needed.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_shmem_helper.h | 12
drivers/gpu/drm/drm_gem_shmem_helper.c | 24 +---
2 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/include/drm/drm_gem_shmem_helper.h
b
virtio-gpu uses cached mappings, set shmem->caching accordingly.
Reported-by: Gurchetan Singh
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_object.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c
b/drivers/gpu/drm/vir
v2: make shmem helper caching configurable.
Gerd Hoffmann (2):
drm/shmem: add support for per object caching attributes
drm/virtio: fix mmap page attributes
include/drm/drm_gem_shmem_helper.h | 12
drivers/gpu/drm/drm_gem_shmem_helper.c | 24
Hi,
> There's similar code in udl, [1] which still uses writecombine for
> imported buffers. Virtio does not need this?
virtio doesn't support dma-buf imports (yet).
So no worries for now.
Why pick writecombine for the imported buffer btw?
It'll probably be correct for the majority of
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-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_object.c | 18
On Fri, Dec 06, 2019 at 12:10:15PM +0100, Daniel Vetter wrote:
> On Fri, Dec 6, 2019 at 11:22 AM Gerd Hoffmann wrote:
> >
> > > Guess you kicked CI? Just got CI mails, now reporting success, without
> > > doing anything. So I'll go push v3 to misc-next.
> >
>
On Fri, Dec 06, 2019 at 11:07:24AM +0100, Gerd Hoffmann wrote:
> On Thu, Dec 05, 2019 at 11:15:23PM +0100, Daniel Vetter wrote:
> > Looks like unrelated flukes, this happens occasionally. If you're paranoid
> > hit the retest button on patchwork to double-check.
> > -Daniel
On Thu, Dec 05, 2019 at 05:42:31PM -0600, Aditya Pakki wrote:
> In qxl_gem_object_create_with_handle(), handle's memory is not
> allocated on the heap. Checking for failure of handle via BUG_ON
> is unnecessary. This patch eliminates the check.
The check makes sure the caller doesn't pass in
On Thu, Dec 05, 2019 at 11:15:23PM +0100, Daniel Vetter wrote:
> On Thu, Nov 28, 2019 at 12:39:30PM +0100, Gerd Hoffmann wrote:
> > On Wed, Nov 27, 2019 at 10:25:22AM +0100, Gerd Hoffmann wrote:
> > > The fake offset is going to stay, so change the
D_MATROX, 0x522, PCI_ANY_ID, PCI_ANY_ID, 0, 0, G200_SE_A
> },
Acked-by: Gerd Hoffmann
cheers,
Gerd
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
o be more
> readable. Patch 6 moves dma-buf begin/end calls into the damage handler,
> so it will run during page-flip andmodeset operations.
Nice cleanups.
Acked-by: Gerd Hoffmann
cheers,
Gerd
___
dri-devel mailing list
dri-devel@lists.freede
> The patchset has been tested by running the fbdev console, Gnome,
> and Weston on an AST1100 chipset. Gnome's display has been suspended
> multiple times to verify the bugfix.
Disclaimer: Don't know the hardware.
Can't spot any issues in the series, so
Acked-by: Gerd Hoffmann
cheers
{
> mdev->unique_rev_id = RREG32(0x1e24);
> + DRM_DEBUG("G200 SE unique revision id is 0x%x\n",
> + mdev->unique_rev_id);
Maybe use DRM_INFO here? Temporarily for a few kernel revisions, until
things are settle
On Mon, Dec 02, 2019 at 05:36:24PM -0800, Gurchetan Singh wrote:
> The GEM prime helpers do it, so should we. It's also possible to make
> it optional later.
All 4 pushed to drm-misc-next.
thanks,
Gerd
___
dri-devel mailing list
On Thu, Nov 07, 2019 at 06:18:14PM +0100, Markus Elfring wrote:
> From: Markus Elfring
> Date: Thu, 7 Nov 2019 18:05:08 +0100
>
> A coccicheck run provided information like the following.
>
> drivers/gpu/drm/qxl/qxl_kms.c:295:1-7: ERROR: missing iounmap;
> ioremap on line 178 and execution via
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
>
> #define UDMABUF_FLAGS_CLOEXEC0x01
> +#define
On Wed, Nov 27, 2019 at 10:25:22AM +0100, Gerd Hoffmann wrote:
> The fake offset is going to stay, so change the calling convention for
> drm_gem_object_funcs.mmap to include the fake offset. Update all users
> accordingly.
>
> Note that this reverts 83b8a6f242ea ("drm/gem:
fake offset handling for
drm_gem_object_funcs.mmap")
Cc: Daniel Vetter
Cc: Rob Herring
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
include/drm/drm_gem.h | 4 +---
drivers/gpu/drm/drm_gem.c | 3 ---
drivers/gpu/drm/drm_gem_shmem_helper.c | 3 +++
drivers/gpu/drm/
driver's private dmabuf update. It is not needed
any more now that we are doing this for everybody.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
Reviewed-by: Alex Deucher
Reviewed-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 +---
drivers/gpu/drm
Tested on qemu, with bochs (vram helpers) and cirrus (shmem helpers).
Cc'ing intel-gfx for CI coverage.
v3: better fake-offset handling in drm_gem_prime_mmap() (Rob)
Gerd Hoffmann (2):
drm: call drm_gem_object_funcs.mmap with fake offset
drm: share address space for dma bufs
include/drm
s the fake
offset to drm_gem_prime_mmap to make sure all paths leading to
obj->funcs->mmap are consistent.
Fixes: 83b8a6f242ea ("drm/gem: Fix mmap fake offset handling for
drm_gem_object_funcs.mmap")
Cc: Daniel Vetter
Cc: Rob Herring
Signed-off-by: Gerd Hoffmann
Reviewed-by: Danie
driver's private dmabuf update. It is not needed
any more now that we are doing this for everybody.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 +---
drivers/gpu/drm/drm_prime.c | 4 +++-
2 files changed, 4 insertions(+), 4 deletions(-)
diff
Tested on qemu, with bochs (vram helpers) and cirrus (shmem helpers).
Cc'ing intel-gfx for CI coverage.
Gerd Hoffmann (2):
drm: call drm_gem_object_funcs.mmap with fake offset
drm: share address space for dma bufs
include/drm/drm_gem.h | 4 +---
drivers/gpu/drm/amd
On Thu, Nov 21, 2019 at 04:42:10PM +, Ruhl, Michael J wrote:
> >-Original Message-
> >From: Intel-gfx On Behalf Of Gerd
> >Hoffmann
> >Sent: Thursday, November 21, 2019 5:38 AM
> >To: dri-devel@lists.freedesktop.org
> >Cc: David Airlie ; intel-...@
Tested on qemu, with bochs (vram helpers) and cirrus (shmem helpers).
Cc'ing intel-gfx for CI coverage.
Gerd Hoffmann (2):
drm: call drm_gem_object_funcs.mmap with fake offset
drm: share address space for dma bufs
include/drm/drm_gem.h | 4 +---
drivers/gpu/drm/drm_gem.c
The fake offset is going to stay, so change the calling convention for
drm_gem_object_funcs.mmap to include the fake offset. Update all users
accordingly.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem.h | 4 +---
drivers/gpu/drm/drm_gem.c | 3 ---
drivers
Use the shared address space of the drm device (see drm_open() in
drm_file.c) for dma-bufs too. That removes a difference betweem drm
device mmap vmas and dma-buf mmap vmas and fixes corner cases like
unmaps not working properly.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/drm_prime.c | 4
On Thu, Nov 21, 2019 at 09:49:53AM +0100, Daniel Vetter wrote:
> On Thu, Nov 21, 2019 at 09:02:59AM +0100, Gerd Hoffmann wrote:
> > Hi,
> >
> > > > update-object-after-move works fine.
> > > >
> > > > try zap mappings with madvise(dontneed)
Hi,
> Aside: the amdgpu isn't great because it's racy, userspace could have
> guessed the fd and already started an mmap before we managed to update
> stuff.
Can't see that race. When I read the code correctly the fd is created
and installed (using dma_buf_fd) only after dmabuf setup is
nting at the new place in vram?
Hmm, only the drm device mapping is faulted in after moving it,
the dma-buf mapping is not. Fixed by:
-- cut here
From 3a7f6c6dbf3b1e4b412c2b283b2ea4edff9f33b5 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann
Date: Thu, 21 No
Hi,
> Ah, we're not going to replace the mapping on the dma-buf file. Only
> the file of the vma structure. Doing the former would indeed be pretty
> bad from a security pov.
Now where do I get a filp from? Can I just call drm_open?
cheers,
Gerd
Hi,
> > > I think for ttm just consistently using the one per-device mapping for
> > > everything, with all the fake offsets, is probably the quickest route.
> >
> > Hmm, not clear how to fit dmabufs into this. dmabufs already have their
> > own file, inode and address space. I'm not sure you
Hi,
> > Anything building on shmem helpers should be able to use
> > obj->filp->f_mapping, right? So allocating an inode unconditionally
> > doesn't look like a good plan.
>
> Not sure the shmem helpers forward the mmap to the underlying shmem file,
> so not sure this is the greatest way
Hi,
> > I can see now why you want a private address space for each object.
> > Does that imply we need an anon_inode for each gem object? Or is
> > there some more lightweight way to do this?
>
> I have no idea whether we can get a address_space struct without an inode
> (and no disasters).
On Mon, Nov 18, 2019 at 11:35:35AM +0100, Daniel Vetter wrote:
> No in-tree users left.
>
> Signed-off-by: Daniel Vetter
> Cc: Kirti Wankhede
> Cc: k...@vger.kernel.org
> --
> Ack for merging this through drm trees very much appreciated.
> -Daniel
Acked-by: Gerd H
Hi,
> > > > Is any move buffer good enough to trigger this, i.e. will SYSTEM -> VRAM
> > > > work too? That'll be easier because all I need to do is map the buffer
> > > > to a crtc to force pinning to vram, then check if the mappings are
> > > > intact still ...
> > >
> > > I think that
On Fri, Nov 15, 2019 at 11:18:28AM +0100, Daniel Vetter wrote:
> On Fri, Nov 15, 2019 at 10:37 AM Gerd Hoffmann wrote:
> >
> > > You need memory pressure, to force ttm to unmap the bo, not userspace. So
> > > roughly
> > > 1. create bo
> > > 2. mma
> You need memory pressure, to force ttm to unmap the bo, not userspace. So
> roughly
> 1. create bo
> 2. mmap it through drm fd, write some stuff
> 3. export to dma-buf, mmap it, verify stuff is there
> 4. create a pile more bo, mmap them write to them
> 5. once you've thrashed all of vram
).
For that to work properly the drm_gem_object_get() call in
drm_gem_ttm_mmap() must be moved so it happens before calling
obj->funcs->mmap(), otherwise the gem refcount would go down
to zero.
Fixes: 231927d939f0 ("drm/ttm: add drm_gem_ttm_mmap()")
Signed-off-by: Gerd Hoffmann
---
drivers/g
Hi,
> > ... but after looking again I think we are all green here. Given that
> > only self-import works we'll only see vram gem objects in the mmap code
> > path, which should have everything set up correctly. Same goes for qxl.
> >
> > All other ttm drivers still use the old mmap code path,
Hi,
> > > I guess ... but kinda awkward to leave this issue in here, it's really
> > > surprising if you call the pte shootdown function, and it doesn't work as
> > > advertised.
> >
> > I was mainly wondering how this worked for us and how to hit it not
> > working to test fixing it.
> >
> >
Hi,
> > > >> VRAM helpers use drm_gem_ttm_mmap(), which wraps ttm_bo_mmap_obj().
> > > >> These changes should be transparent.
> > > >
> > > > There's still the issue that for dma-buf mmap vs drm mmap you use
> > > > different f_mapping, which means ttm's pte shootdown won't work
> > > >
ack with an offset of
> >>>>> 0,
> >>>>> and leave it up to drm_gem_mmap_obj() to remove the fake offset.
> >>>>>
> >>>>> TTM still needs the fake offset, so we have to add it back until that's
> >>>>
fset.
> > > >
> > > > To fix this, let's always call mmap() object callback with an offset of
> > > > 0,
> > > > and leave it up to drm_gem_mmap_obj() to remove the fake offset.
> > > >
> > > > TTM still needs the fake offset, so
* define plane format array in global scope
>
> Signed-off-by: Thomas Zimmermann
> ---
> drivers/gpu/drm/ast/ast_drv.h | 1 +
> drivers/gpu/drm/ast/ast_mode.c | 155 -
> 2 files changed, 155 insertions(+), 1 d
he CRTC's
> atomic helpers.
>
> v2:
> * don't set plane call-back functions to NULL explicitly
> * define plane format array in global scope
>
> Signed-off-by: Thomas Zimmermann
Acked-by: Gerd Hoffmann
___
dr
lines of code.
> but I'd like to do that in a separate patch set. Ok?
Yep, that totally makes sense, given that it'll probably become a patch
series of its own (with driver cleanups included).
So, for this patch:
Acked-by: Gerd Hoffmann
cheers,
Gerd
_
des its own
> mmap function for GEM objects where it fixes up the mapping flags.
>
> v2:
> - remove obsolete code in a separate patch
That indeed makes the patch more readable as the context stays intact
this way.
>
> Signed-off-by: Thomas Zimmermann
Acked-by: Gerd Hoffmann
On Wed, Nov 06, 2019 at 11:47:22AM +0100, Thomas Zimmermann wrote:
> Simply removes all the obsolete GEM code from udl. No functional
> changes.
>
> Signed-off-by: Thomas Zimmermann
Acked-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/udl/Makefile | 2 +-
> drivers/gpu
On Mon, Oct 28, 2019 at 09:45:49AM +0100, Thomas Zimmermann wrote:
> Udl's GEM code and the generic SHMEM are almost identical. Replace
> the former with SHMEM. The dmabuf support in udl is being removed
> in favor of the generic GEM PRIME functions.
>
> The main difference is in the caching
her
> struct drm_gem_object.import_attach is NULL.
Acked-by: Gerd Hoffmann
>
> Signed-off-by: Thomas Zimmermann
> ---
> drivers/gpu/drm/udl/udl_dmabuf.c | 1 -
> drivers/gpu/drm/udl/udl_drv.h| 4
> drivers/gpu/drm/udl/udl_gem.c| 27 +++
>
mmap
> function, which we set though the create-object function.
Acked-by: Gerd Hoffmann
>
> Signed-off-by: Thomas Zimmermann
> ---
> drivers/gpu/drm/udl/udl_drv.c | 1 +
> drivers/gpu/drm/udl/udl_drv.h | 2 ++
> drivers/gpu/drm/udl/udl_gem.c | 25 +--
On Mon, Oct 28, 2019 at 04:49:28PM +0100, Thomas Zimmermann wrote:
> This commit sets the remaining atomic-modesetting helpers and the flag
> DRIVER_ATOMIC. Legacy cursor functions are removed in favor of the cursor
> plane. For power management, atomic helpers replace the indvidual
> operations
On Mon, Oct 28, 2019 at 04:49:27PM +0100, Thomas Zimmermann wrote:
> The cursor plane uses an internal format of ARGB. To userspace, we
> announce ARGB and do the transformation internally.
Same comments as on patch 6/9 (primary plane ...)
cheers,
Gerd
-off-by: Thomas Zimmermann
Acked-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/ast/ast_mode.c | 105 -
> 1 file changed, 104 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
> index
> +static const struct drm_plane_funcs ast_primary_plane_funcs = {
> + .update_plane = drm_atomic_helper_update_plane,
> + .disable_plane = drm_atomic_helper_disable_plane,
> + .destroy = drm_plane_cleanup,
> + .reset = drm_atomic_helper_plane_reset,
> + .set_property = NULL,
>
it the function into individual functions that do the
> conversion, set the VBIOS mode information and format information.
> This makes it compatible with support for primary planes and atomic
> modesetting.
Acked-by: Gerd Hoffmann
>
> Signed-off-by: Thomas Zimmermann
> ---
>
> atomic modesetting.
>
> Signed-off-by: Thomas Zimmermann
Acked-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/ast/ast_mode.c | 15 ++-
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/as
mermann
Acked-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/ast/ast_mode.c | 8 ++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
> index b13eaa2619ab..b3f82c2d274d 100644
> --- a/drivers/gp
On Mon, Oct 28, 2019 at 04:49:21PM +0100, Thomas Zimmermann wrote:
> Each video mode's primary plane requires a minimum amount of video
> memory. For double buffering, this is at most half the available
> VRAM. Check this constraint.
Acked-by: Gerd Hoffmann
>
> Signed-off-by: Th
On Mon, Oct 28, 2019 at 04:49:20PM +0100, Thomas Zimmermann wrote:
> The ast driver has switched to struct drm_vram_gem_object a while ago.
> This patch removes a function and forward declaration that were forgotten
> before.
>
> Signed-off-by: Thomas Zimmermann
Acked-by
Hi,
> > I had a flag to set this in the initial version of the shmem helper
> > modeled after udl, but Thomas Hellstrom brought up a question and it was
> > dropped. The issue was beyond my understanding:
> >
> > [PATCH v3 0/2] drm: Add shmem GEM library
> >
alled with the fake offset
> + * removed. Add it back here until the rest of TTM works without it.
> + */
> + vma->vm_pgoff += drm_vma_node_start(>base.vma_node);
> +
> ttm_bo_mmap_vma_setup(bo, vma);
> return 0;
> }
Yes, that should keep ttm happ
On Thu, Oct 24, 2019 at 02:32:14PM +0200, Daniel Vetter wrote:
> On Thu, Oct 24, 2019 at 11:02:40AM +0200, Gerd Hoffmann wrote:
> > On Wed, Oct 23, 2019 at 05:22:26PM -0500, Rob Herring wrote:
> > > Commit c40069cb7bd6 ("drm: add mmap() to drm_gem_object_funcs")
> &
ove the fake offset
handling from drivers. But that'll only work once all drivers switched
away from custom fops->mmap handlers so we can handle the offset -> obj
lookup in the drm core for everybody.
So let's go this way for now.
Acked-by: Gerd Hoffmann
> However, for mmap() on dm
No functional change.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 36 +++---
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 0b5a760bc293
Be consistent with the rest of the code base.
No functional change.
v2:
- fix sparse warnings for virtio_gpu_cmd_transfer_to_host_2d call.
- move convert_to_hw_box helper function.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 5 +++--
drivers/gpu/drm/virtio
Little patch series doing some cleanups in the virtio driver.
Patches #1 + #2 have been on the list before as single patches,
includes here again for patch dependency reasons.
v2:
- fix sparse errors.
- drop merged patches (#1 + #2).
please review,
Gerd
Gerd Hoffmann (3):
drm/virtio: fix
Return early for the no framebuffer (or disabled output) case.
Results in a simpler code flow for the remaining cases.
No functional change.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 62 ++
1 file changed, 33 insertions(+), 29 deletions
Little patch series doing some cleanups in the virtio driver.
Patches #1 + #2 have been on the list before as single patches,
includes here again for patch dependency reasons.
please review,
Gerd
Gerd Hoffmann (5):
drm/virtio: print a single line with device features
drm/virtio: move
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_kms.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c
b/drivers/gpu/drm/virtio/virtgpu_kms.c
index 0b3cdb0d83b0..2f5773e43557 100644
--- a/drivers/gpu/drm/virtio
No functional change.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 36 +++---
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 0b5a760bc293
Return early for the no framebuffer (or disabled output) case.
Results in a simpler code flow for the remaining cases.
No functional change.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 62 ++
1 file changed, 33 insertions(+), 29 deletions
Be consistent with the rest of the code base.
No functional change.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 4 ++--
drivers/gpu/drm/virtio/virtgpu_plane.c | 12 ++--
drivers/gpu/drm/virtio/virtgpu_vq.c| 12 ++--
3 files changed, 14
Be consistent with the rest of the code base.
No functional change.
In theory this change is incompatible on bigendian machines,
but in practice 3d acceleration is supported only on little
endian machines, so the affected code paths never run on
bigendian machines.
Signed-off-by: Gerd Hoffmann
Be consistent with the rest of the code base.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 4 ++--
drivers/gpu/drm/virtio/virtgpu_plane.c | 12 ++--
drivers/gpu/drm/virtio/virtgpu_vq.c| 12 ++--
3 files changed, 14 insertions(+), 14 deletions
501 - 600 of 2006 matches
Mail list logo