Displaying 20 results from an estimated 61 matches for "drm_client".
2019 Jul 03
1
[PATCH 1/5] drm/client: Support unmapping of DRM client buffers
...buffer may permanently consume video memory while it's
> allocated. This is a problem for drivers of low-memory devices, such as
> ast, mgag200 or older framebuffer hardware, which will then not have
> enough memory to display other content (e.g., X11).
>
> This patch introduces drm_client_buffer_vmap() and _vunmap(). Internal
> DRM clients can use these functions to unmap and remap buffer objects
> as needed.
>
> There's no reference counting for vmap operations. Callers are expected
> to either keep buffers mapped (as it is now), or call vmap and vunmap
> in...
2020 Oct 22
2
[PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map
On Tue, Oct 20, 2020 at 02:20:44PM +0200, Thomas Zimmermann wrote:
> Kernel DRM clients now store their framebuffer address in an instance
> of struct dma_buf_map. Depending on the buffer's location, the address
> refers to system or I/O memory.
>
> Callers of drm_client_buffer_vmap() receive a copy of the value in
> the call's supplied arguments. It can be accessed and modified with
> dma_buf_map interfaces.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Te...
2019 Jul 05
0
[PATCH v2 1/6] drm/client: Support unmapping of DRM client buffers
...s relocation.
Hence, the buffer may permanently consume video memory while it's
allocated. This is a problem for drivers of low-memory devices, such as
ast, mgag200 or older framebuffer hardware, which will then not have
enough memory to display other content (e.g., X11).
This patch introduces drm_client_buffer_vmap() and _vunmap(). Internal
DRM clients can use these functions to unmap and remap buffer objects
as needed.
There's no reference counting for vmap operations. Callers are expected
to either keep buffers mapped (as it is now), or call vmap and vunmap
in pairs around code that accesse...
2019 Jul 03
0
[PATCH 1/5] drm/client: Support unmapping of DRM client buffers
...s relocation.
Hence, the buffer may permanently consume video memory while it's
allocated. This is a problem for drivers of low-memory devices, such as
ast, mgag200 or older framebuffer hardware, which will then not have
enough memory to display other content (e.g., X11).
This patch introduces drm_client_buffer_vmap() and _vunmap(). Internal
DRM clients can use these functions to unmap and remap buffer objects
as needed.
There's no reference counting for vmap operations. Callers are expected
to either keep buffers mapped (as it is now), or call vmap and vunmap
in pairs around code that accesse...
2020 Sep 29
0
[PATCH v3 5/7] drm/gem: Store client buffer mappings as struct dma_buf_map
Kernel DRM clients now store their framebuffer address in an instance
of struct dma_buf_map. Depending on the buffer's location, the address
refers to system or I/O memory.
Callers of drm_client_buffer_vmap() receive a copy of the value in
the call's supplied arguments. It can be accessed and modified with
dma_buf_map interfaces.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
---
drivers/gpu/drm/drm_client.c | 34 +++++++++++++++++++--------------
drivers/gpu/drm/...
2020 Oct 20
0
[PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map
Kernel DRM clients now store their framebuffer address in an instance
of struct dma_buf_map. Depending on the buffer's location, the address
refers to system or I/O memory.
Callers of drm_client_buffer_vmap() receive a copy of the value in
the call's supplied arguments. It can be accessed and modified with
dma_buf_map interfaces.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Tested-by: Sam Ravnborg <sam...
2020 Oct 28
0
[PATCH v6 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map
Kernel DRM clients now store their framebuffer address in an instance
of struct dma_buf_map. Depending on the buffer's location, the address
refers to system or I/O memory.
Callers of drm_client_buffer_vmap() receive a copy of the value in
the call's supplied arguments. It can be accessed and modified with
dma_buf_map interfaces.
v6:
* don't call page_to_phys() on framebuffers in I/O memory;
warn instead (Daniel)
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>...
2020 Oct 22
0
[PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map
...On Tue, Oct 20, 2020 at 02:20:44PM +0200, Thomas Zimmermann wrote:
>> Kernel DRM clients now store their framebuffer address in an instance
>> of struct dma_buf_map. Depending on the buffer's location, the address
>> refers to system or I/O memory.
>>
>> Callers of drm_client_buffer_vmap() receive a copy of the value in
>> the call's supplied arguments. It can be accessed and modified with
>> dma_buf_map interfaces.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>> Reviewed-by: Daniel Vetter <daniel.vetter at f...
2019 Jul 05
11
[PATCH v2 0/6] Unmappable DRM client buffers for fbdev emulation
...| 13 +-
drivers/gpu/drm/ast/ast_drv.h | 17 --
drivers/gpu/drm/ast/ast_fb.c | 341 -------------------------
drivers/gpu/drm/ast/ast_main.c | 3 +-
drivers/gpu/drm/ast/ast_mode.c | 21 --
drivers/gpu/drm/bochs/bochs_kms.c | 1 +
drivers/gpu/drm/drm_client.c | 61 ++++-
drivers/gpu/drm/drm_fb_helper.c | 52 +++-
drivers/gpu/drm/mgag200/Makefile | 2 +-
drivers/gpu/drm/mgag200/mgag200_drv.h | 19 --
drivers/gpu/drm/mgag200/mgag200_fb.c | 309 ----------------------
drivers/gpu/drm/mgag200/mgag200_main.c | 31 +--
driver...
2019 Jul 05
11
[PATCH v2 0/6] Unmappable DRM client buffers for fbdev emulation
...| 13 +-
drivers/gpu/drm/ast/ast_drv.h | 17 --
drivers/gpu/drm/ast/ast_fb.c | 341 -------------------------
drivers/gpu/drm/ast/ast_main.c | 3 +-
drivers/gpu/drm/ast/ast_mode.c | 21 --
drivers/gpu/drm/bochs/bochs_kms.c | 1 +
drivers/gpu/drm/drm_client.c | 61 ++++-
drivers/gpu/drm/drm_fb_helper.c | 52 +++-
drivers/gpu/drm/mgag200/Makefile | 2 +-
drivers/gpu/drm/mgag200/mgag200_drv.h | 19 --
drivers/gpu/drm/mgag200/mgag200_fb.c | 309 ----------------------
drivers/gpu/drm/mgag200/mgag200_main.c | 31 +--
driver...
2019 Jul 05
0
[PATCH v2 2/6] drm/fb-helper: Map DRM client buffer only when required
...hadow buffer, the buffer object can remain unmapped.
Userspace will always mmap the shadow buffer.
v2:
* change DRM client to not map buffer by default
* manually map client buffer for fbdev with HW framebuffer
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
---
drivers/gpu/drm/drm_client.c | 16 ++++------------
drivers/gpu/drm/drm_fb_helper.c | 33 +++++++++++++++++++++++++--------
2 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c
index 66d8d645ac79..7d23c834f503 100644
--- a/drivers/gpu/drm/drm_client.c...
2020 Sep 29
0
[PATCH v3 4/7] drm/gem: Update internal GEM vmap/vunmap interfaces to use struct dma_buf_map
GEM's vmap and vunmap interfaces now wrap memory pointers in struct
dma_buf_map.
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
---
drivers/gpu/drm/drm_client.c | 18 +++++++++++-------
drivers/gpu/drm/drm_gem.c | 28 ++++++++++++++--------------
drivers/gpu/drm/drm_internal.h | 5 +++--
drivers/gpu/drm/drm_prime.c | 14 ++++----------
4 files changed, 32 insertions(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/d...
2019 Jul 03
11
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
...| 22 +-
drivers/gpu/drm/ast/ast_drv.h | 17 --
drivers/gpu/drm/ast/ast_fb.c | 341 -------------------------
drivers/gpu/drm/ast/ast_main.c | 30 ++-
drivers/gpu/drm/ast/ast_mode.c | 21 --
drivers/gpu/drm/bochs/bochs_kms.c | 2 +-
drivers/gpu/drm/drm_client.c | 71 ++++-
drivers/gpu/drm/drm_fb_helper.c | 14 +-
drivers/gpu/drm/mgag200/Makefile | 2 +-
drivers/gpu/drm/mgag200/mgag200_drv.h | 19 --
drivers/gpu/drm/mgag200/mgag200_fb.c | 309 ----------------------
drivers/gpu/drm/mgag200/mgag200_main.c | 61 +++--
driver...
2019 Jul 03
11
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
...| 22 +-
drivers/gpu/drm/ast/ast_drv.h | 17 --
drivers/gpu/drm/ast/ast_fb.c | 341 -------------------------
drivers/gpu/drm/ast/ast_main.c | 30 ++-
drivers/gpu/drm/ast/ast_mode.c | 21 --
drivers/gpu/drm/bochs/bochs_kms.c | 2 +-
drivers/gpu/drm/drm_client.c | 71 ++++-
drivers/gpu/drm/drm_fb_helper.c | 14 +-
drivers/gpu/drm/mgag200/Makefile | 2 +-
drivers/gpu/drm/mgag200/mgag200_drv.h | 19 --
drivers/gpu/drm/mgag200/mgag200_fb.c | 309 ----------------------
drivers/gpu/drm/mgag200/mgag200_main.c | 61 +++--
driver...
2024 Aug 07
8
[PATCH 0/8] drm/{amdgpu,nouveau}: Remove old fbdev hooks
...drm/fbdev-helper: Do delayed switcheroo in lastclose helper
drm/amdgpu: Do not set struct drm_driver.lastclose
drm/nouveau: Do not set struct drm_driver.lastclose
drm/nouveau: Do not set struct
drm_mode_config_funcs.output_poll_changed
drm/nouveau: Implement switcheroo reprobe with
drm_client_dev_hotplug()
drm/fbdev-helper: Remove drm_fb_helper_output_poll_changed()
drm: Remove struct drm_driver.lastclose
drm: Remove struct drm_mode_config_funcs.output_poll_changed
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 -
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 --
drivers/gpu/dr...
2024 Aug 12
3
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
...ers/gpu/drm/drm_file.c
index 714e42b05108..513bef816ae9 100644
--- a/drivers/gpu/drm/drm_file.c
+++ b/drivers/gpu/drm/drm_file.c
@@ -38,6 +38,7 @@
#include <linux/pci.h>
#include <linux/poll.h>
#include <linux/slab.h>
+#include <linux/vga_switcheroo.h>
#include <drm/drm_client.h>
#include <drm/drm_drv.h>
@@ -404,6 +405,9 @@ void drm_lastclose(struct drm_device * dev)
drm_dbg_core(dev, "driver lastclose completed\n");
drm_client_dev_restore(dev);
+
+ if (dev_is_pci(dev->dev))
+ vga_switcheroo_process_delayed_switch();
}
/**
diff --git a/d...
2019 Jul 04
2
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
...elper *fb_helper,
> #endif
> drm_fb_helper_fill_info(fbi, fb_helper, sizes);
>
> - if (fb->funcs->dirty) {
> + if (fb->funcs->dirty || fb_helper->use_shadow) {
> struct fb_ops *fbops;
> void *shadow;
>
> @@ -2310,6 +2311,44 @@ static const struct drm_client_funcs
> drm_fbdev_client_funcs = {
> .hotplug = drm_fbdev_client_hotplug,
> };
>
> +static int _drm_fbdev_generic_setup(struct drm_device *dev, unsigned
> int preferred_bpp, bool use_shadow)
> +{
> + struct drm_fb_helper *fb_helper;
> + int ret;
> +
> + WARN(dev...
2019 Jul 04
2
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
...elper *fb_helper,
> #endif
> drm_fb_helper_fill_info(fbi, fb_helper, sizes);
>
> - if (fb->funcs->dirty) {
> + if (fb->funcs->dirty || fb_helper->use_shadow) {
> struct fb_ops *fbops;
> void *shadow;
>
> @@ -2310,6 +2311,44 @@ static const struct drm_client_funcs
> drm_fbdev_client_funcs = {
> .hotplug = drm_fbdev_client_hotplug,
> };
>
> +static int _drm_fbdev_generic_setup(struct drm_device *dev, unsigned
> int preferred_bpp, bool use_shadow)
> +{
> + struct drm_fb_helper *fb_helper;
> + int ret;
> +
> + WARN(dev...
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
...The one in the fbdev code is annoying, because it's another race.
Ideally instead of that check it needs a call to
vga_switcheroo_client_tryget/put just around the call to restore modes
(we do not want fbdev to block state switches), but that probably means
wiring a new callback through drm_client to drivers.
- Might have missed a special case ...
Anyway, I got nerdsniped, had an idea, figured best to type it up. Maybe
we want to add a link to this to todo.rst, I think we have a vgaswitcheroo
entry already.
Cheers, Sima
>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch...
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
...e is annoying, because it's another race.
> Ideally instead of that check it needs a call to
> vga_switcheroo_client_tryget/put just around the call to restore modes
> (we do not want fbdev to block state switches), but that probably means
> wiring a new callback through drm_client to drivers.
>
> - Might have missed a special case ...
>
> Anyway, I got nerdsniped, had an idea, figured best to type it up. Maybe
> we want to add a link to this to todo.rst, I think we have a vgaswitcheroo
> entry already.
>
> Cheers, Sima
>
>
>> Reviewed-by:...