dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: daniel@ffwll.ch, christian.koenig@amd.com, noralf@tronnes.org
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [RFC][PATCH 0/8] Support I/O memory in generic fbdev emulation
Date: Wed,  6 Nov 2019 10:31:13 +0100	[thread overview]
Message-ID: <20191106093121.21762-1-tzimmermann@suse.de> (raw)

We recently had a discussion if/how fbdev emulation could support
framebuffers in I/O memory on all platform. [1]

I typed up a patchset that passes information about the memory area
from memory manager to client (e.g., fbdev emulation). The client can
take this into consideration when accessing the framebuffer.

The alternative proposal is to introduce a separate vmap() call that
only returns I/O memorym or NULL if the framebuffer is not in I/O
memory. AFAICS the benefit of this idea is the cleaner interface and
the ability to modify drivers one by one. The drawback is some additional
boilerplate code in drivers and clients.

[1] https://lists.freedesktop.org/archives/dri-devel/2019-November/242464.html

Thomas Zimmermann (8):
  drm/vram-helper: Tell caller if vmap() returned I/O memory
  drm/qxl: Tell caller if kmap() returned I/O memory
  drm: Add is_iomem return parameter to struct drm_gem_object_funcs.vmap
  drm/gem: Return I/O-memory flag from drm_gem_vram()
  drm/client: Return I/O memory flag from drm_client_buffer_vmap()
  fbdev: Export default read and write operations as
    fb_cfb_{read,write}()
  drm/fb-helper: Select between fb_{sys,cfb}_read() and _write()
  drm/fb-helper: Handle I/O memory correctly when flushing shadow fb

 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h |   2 +-
 drivers/gpu/drm/ast/ast_mode.c              |   6 +-
 drivers/gpu/drm/cirrus/cirrus.c             |   2 +-
 drivers/gpu/drm/drm_client.c                |  15 ++-
 drivers/gpu/drm/drm_fb_helper.c             | 118 ++++++++++++++++++--
 drivers/gpu/drm/drm_gem.c                   |   9 +-
 drivers/gpu/drm/drm_gem_cma_helper.c        |   7 +-
 drivers/gpu/drm/drm_gem_shmem_helper.c      |  12 +-
 drivers/gpu/drm/drm_gem_vram_helper.c       |  13 ++-
 drivers/gpu/drm/drm_internal.h              |   2 +-
 drivers/gpu/drm/drm_prime.c                 |   2 +-
 drivers/gpu/drm/etnaviv/etnaviv_drv.h       |   2 +-
 drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c |   4 +-
 drivers/gpu/drm/mgag200/mgag200_cursor.c    |   4 +-
 drivers/gpu/drm/nouveau/nouveau_gem.h       |   2 +-
 drivers/gpu/drm/nouveau/nouveau_prime.c     |   4 +-
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c |   2 +-
 drivers/gpu/drm/qxl/qxl_display.c           |   6 +-
 drivers/gpu/drm/qxl/qxl_draw.c              |   4 +-
 drivers/gpu/drm/qxl/qxl_drv.h               |   4 +-
 drivers/gpu/drm/qxl/qxl_object.c            |   7 +-
 drivers/gpu/drm/qxl/qxl_object.h            |   2 +-
 drivers/gpu/drm/qxl/qxl_prime.c             |   4 +-
 drivers/gpu/drm/radeon/radeon_drv.c         |   2 +-
 drivers/gpu/drm/radeon/radeon_prime.c       |   4 +-
 drivers/gpu/drm/tiny/gm12u320.c             |   2 +-
 drivers/gpu/drm/vc4/vc4_bo.c                |   4 +-
 drivers/gpu/drm/vc4/vc4_drv.h               |   2 +-
 drivers/gpu/drm/vgem/vgem_drv.c             |   5 +-
 drivers/gpu/drm/xen/xen_drm_front_gem.c     |   6 +-
 drivers/gpu/drm/xen/xen_drm_front_gem.h     |   3 +-
 drivers/video/fbdev/core/fbmem.c            |  53 +++++++--
 include/drm/drm_client.h                    |   7 +-
 include/drm/drm_drv.h                       |   2 +-
 include/drm/drm_fb_helper.h                 |  14 +++
 include/drm/drm_gem.h                       |   2 +-
 include/drm/drm_gem_cma_helper.h            |   2 +-
 include/drm/drm_gem_shmem_helper.h          |   2 +-
 include/drm/drm_gem_vram_helper.h           |   2 +-
 include/linux/fb.h                          |   5 +
 41 files changed, 278 insertions(+), 78 deletions(-)

-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2019-11-06  9:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  9:31 Thomas Zimmermann [this message]
2019-11-06  9:31 ` [PATCH 1/8] drm/vram-helper: Tell caller if vmap() returned I/O memory Thomas Zimmermann
2019-11-06  9:31 ` [PATCH 2/8] drm/qxl: Tell caller if kmap() " Thomas Zimmermann
2019-11-06  9:31 ` [PATCH 3/8] drm: Add is_iomem return parameter to struct drm_gem_object_funcs.vmap Thomas Zimmermann
2019-11-06  9:31 ` [PATCH 4/8] drm/gem: Return I/O-memory flag from drm_gem_vram() Thomas Zimmermann
2019-11-06  9:31 ` [PATCH 5/8] drm/client: Return I/O memory flag from drm_client_buffer_vmap() Thomas Zimmermann
2019-11-06  9:31 ` [PATCH 6/8] fbdev: Export default read and write operations as fb_cfb_{read, write}() Thomas Zimmermann
2019-11-06  9:31 ` [PATCH 7/8] drm/fb-helper: Select between fb_{sys, cfb}_read() and _write() Thomas Zimmermann
2019-11-06  9:31 ` [PATCH 8/8] drm/fb-helper: Handle I/O memory correctly when flushing shadow fb Thomas Zimmermann
2019-11-06 10:05 ` [RFC][PATCH 0/8] Support I/O memory in generic fbdev emulation Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191106093121.21762-1-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=noralf@tronnes.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).