search for: drm_crtc_vblank_get

Displaying 20 results from an estimated 38 matches for "drm_crtc_vblank_get".

2017 Jan 16
4
[PATCH 3/4] drm/amd/display: Switch to using atomic_helper for flip.
...*acrtc = to_amdgpu_crtc(crtc); > - struct drm_atomic_state *state; > - struct drm_plane_state *plane_state; > - struct drm_crtc_state *crtc_state; > - int ret = 0; > - > - state = drm_atomic_state_alloc(plane->dev); > - if (!state) > - return -ENOMEM; > - > - ret = drm_crtc_vblank_get(crtc); The DRM core's atomic page flip helper doesn't get/put vblank. Have you double-checked that removing them isn't a problem ? > - if (ret) > - return ret; > - > - state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); > -retry: > - crtc_state = drm_atom...
2017 Jan 18
1
[PATCH 3/4] drm/amd/display: Switch to using atomic_helper for flip.
...t; - struct drm_plane_state *plane_state; > >> - struct drm_crtc_state *crtc_state; > >> - int ret = 0; > >> - > >> - state = drm_atomic_state_alloc(plane->dev); > >> - if (!state) > >> - return -ENOMEM; > >> - > >> - ret = drm_crtc_vblank_get(crtc); > > > > The DRM core's atomic page flip helper doesn't get/put vblank. Have > > you double-checked that removing them isn't a problem ? > > This patch makes the amdgpu DM code use the page_flip_target hook. > drm_mode_page_flip_ioctl calls drm_crtc_vbl...
2020 Jan 15
1
[PATCH v2 02/21] drm: Evaluate struct drm_device.vblank_disable_immediate on each use
...ank_disable_immediate && !dev->driver->get_vblank_timestamp) { - dev->vblank_disable_immediate = false; - DRM_INFO("Setting vblank_disable_immediate to false because " - "get_vblank_timestamp == NULL\n"); - } - return 0; err: @@ -1070,6 +1057,15 @@ int drm_crtc_vblank_get(struct drm_crtc *crtc) } EXPORT_SYMBOL(drm_crtc_vblank_get); +static bool __vblank_disable_immediate(struct drm_device *dev, unsigned int pipe) +{ + if (!dev->vblank_disable_immediate) + return false; + if (!dev->driver->get_vblank_timestamp) + return false; + return true; +} + stat...
2017 Jan 18
0
[PATCH 3/4] drm/amd/display: Switch to using atomic_helper for flip.
...- struct drm_atomic_state *state; >> - struct drm_plane_state *plane_state; >> - struct drm_crtc_state *crtc_state; >> - int ret = 0; >> - >> - state = drm_atomic_state_alloc(plane->dev); >> - if (!state) >> - return -ENOMEM; >> - >> - ret = drm_crtc_vblank_get(crtc); > > The DRM core's atomic page flip helper doesn't get/put vblank. Have you > double-checked that removing them isn't a problem ? This patch makes the amdgpu DM code use the page_flip_target hook. drm_mode_page_flip_ioctl calls drm_crtc_vblank_get before the page_flip...
2020 Jan 15
0
[Intel-gfx] [PATCH v2 02/21] drm: Evaluate struct drm_device.vblank_disable_immediate on each use
..."get_vblank_timestamp == NULL\n"); > - } Which drivers are so broken they set vblank_disable_immediate to true without having the vfunc specified? IMO this code should just go away (or converted to a WARN). > - > return 0; > > err: > @@ -1070,6 +1057,15 @@ int drm_crtc_vblank_get(struct drm_crtc *crtc) > } > EXPORT_SYMBOL(drm_crtc_vblank_get); > > +static bool __vblank_disable_immediate(struct drm_device *dev, unsigned int pipe) > +{ > + if (!dev->vblank_disable_immediate) > + return false; > + if (!dev->driver->get_vblank_timestamp) &g...
2017 Jul 12
2
[PATCH 15/16] drm/nouveau: Convert nouveau to use new iterator macros
...crtc->name, @@ -4018,14 +4018,14 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) } } - for_each_crtc_in_state(state, crtc, crtc_state, i) { - if (crtc->state->event) + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { + if (new_crtc_state->event) drm_crtc_vblank_get(crtc); } /* Update plane(s). */ - for_each_plane_in_state(state, plane, plane_state, i) { - struct nv50_wndw_atom *asyw = nv50_wndw_atom(plane->state); + for_each_new_plane_in_state(state, plane, new_plane_state, i) { + struct nv50_wndw_atom *asyw = nv50_wndw_atom(new_plane_state); st...
2016 Jun 07
0
[PATCH 01/10] drm/nouveau: replace legacy vblank helpers
...;index, - fb->bits_per_pixel, fb->pitches[0], crtc->x, crtc->y, + { { }, event, crtc, fb->bits_per_pixel, fb->pitches[0], new_bo->bo.offset }; /* Keep vblanks on during flip, for the target crtc of this flip */ - drm_vblank_get(dev, nouveau_crtc(crtc)->index); + drm_crtc_vblank_get(crtc); /* Emit a page flip */ if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { @@ -810,7 +809,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, return 0; fail_unreserve: - drm_vblank_put(dev, nouveau_crtc(crtc)->index); + drm_crtc_vblank_put...
2017 Jan 16
0
[PATCH 3/4] drm/amd/display: Switch to using atomic_helper for flip.
...e *plane = crtc->primary; - struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); - struct drm_atomic_state *state; - struct drm_plane_state *plane_state; - struct drm_crtc_state *crtc_state; - int ret = 0; - - state = drm_atomic_state_alloc(plane->dev); - if (!state) - return -ENOMEM; - - ret = drm_crtc_vblank_get(crtc); - if (ret) - return ret; - - state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); -retry: - crtc_state = drm_atomic_get_crtc_state(state, crtc); - if (IS_ERR(crtc_state)) { - ret = PTR_ERR(crtc_state); - goto fail; - } - crtc_state->event = event; - - plane_state = drm_atomic_...
2017 Jul 19
1
[PATCH v2 6/7] drm/nouveau: Convert nouveau to use new iterator macros, v2.
...crtc->name, @@ -4019,14 +4019,14 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) } } - for_each_crtc_in_state(state, crtc, crtc_state, i) { - if (crtc->state->event) + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { + if (new_crtc_state->event) drm_crtc_vblank_get(crtc); } /* Update plane(s). */ - for_each_plane_in_state(state, plane, plane_state, i) { - struct nv50_wndw_atom *asyw = nv50_wndw_atom(plane->state); + for_each_new_plane_in_state(state, plane, new_plane_state, i) { + struct nv50_wndw_atom *asyw = nv50_wndw_atom(new_plane_state); st...
2017 Jan 29
0
[v3 PATCH 3/3] drm/amd/display: Switch to using atomic_helper for flip.
...e *plane = crtc->primary; - struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); - struct drm_atomic_state *state; - struct drm_plane_state *plane_state; - struct drm_crtc_state *crtc_state; - int ret = 0; - - state = drm_atomic_state_alloc(plane->dev); - if (!state) - return -ENOMEM; - - ret = drm_crtc_vblank_get(crtc); - if (ret) - return ret; - - state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); -retry: - crtc_state = drm_atomic_get_crtc_state(state, crtc); - if (IS_ERR(crtc_state)) { - ret = PTR_ERR(crtc_state); - goto fail; - } - crtc_state->event = event; - - plane_state = drm_atomic_...
2017 Jul 13
0
[Intel-gfx] [PATCH 15/16] drm/nouveau: Convert nouveau to use new iterator macros
...nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) > } > } > > - for_each_crtc_in_state(state, crtc, crtc_state, i) { > - if (crtc->state->event) > + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { > + if (new_crtc_state->event) > drm_crtc_vblank_get(crtc); > } > > /* Update plane(s). */ > - for_each_plane_in_state(state, plane, plane_state, i) { > - struct nv50_wndw_atom *asyw = nv50_wndw_atom(plane->state); > + for_each_new_plane_in_state(state, plane, new_plane_state, i) { > + struct nv50_wndw_atom *asyw = nv5...
2017 Jan 30
1
[v3 PATCH 3/3] drm/amd/display: Switch to using atomic_helper for flip.
...*acrtc = to_amdgpu_crtc(crtc); > - struct drm_atomic_state *state; > - struct drm_plane_state *plane_state; > - struct drm_crtc_state *crtc_state; > - int ret = 0; > - > - state = drm_atomic_state_alloc(plane->dev); > - if (!state) > - return -ENOMEM; > - > - ret = drm_crtc_vblank_get(crtc); > - if (ret) > - return ret; > - > - state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); > -retry: > - crtc_state = drm_atomic_get_crtc_state(state, crtc); > - if (IS_ERR(crtc_state)) { > - ret = PTR_ERR(crtc_state); > - goto fail; > - } > - crtc...
2020 Jun 24
0
[RFC v7 03/11] drm/vblank: Add vblank works
...evice *dev, unsigned int pipe) return ret; } -static int drm_vblank_get(struct drm_device *dev, unsigned int pipe) +int drm_vblank_get(struct drm_device *dev, unsigned int pipe) { struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; unsigned long irqflags; @@ -1178,7 +1186,7 @@ int drm_crtc_vblank_get(struct drm_crtc *crtc) } EXPORT_SYMBOL(drm_crtc_vblank_get); -static void drm_vblank_put(struct drm_device *dev, unsigned int pipe) +void drm_vblank_put(struct drm_device *dev, unsigned int pipe) { struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; @@ -1281,13 +1289,16 @@ void drm...
2017 Jan 29
7
[v3 PATCH 0/3] Allow ASYNC flip with atomic helpers.
This series is a folow-up on https://patchwork.kernel.org/patch/9501787/ The first patch makes changes to atomic helpers to allow for drives with ASYNC flip support to use them. Patch 2 is to use this in AMDGPU/DC. Patch 3 is possible cleanup in nouveau/kms who seems to have to duplicate the helper as we did to support ASYNC flips. v2: Resend drm/atomic: Save flip flags in drm_plane_state
2019 Aug 07
3
[PATCH v2 0/2] drm/nouveau: CRTC Runtime PM ref tracking fixes
Just some runtime PM fixes for some much less noticeable runtime PM ref tracking issues that I got reminded of when fixing some unrelated issues with nouveau. Changes since v1: * Don't fix CRTC RPM code in dispnv04, because it's not actually doing anything in the first place. Just get rid of it. - imirkin Lyude Paul (2): drm/nouveau/dispnv04: Remove runtime PM drm/nouveau/dispnv50:
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
From: Gustavo Padovan <gustavo.padovan at collabora.co.uk> Replace the legacy drm_send_vblank_event() with the new helper function. v2: add crtc to nouveau_page_flip_state (comment from Mario Kleiner) Cc: Mario Kleiner <mario.kleiner.de at gmail.com> Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk> --- drivers/gpu/drm/nouveau/nouveau_display.c | 19
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
From: Gustavo Padovan <gustavo.padovan at collabora.co.uk> Replace the legacy drm_send_vblank_event() with the new helper function. v2: add crtc to nouveau_page_flip_state (comment from Mario Kleiner) Cc: Mario Kleiner <mario.kleiner.de at gmail.com> Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk> --- drivers/gpu/drm/nouveau/nouveau_display.c | 19
2016 Jun 06
4
[PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
From: Gustavo Padovan <gustavo.padovan at collabora.co.uk> Replace the legacy drm_send_vblank_event() with the new helper function. v2: add crtc to nouveau_page_flip_state (comment from Mario Kleiner) Cc: Mario Kleiner <mario.kleiner.de at gmail.com> Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk> --- drivers/gpu/drm/nouveau/nouveau_display.c | 19
2017 Jan 16
12
[PATCH 0/4] Allow ASYNC flip with atomic helpers.
This series is a folow-up on https://patchwork.kernel.org/patch/9501787/ The first patch makes changes to atomic helpers to allow for drives with ASYNC flip support to use them. Patches 2 and 3 are to use this in AMDGPU/DC and patch 4 is possible cleanup in nouveau/kms who seems to have the duplicate the helper as we did to support ASYNC flips. Andrey Grodzovsky (4): drm/atomic: Save flip
2019 Aug 07
3
[PATCH 0/2] drm/nouveau: CRTC Runtime PM ref tracking fixes
Just some runtime PM fixes for some much less noticeable runtime PM ref tracking issues that I got reminded of when fixing some unrelated issues with nouveau. Lyude Paul (2): drm/nouveau/dispnv04: Grab/put runtime PM refs on DPMS on/off drm/nouveau/dispnv50: Fix runtime PM ref tracking for non-blocking modesets drivers/gpu/drm/nouveau/dispnv04/crtc.c | 18 +++---------