search for: cleanup_fb

Displaying 16 results from an estimated 16 matches for "cleanup_fb".

Did you mean: cleanup_fn
2019 Oct 22
2
[PATCH] drm/simple-kms: Standardize arguments for callbacks
...much belongs to this category too, since there's mode_valid hooks also on other objects. But simple pipe helper condenses that down to one mode_valid hook (we could also put the mode_valid onto encoder, wouldn't change anything). > In the latter category are mode_valid(), prepare_fb(), cleanup_fb(), > enable_vblank(), and disable_vblank(). IMHO those functions should > receive a pointer to the original structure as their first argument. > This type provides the context in which the operations make sense. (Even > their documentation already refers to the original structure.) Now...
2019 Oct 22
2
[PATCH] drm/simple-kms: Standardize arguments for callbacks
...much belongs to this category too, since there's mode_valid hooks also on other objects. But simple pipe helper condenses that down to one mode_valid hook (we could also put the mode_valid onto encoder, wouldn't change anything). > In the latter category are mode_valid(), prepare_fb(), cleanup_fb(), > enable_vblank(), and disable_vblank(). IMHO those functions should > receive a pointer to the original structure as their first argument. > This type provides the context in which the operations make sense. (Even > their documentation already refers to the original structure.) Now...
2019 Apr 10
2
[PATCH] drm/bochs: use simple display pipe
...+} + +static int bochs_pipe_prepare_fb(struct drm_simple_display_pipe *pipe, + struct drm_plane_state *new_state) { struct bochs_bo *bo; @@ -101,8 +80,8 @@ static int bochs_plane_prepare_fb(struct drm_plane *plane, return bochs_bo_pin(bo, TTM_PL_FLAG_VRAM); } -static void bochs_plane_cleanup_fb(struct drm_plane *plane, - struct drm_plane_state *old_state) +static void bochs_pipe_cleanup_fb(struct drm_simple_display_pipe *pipe, + struct drm_plane_state *old_state) { struct bochs_bo *bo; @@ -112,73 +91,13 @@ static void bochs_plane_cleanup_fb(struct drm_plane *plane, bochs...
2019 Oct 23
0
[PATCH] drm/simple-kms: Standardize arguments for callbacks
...tegory too, since there's > mode_valid hooks also on other objects. But simple pipe helper > condenses that down to one mode_valid hook (we could also put the > mode_valid onto encoder, wouldn't change anything). > >> In the latter category are mode_valid(), prepare_fb(), cleanup_fb(), >> enable_vblank(), and disable_vblank(). IMHO those functions should >> receive a pointer to the original structure as their first argument. >> This type provides the context in which the operations make sense. (Even >> their documentation already refers to the original...
2019 Oct 22
4
[PATCH] drm/simple-kms: Standardize arguments for callbacks
Passing the wrong type feels icky, everywhere else we use the pipe as the first parameter. Spotted while discussing patches with Thomas Zimmermann. Cc: Thomas Zimmermann <tzimmermann at suse.de> Cc: Noralf Tr?nnes <noralf at tronnes.org> Cc: Gerd Hoffmann <kraxel at redhat.com> Cc: Eric Anholt <eric at anholt.net> Cc: Emil Velikov <emil.velikov at collabora.com> Cc:
2019 Oct 22
4
[PATCH] drm/simple-kms: Standardize arguments for callbacks
Passing the wrong type feels icky, everywhere else we use the pipe as the first parameter. Spotted while discussing patches with Thomas Zimmermann. Cc: Thomas Zimmermann <tzimmermann at suse.de> Cc: Noralf Tr?nnes <noralf at tronnes.org> Cc: Gerd Hoffmann <kraxel at redhat.com> Cc: Eric Anholt <eric at anholt.net> Cc: Emil Velikov <emil.velikov at collabora.com> Cc:
2024 Sep 13
1
[PATCH v3 2/2] drm/nouveau: Add drm_panic support for nv50+
...onst struct drm_plane_helper_funcs nv50_wndw_helper = { .prepare_fb = nv50_wndw_prepare_fb, @@ -584,6 +708,14 @@ nv50_wndw_helper = { .atomic_check = nv50_wndw_atomic_check, }; +static const struct drm_plane_helper_funcs +nv50_wndw_primary_helper = { + .prepare_fb = nv50_wndw_prepare_fb, + .cleanup_fb = nv50_wndw_cleanup_fb, + .atomic_check = nv50_wndw_atomic_check, + .get_scanout_buffer = nv50_wndw_get_scanout_buffer, +}; + static void nv50_wndw_atomic_destroy_state(struct drm_plane *plane, struct drm_plane_state *state) @@ -732,7 +864,10 @@ nv50_wndw_new_(const struct nv50_wndw_fu...
2024 Oct 18
2
[PATCH v3 2/2] drm/nouveau: Add drm_panic support for nv50+
..._helper = { > .prepare_fb = nv50_wndw_prepare_fb, > @@ -584,6 +708,14 @@ nv50_wndw_helper = { > .atomic_check = nv50_wndw_atomic_check, > }; > > +static const struct drm_plane_helper_funcs > +nv50_wndw_primary_helper = { > + .prepare_fb = nv50_wndw_prepare_fb, > + .cleanup_fb = nv50_wndw_cleanup_fb, > + .atomic_check = nv50_wndw_atomic_check, > + .get_scanout_buffer = nv50_wndw_get_scanout_buffer, > +}; > + > static void > nv50_wndw_atomic_destroy_state(struct drm_plane *plane, > struct drm_plane_state *state) > @@ -732,7 +864,10 @@...
2018 Dec 19
0
[PATCH 05/14] drm/bochs: atomic: switch planes to atomic, wire up helpers.
...+static int bochs_plane_prepare_fb(struct drm_plane *plane, + struct drm_plane_state *new_state) +{ + struct bochs_bo *bo; + + if (!new_state->fb) + return 0; + bo = gem_to_bochs_bo(new_state->fb->obj[0]); + return bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL); +} + +static void bochs_plane_cleanup_fb(struct drm_plane *plane, + struct drm_plane_state *old_state) +{ + struct bochs_bo *bo; + + if (!old_state->fb) + return; + bo = gem_to_bochs_bo(old_state->fb->obj[0]); + bochs_bo_unpin(bo); +} + +static const struct drm_plane_helper_funcs bochs_plane_helper_funcs = { + .atomic_upda...
2019 Oct 22
0
[PATCH] drm/simple-kms: Standardize arguments for callbacks
...simple KMS, and functions that are merely forwarded from another structure (crtc, plane, etc). In the former category are enable(), disable(), check(), and update(). Those should probably receive a simple display pipe as their first argument. In the latter category are mode_valid(), prepare_fb(), cleanup_fb(), enable_vblank(), and disable_vblank(). IMHO those functions should receive a pointer to the original structure as their first argument. This type provides the context in which the operations make sense. (Even their documentation already refers to the original structure.) I admit that not all ar...
2024 Oct 21
1
[PATCH v3 2/2] drm/nouveau: Add drm_panic support for nv50+
...50_wndw_prepare_fb, >> @@ -584,6 +708,14 @@ nv50_wndw_helper = { >> .atomic_check = nv50_wndw_atomic_check, >> }; >> >> +static const struct drm_plane_helper_funcs >> +nv50_wndw_primary_helper = { >> + .prepare_fb = nv50_wndw_prepare_fb, >> + .cleanup_fb = nv50_wndw_cleanup_fb, >> + .atomic_check = nv50_wndw_atomic_check, >> + .get_scanout_buffer = nv50_wndw_get_scanout_buffer, >> +}; >> + >> static void >> nv50_wndw_atomic_destroy_state(struct drm_plane *plane, >> struct drm_plane_state *st...
2024 Sep 06
3
[PATCH v2 0/3] drm/nouveau: Add drm_panic support for nv50+
This series adds basic drm_panic support for nouveau. Patches 1-2 Add missing bits in drm_panic (ABGR2101010, private data for set_pixel()) Patch 3 registers nouveau to drm_panic, and handle tiling. I've tested on a GTX1650, while running Gnome/Wayland desktop. It should work on other nv50+ cards, but I didn't test them. To test it, you need to build your kernel with CONFIG_DRM_PANIC=y,
2024 Sep 13
3
[PATCH v3 0/2] drm/nouveau: Add drm_panic support for nv50+
This series adds basic drm_panic support for nouveau. Patches 1 Add ABGR2101010 support in drm_panic. Patch 2 registers nouveau to drm_panic, and handle tiling. I've tested on a GTX1650 (Turing) and GF 8800 GT (Tesla), while running Gnome/Wayland desktop, and in VT. It should work on other nv50+ cards, but I didn't test them. To test it, you need to build your kernel with
2024 Oct 22
4
[PATCH v4 0/3] drm/nouveau: Add drm_panic support for nv50+
This series adds basic drm_panic support for nouveau. I've tested on GTX1650 (Turing), GeForce GT 1030 (Pascal) and Geforce 8800 GTS (Tesla), running Gnome/Wayland desktop, and in VT. It should work on other nv50+ cards, but I didn't test them. To test it, you need to build your kernel with CONFIG_DRM_PANIC=y, and run: echo c > /proc/sysrq-trigger or you can enable
2016 Dec 12
6
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
..._state->fb); + bo = gem_to_virtio_gpu_obj(vgfb->obj); + if (bo && bo->dumb && (plane->state->fb != new_state->fb)) { + vgfb->fence = virtio_gpu_fence_alloc(vgdev); + if (!vgfb->fence) + return -ENOMEM; + } + + return 0; +} + +static void virtio_gpu_cursor_cleanup_fb(struct drm_plane *plane, + struct drm_plane_state *old_state) +{ + struct virtio_gpu_framebuffer *vgfb; + + if (!plane->state->fb) + return; + + vgfb = to_virtio_gpu_framebuffer(plane->state->fb); + if (vgfb->fence) + dma_fence_put(&vgfb->fence->f); +} + static void...
2016 Dec 12
6
[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()
..._state->fb); + bo = gem_to_virtio_gpu_obj(vgfb->obj); + if (bo && bo->dumb && (plane->state->fb != new_state->fb)) { + vgfb->fence = virtio_gpu_fence_alloc(vgdev); + if (!vgfb->fence) + return -ENOMEM; + } + + return 0; +} + +static void virtio_gpu_cursor_cleanup_fb(struct drm_plane *plane, + struct drm_plane_state *old_state) +{ + struct virtio_gpu_framebuffer *vgfb; + + if (!plane->state->fb) + return; + + vgfb = to_virtio_gpu_framebuffer(plane->state->fb); + if (vgfb->fence) + dma_fence_put(&vgfb->fence->f); +} + static void...