search for: cleanup_fb

Displaying 10 results from an estimated 10 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:
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...
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...