search for: drm_fb_helper_generic_probe

Displaying 20 results from an estimated 34 matches for "drm_fb_helper_generic_probe".

2019 Jul 07
2
[PATCH v2 3/6] drm/fb-helper: Instanciate shadow FB if configured in device's mode_config
...struct drm_framebuffer *fb = fb_helper->fb; > + > + return dev->mode_config.prefer_shadow_fbdev | > + dev->mode_config.prefer_shadow | Use logical OR here > + !!fb->funcs->dirty; and you can drop the the double NOT here. > +} > + > /** > * drm_fb_helper_generic_probe - Generic fbdev emulation probe helper > * @fb_helper: fbdev helper structure > @@ -2213,7 +2222,7 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, > > drm_fb_helper_fill_info(fbi, fb_helper, sizes); > > - if (fb->funcs->dirty) { > + if (drm_fbd...
2019 Jul 07
2
[PATCH v2 3/6] drm/fb-helper: Instanciate shadow FB if configured in device's mode_config
...struct drm_framebuffer *fb = fb_helper->fb; > + > + return dev->mode_config.prefer_shadow_fbdev | > + dev->mode_config.prefer_shadow | Use logical OR here > + !!fb->funcs->dirty; and you can drop the the double NOT here. > +} > + > /** > * drm_fb_helper_generic_probe - Generic fbdev emulation probe helper > * @fb_helper: fbdev helper structure > @@ -2213,7 +2222,7 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, > > drm_fb_helper_fill_info(fbi, fb_helper, sizes); > > - if (fb->funcs->dirty) { > + if (drm_fbd...
2019 Jul 05
0
[PATCH v2 2/6] drm/fb-helper: Map DRM client buffer only when required
...r); + if (IS_ERR(vaddr)) + return; drm_fb_helper_dirty_blit_real(helper, &clip_copy); + } helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, &clip_copy, 1); + + if (helper->buffer) + drm_client_buffer_vunmap(helper->buffer); } } @@ -2178,6 +2187,7 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, struct drm_framebuffer *fb; struct fb_info *fbi; u32 format; + void *vaddr; DRM_DEBUG_KMS("surface width(%d), height(%d) and bpp(%d)\n", sizes->surface_width, sizes->surface_height, @@ -2200,13 +2210,7 @@ int drm_fb_helper_generic_...
2020 Oct 22
2
[PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map
...- vaddr = drm_client_buffer_vmap(helper->buffer); > - if (IS_ERR(vaddr)) > + ret = drm_client_buffer_vmap(helper->buffer, &map); > + if (ret) > return; > drm_fb_helper_dirty_blit_real(helper, &clip_copy); > } > @@ -2060,7 +2061,8 @@ static int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, > struct drm_framebuffer *fb; > struct fb_info *fbi; > u32 format; > - void *vaddr; > + struct dma_buf_map map; > + int ret; > > drm_dbg_kms(dev, "surface width(%d), height(%d) and bpp(%d)\n", > sizes->surface...
2019 Jul 05
0
[PATCH v2 3/6] drm/fb-helper: Instanciate shadow FB if configured in device's mode_config
...m_fbdev_use_shadow_fb(struct drm_fb_helper *fb_helper) +{ + struct drm_device *dev = fb_helper->dev; + struct drm_framebuffer *fb = fb_helper->fb; + + return dev->mode_config.prefer_shadow_fbdev | + dev->mode_config.prefer_shadow | + !!fb->funcs->dirty; +} + /** * drm_fb_helper_generic_probe - Generic fbdev emulation probe helper * @fb_helper: fbdev helper structure @@ -2213,7 +2222,7 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, drm_fb_helper_fill_info(fbi, fb_helper, sizes); - if (fb->funcs->dirty) { + if (drm_fbdev_use_shadow_fb(fb_helper)) { s...
2019 Jul 04
2
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
...w buffer instead? Fbdev emulation is special wrt framebuffer setup and there's no way to distinguish a regular FB from the fbdev's FB. I've been trying drm_fbdev_generic_shadow_setup(), but ended up duplicating functionality. The problem was that we cannot get state-flag arguments into drm_fb_helper_generic_probe(). There already is struct mode_config.prefer_shadow. It signals shadow FB rendering to userspace. The easiest solution is to add prefer_shadow_fbdev as well. If either flag is true, fbdev emulation would enable shadow buffering. I'm not sure if we should check for the dirty() callback at all...
2019 Jul 04
2
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
...w buffer instead? Fbdev emulation is special wrt framebuffer setup and there's no way to distinguish a regular FB from the fbdev's FB. I've been trying drm_fbdev_generic_shadow_setup(), but ended up duplicating functionality. The problem was that we cannot get state-flag arguments into drm_fb_helper_generic_probe(). There already is struct mode_config.prefer_shadow. It signals shadow FB rendering to userspace. The easiest solution is to add prefer_shadow_fbdev as well. If either flag is true, fbdev emulation would enable shadow buffering. I'm not sure if we should check for the dirty() callback at all...
2019 Jul 07
0
[PATCH v2 3/6] drm/fb-helper: Instanciate shadow FB if configured in device's mode_config
...> + return dev->mode_config.prefer_shadow_fbdev | >> + dev->mode_config.prefer_shadow | > > Use logical OR here > >> + !!fb->funcs->dirty; > > and you can drop the the double NOT here. > >> +} >> + >> /** >> * drm_fb_helper_generic_probe - Generic fbdev emulation probe helper >> * @fb_helper: fbdev helper structure >> @@ -2213,7 +2222,7 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, >> >> drm_fb_helper_fill_info(fbi, fb_helper, sizes); >> >> - if (fb->funcs->dir...
2020 Sep 29
0
[PATCH v3 5/7] drm/gem: Store client buffer mappings as struct dma_buf_map
...ffer */ if (helper->buffer) { - vaddr = drm_client_buffer_vmap(helper->buffer); - if (IS_ERR(vaddr)) + ret = drm_client_buffer_vmap(helper->buffer, &map); + if (ret) return; drm_fb_helper_dirty_blit_real(helper, &clip_copy); } @@ -2076,7 +2077,8 @@ static int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, struct drm_framebuffer *fb; struct fb_info *fbi; u32 format; - void *vaddr; + struct dma_buf_map map; + int ret; drm_dbg_kms(dev, "surface width(%d), height(%d) and bpp(%d)\n", sizes->surface_width, sizes->surface_height, @@ -2112,11...
2020 Oct 20
0
[PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map
...ffer */ if (helper->buffer) { - vaddr = drm_client_buffer_vmap(helper->buffer); - if (IS_ERR(vaddr)) + ret = drm_client_buffer_vmap(helper->buffer, &map); + if (ret) return; drm_fb_helper_dirty_blit_real(helper, &clip_copy); } @@ -2060,7 +2061,8 @@ static int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, struct drm_framebuffer *fb; struct fb_info *fbi; u32 format; - void *vaddr; + struct dma_buf_map map; + int ret; drm_dbg_kms(dev, "surface width(%d), height(%d) and bpp(%d)\n", sizes->surface_width, sizes->surface_height, @@ -2096,11...
2020 Oct 28
0
[PATCH v6 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map
...ffer */ if (helper->buffer) { - vaddr = drm_client_buffer_vmap(helper->buffer); - if (IS_ERR(vaddr)) + ret = drm_client_buffer_vmap(helper->buffer, &map); + if (ret) return; drm_fb_helper_dirty_blit_real(helper, &clip_copy); } @@ -2060,7 +2061,8 @@ static int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, struct drm_framebuffer *fb; struct fb_info *fbi; u32 format; - void *vaddr; + struct dma_buf_map map; + int ret; drm_dbg_kms(dev, "surface width(%d), height(%d) and bpp(%d)\n", sizes->surface_width, sizes->surface_height, @@ -2096,14...
2019 Jul 04
0
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
...bdev emulation is special wrt framebuffer setup and there's no way to > distinguish a regular FB from the fbdev's FB. I've been trying > drm_fbdev_generic_shadow_setup(), but ended up duplicating > functionality. The problem was that we cannot get state-flag arguments > into drm_fb_helper_generic_probe(). > > There already is struct mode_config.prefer_shadow. It signals shadow FB > rendering to userspace. The easiest solution is to add > prefer_shadow_fbdev as well. If either flag is true, fbdev emulation > would enable shadow buffering. How about something like this: diff --git...
2020 Oct 22
0
[PATCH v5 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map
...er_vmap(helper->buffer); >> - if (IS_ERR(vaddr)) >> + ret = drm_client_buffer_vmap(helper->buffer, &map); >> + if (ret) >> return; >> drm_fb_helper_dirty_blit_real(helper, &clip_copy); >> } >> @@ -2060,7 +2061,8 @@ static int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, >> struct drm_framebuffer *fb; >> struct fb_info *fbi; >> u32 format; >> - void *vaddr; >> + struct dma_buf_map map; >> + int ret; >> >> drm_dbg_kms(dev, "surface width(%d), height(%d) and bpp(%d)\n&quot...
2019 Jul 04
2
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
...s special wrt framebuffer setup and there's no way to >> distinguish a regular FB from the fbdev's FB. I've been trying >> drm_fbdev_generic_shadow_setup(), but ended up duplicating >> functionality. The problem was that we cannot get state-flag arguments >> into drm_fb_helper_generic_probe(). >> >> There already is struct mode_config.prefer_shadow. It signals shadow FB >> rendering to userspace. The easiest solution is to add >> prefer_shadow_fbdev as well. If either flag is true, fbdev emulation >> would enable shadow buffering. > > How about som...
2019 Jul 04
2
[PATCH 0/5] Unmappable DRM client buffers for fbdev emulation
...s special wrt framebuffer setup and there's no way to >> distinguish a regular FB from the fbdev's FB. I've been trying >> drm_fbdev_generic_shadow_setup(), but ended up duplicating >> functionality. The problem was that we cannot get state-flag arguments >> into drm_fb_helper_generic_probe(). >> >> There already is struct mode_config.prefer_shadow. It signals shadow FB >> rendering to userspace. The easiest solution is to add >> prefer_shadow_fbdev as well. If either flag is true, fbdev emulation >> would enable shadow buffering. > > How about som...
2019 Jul 05
11
[PATCH v2 0/6] Unmappable DRM client buffers for fbdev emulation
DRM client buffers are permanently mapped throughout their lifetime. This prevents us from using generic framebuffer emulation for devices with small dedicated video memory, such as ast or mgag200. With fb buffers permanently mapped, such devices often won't have enough space left to display other content (e.g., X11). This patch set introduces unmappable DRM client buffers for framebuffer
2019 Jul 05
11
[PATCH v2 0/6] Unmappable DRM client buffers for fbdev emulation
DRM client buffers are permanently mapped throughout their lifetime. This prevents us from using generic framebuffer emulation for devices with small dedicated video memory, such as ast or mgag200. With fb buffers permanently mapped, such devices often won't have enough space left to display other content (e.g., X11). This patch set introduces unmappable DRM client buffers for framebuffer
2018 Sep 06
0
[PATCH] bochs: convert to drm_fb_helper_fbdev_setup/teardown
...should be able to pull that off. That > > gives you the fb_mmap implementation, but with 100% generic code instead > > of a driver specific hack like Max did. > > Aside from the warning, I have not observed actual issues. This patch > was prepared on top of v4.18.1 but the new drm_fb_helper_generic_probe > helper is in master (future 4.19). I suppose that it can be done as a > future cleanup. Nice work Noralf on reducing duplication! FYI: qemu kms driver patches go through drm-misc-next, so you can also work against that branch. > > I'll leave merging to Gerd. > > Thanks, I...
2020 Apr 06
2
upstream boot error: KASAN: slab-out-of-bounds Write in virtio_gpu_object_create
...umb_create+0x21e/0x360 drivers/gpu/drm/virtio/virtgpu_gem.c:82 > drm_mode_create_dumb+0x27c/0x300 drivers/gpu/drm/drm_dumb_buffers.c:94 > drm_client_buffer_create drivers/gpu/drm/drm_client.c:267 [inline] > drm_client_framebuffer_create+0x1b7/0x770 drivers/gpu/drm/drm_client.c:412 > drm_fb_helper_generic_probe+0x1e4/0x810 drivers/gpu/drm/drm_fb_helper.c:2039 > drm_fb_helper_single_fb_probe drivers/gpu/drm/drm_fb_helper.c:1588 [inline] > __drm_fb_helper_initial_config_and_unlock+0xb56/0x11e0 drivers/gpu/drm/drm_fb_helper.c:1746 > drm_fb_helper_initial_config drivers/gpu/drm/drm_fb_helper.c:184...
2020 Apr 06
2
upstream boot error: KASAN: slab-out-of-bounds Write in virtio_gpu_object_create
...umb_create+0x21e/0x360 drivers/gpu/drm/virtio/virtgpu_gem.c:82 > drm_mode_create_dumb+0x27c/0x300 drivers/gpu/drm/drm_dumb_buffers.c:94 > drm_client_buffer_create drivers/gpu/drm/drm_client.c:267 [inline] > drm_client_framebuffer_create+0x1b7/0x770 drivers/gpu/drm/drm_client.c:412 > drm_fb_helper_generic_probe+0x1e4/0x810 drivers/gpu/drm/drm_fb_helper.c:2039 > drm_fb_helper_single_fb_probe drivers/gpu/drm/drm_fb_helper.c:1588 [inline] > __drm_fb_helper_initial_config_and_unlock+0xb56/0x11e0 drivers/gpu/drm/drm_fb_helper.c:1746 > drm_fb_helper_initial_config drivers/gpu/drm/drm_fb_helper.c:184...