On Wed, 8 May 2019 15:18:10 +0200 (CEST)
Sebastian Ott wrote:
> > +void cio_gp_dma_free(struct gen_pool *gp_dma, void *cpu_addr, size_t size)
> > +{
> > + if (!cpu_addr)
> > + return;
> > + memset(cpu_addr, 0, size);
>
> Hm, normally I'd do the memset during alloc not during free
On Wed, 8 May 2019 15:46:42 +0200 (CEST)
Sebastian Ott wrote:
>
> On Fri, 26 Apr 2019, Halil Pasic wrote:
> > static struct ccw_device * io_subchannel_allocate_dev(struct subchannel
> > *sch)
> > {
> [..]
> > + cdev->private = kzalloc(sizeof(struct ccw_device_private),
> > +
On Tue, 7 May 2019 15:58:12 +0200
Christian Borntraeger wrote:
>
>
> On 05.05.19 13:15, Cornelia Huck wrote:
> > On Sat, 4 May 2019 16:03:40 +0200
> > Halil Pasic wrote:
> >
> >> On Fri, 3 May 2019 16:04:48 -0400
> >> "Michael S. Tsirkin" wrote:
> >>
> >>> On Fri, May 03, 2019 at 11:17:24AM
> >
> > > +int virtio_pmem_flush(struct nd_region *nd_region)
> > > +{
> > > +int err;
> > > +unsigned long flags;
> > > +struct scatterlist *sgs[2], sg, ret;
> > > +struct virtio_device *vdev = nd_region->provider_data;
> > > +struct virtio_pmem *vpmem =
On Fri, 26 Apr 2019, Halil Pasic wrote:
> @@ -182,6 +190,8 @@ void airq_iv_release(struct airq_iv *iv)
> kfree(iv->ptr);
> kfree(iv->bitlock);
> kfree(iv->vector);
- kfree(iv->vector);
> + dma_free_coherent(cio_get_dma_css_dev(), iv_size(iv->bits),
> +
On Wed, May 08, 2019 at 03:46:42PM +0200, Sebastian Ott wrote:
> > + io_priv->dma_area = dma_alloc_coherent(&sch->dev,
> > + sizeof(*io_priv->dma_area),
> > + &io_priv->dma_area_dma, GFP_KERNEL);
>
> This needs GFP_DMA.
> You use a genpool for
On Fri, 26 Apr 2019, Halil Pasic wrote:
> static struct ccw_device * io_subchannel_allocate_dev(struct subchannel *sch)
> {
[..]
> + cdev->private = kzalloc(sizeof(struct ccw_device_private),
> + GFP_KERNEL | GFP_DMA);
Do we still need GFP_DMA here (since we now
On Fri, 26 Apr 2019, Halil Pasic wrote:
> @@ -224,6 +228,9 @@ struct subchannel *css_alloc_subchannel(struct
> subchannel_id schid,
> INIT_WORK(&sch->todo_work, css_sch_todo);
> sch->dev.release = &css_subchannel_release;
> device_initialize(&sch->dev);
> + sch->dma_mask =
>
> On 4/25/19 10:00 PM, Pankaj Gupta wrote:
>
> > +void host_ack(struct virtqueue *vq)
> > +{
> > + unsigned int len;
> > + unsigned long flags;
> > + struct virtio_pmem_request *req, *req_buf;
> > + struct virtio_pmem *vpmem = vq->vdev->priv;
> > +
> > + spin_lock_irqsave(&vpmem->pm
Hi Dan,
Thank you for the review. Please see my reply inline.
>
> Hi Pankaj,
>
> Some minor file placement comments below.
Sure.
>
> On Thu, Apr 25, 2019 at 10:02 PM Pankaj Gupta wrote:
> >
> > This patch adds virtio-pmem driver for KVM guest.
> >
> > Guest reads the persistent memory ran
This patch replaces |struct vbox_bo| and its helpers with the generic
implementation of |struct drm_gem_vram_object|. The only change in
semantics is that &ttm_bo_driver.verify_access() now does the actual
verification.
v4:
* select config option DRM_VRAM_HELPER
v3:
* remove forwar
The data structure |struct drm_vram_mm| and its helpers replace hibmc's
TTM-based memory manager. It's the same implementation; except for the
type names.
v5:
* set .llseek via DRM_VRAM_MM_FILE_OPERATIONS
v4:
* don't select DRM_TTM or DRM_VRAM_MM_HELPER
v3:
* use drm_gem_vr
The data structure |struct drm_vram_mm| and its helpers replace vboxvideo's
TTM-based memory manager. It's the same implementation; except for the type
names.
v4:
* don't select DRM_TTM or DRM_VRAM_MM_HELPER
v3:
* use drm_gem_vram_mm_funcs
* convert driver to drm_device-bas
The data structure |struct drm_gem_vram_object| and its helpers replace
|struct mgag200_bo|. It's the same implementation; except for the type
names.
v4:
* cleanups from checkpatch.pl
* select config option DRM_VRAM_HELPER
Signed-off-by: Thomas Zimmermann
---
drivers/gpu/drm/mga
The data structure |struct drm_gem_vram_object| and its helpers replace
|struct hibmc_bo|. It's the same implementation; except for the type
names.
v4:
* select config option DRM_VRAM_HELPER
Signed-off-by: Thomas Zimmermann
---
drivers/gpu/drm/hisilicon/hibmc/Kconfig | 1 +
.../
The mgag200 driver establishes several memory mappings for frame buffers
and cursors. This patch converts the driver to use the equivalent
drm_gem_vram_kmap() functions. It removes the dependencies on TTM
and cleans up the code.
v4:
* cleanups from checkpatch.pl
Signed-off-by: Thomas Zimm
The data structure |struct drm_gem_vram_object| and its helpers replace
|struct bochs_bo|. It's the same implementation; except for the type
names.
v5:
* use PRIME helpers from GEM VRAM
v4:
* cleanups from checkpatch.pl
* select config option DRM_VRAM_HELPER
Signed-off-by:
The data structure |struct drm_vram_mm| and its helpers replace bochs'
TTM-based memory manager. It's the same implementation; except for the
type names.
v5:
* set .llseek via DRM_VRAM_MM_FILE_OPERATIONS
v4:
* don't select DRM_TTM or DRM_VRAM_MM_HELPER
v3:
* use drm_gem_vra
The data structure |struct drm_vram_mm| and its helpers replace mgag200's
TTM-based memory manager. It's the same implementation; except for the type
names.
v4:
* don't select DRM_TTM or DRM_VRAM_MM_HELPER
v3:
* use drm_gem_vram_mm_funcs
* convert driver to drm_device-based
The data structure |struct drm_vram_mm| and its helpers replace ast's
TTM-based memory manager. It's the same implementation; except for the
type names.
v4:
* don't select DRM_TTM or DRM_VRAM_MM_HELPER
v3:
* use drm_gem_vram_mm_funcs
* convert driver to drm_device-based ins
The data structure |struct drm_gem_vram_object| and its helpers replace
|struct ast_bo|. It's the same implementation; except for the type names.
v4:
* cleanups from checkpatch.pl
Signed-off-by: Thomas Zimmermann
---
drivers/gpu/drm/ast/Kconfig| 2 +-
drivers/gpu/drm/ast/ast_drv.c
There's now a pointer to struct drm_vram_mm stored in struct drm_device.
DRM drivers that use VRAM MM should use this field to refer to their
instance of the data structure. Appropriate helpers are now provided as
well.
Adding struct drm_vram_mm to struct drm_device further avoids wrappers
and boi
The AST driver establishes several memory mappings for frame buffers
and cursors. This patch converts the driver to use the equivalent
drm_gem_vram_kmap() functions. It removes the dependencies on TTM
and cleans up the code.
Signed-off-by: Thomas Zimmermann
---
drivers/gpu/drm/ast/ast_drv.h |
The VRAM MM memory manager is a helper library that manages dedicated video
memory of simple framebuffer devices. It is supported to be used with
struct drm_gem_vram_object, but does not depend on it.
The implementation is based on the respective code from ast, bochs, and
mgag200. These drivers sh
These basic helper functions for GEM VRAM allow for pinning and mapping
GEM VRAM objects via the PRIME interfaces. It's not a full implementation,
but complete enough for generic fbcon.
Signed-off-by: Thomas Zimmermann
---
drivers/gpu/drm/drm_gem_vram_helper.c | 98 +++
i
The helper function drm_gem_vram_fill_create_dumb() implements most of
struct drm_driver.dumb_create() for GEM-VRAM buffer objects. It's not a
full implementation of the callback, as several driver-specific parameters
are still required.
v4:
* cleanups from checkpatch.pl
v2:
* docu
The provided helpers can be used for the respective callback functions
in |struct ttm_bo_driver|.
v2:
* drm_is_gem_vram() is now a private function
* documentation fixes
Signed-off-by: Thomas Zimmermann
---
drivers/gpu/drm/drm_gem_vram_helper.c | 50 +++
VRAM MM is most likely be used with GEM VRAM. The latter now provides the
required instance of struct drm_vram_mm_funcs for drivers to use.
Signed-off-by: Thomas Zimmermann
---
drivers/gpu/drm/drm_gem_vram_helper.c | 14 ++
include/drm/drm_gem_vram_helper.h | 3 +++
2 files chan
The type |struct drm_gem_vram_object| implements a GEM object for simple
framebuffer devices with dedicated video memory. The BO is either located
in VRAM or system memory.
The implementation has been created from the respective code in ast,
bochs and mgag200. These drivers copy their implementati
The provided helpers can be used for the respective callback functions
in |struct drm_driver|.
v4:
* cleanups from checkpatch.pl
v2:
* documentation fixes
Signed-off-by: Thomas Zimmermann
---
drivers/gpu/drm/drm_gem_vram_helper.c | 49 +++
include/drm/drm
Several simple framebuffer drivers copy most of the TTM code from each
other. The implementation is always the same; except for the name of
some data structures.
As recently discussed, this patch set provides generic memory-management
code for simple framebuffers with dedicated video memory. It fu
31 matches
Mail list logo