search for: for_each_plane_in_state

Displaying 20 results from an estimated 22 matches for "for_each_plane_in_state".

2017 Jul 12
2
[PATCH 15/16] drm/nouveau: Convert nouveau to use new iterator macros
...struct nv50_head_atom *asyh = nv50_head_atom(new_crtc_state); struct nv50_head *head = nv50_head(crtc); NV_ATOMIC(drm, "%s: clr %04x (set %04x)\n", crtc->name, @@ -3939,8 +3939,8 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) } /* Disable 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); struct nv50_wndw *wndw = nv50_wndw(plane); NV_ATOMIC(drm, &qu...
2017 Jul 19
1
[PATCH v2 6/7] drm/nouveau: Convert nouveau to use new iterator macros, v2.
...struct nv50_head_atom *asyh = nv50_head_atom(new_crtc_state); struct nv50_head *head = nv50_head(crtc); NV_ATOMIC(drm, "%s: clr %04x (set %04x)\n", crtc->name, @@ -3940,8 +3940,8 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) } /* Disable 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); struct nv50_wndw *wndw = nv50_wndw(plane); NV_ATOMIC(drm, &qu...
2017 Jul 13
0
[Intel-gfx] [PATCH 15/16] drm/nouveau: Convert nouveau to use new iterator macros
...d_atom(new_crtc_state); > struct nv50_head *head = nv50_head(crtc); > > NV_ATOMIC(drm, "%s: clr %04x (set %04x)\n", crtc->name, > @@ -3939,8 +3939,8 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state) > } > > /* Disable 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); > struct nv50_wndw *wndw = nv50_wndw(plane); &gt...
2017 Jul 19
1
[PATCH 01/12] drm/nouveau: Fix error handling in nv50_disp_atomic_commit
...4 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -4120,7 +4120,7 @@ nv50_disp_atomic_commit(struct drm_device *dev, if (!nonblock) { ret = drm_atomic_helper_wait_for_fences(dev, state, true); if (ret) - goto done; + goto err_cleanup; } for_each_plane_in_state(state, plane, plane_state, i) { @@ -4148,7 +4148,7 @@ nv50_disp_atomic_commit(struct drm_device *dev, if (crtc->state->enable) { if (!drm->have_disp_power_ref) { drm->have_disp_power_ref = true; - return ret; + return 0; } active = true; break; @@ -4160,6 +...
2017 Jul 11
1
[PATCH v2 01/12] drm/nouveau: Fix error handling in nv50_disp_atomic_commit
...4 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -4119,7 +4119,7 @@ nv50_disp_atomic_commit(struct drm_device *dev, if (!nonblock) { ret = drm_atomic_helper_wait_for_fences(dev, state, true); if (ret) - goto done; + goto err_cleanup; } for_each_plane_in_state(state, plane, plane_state, i) { @@ -4147,7 +4147,7 @@ nv50_disp_atomic_commit(struct drm_device *dev, if (crtc->state->enable) { if (!drm->have_disp_power_ref) { drm->have_disp_power_ref = true; - return ret; + return 0; } active = true; break; @@ -4158,7 +...
2017 Feb 21
2
[PATCH 1/3] drm/atomic: Make disable_all helper fully disable the crtc.
...; + + ret = drm_atomic_add_affected_connectors(state, crtc); + if (ret < 0) + goto free; } - err = drm_atomic_commit(state); + for_each_connector_in_state(state, conn, conn_state, i) { + ret = drm_atomic_set_crtc_for_connector(conn_state, NULL); + if (ret < 0) + goto free; + } + + for_each_plane_in_state(state, plane, plane_state, i) { + ret = drm_atomic_set_crtc_for_plane(plane_state, NULL); + if (ret < 0) + goto free; + + drm_atomic_set_fb_for_plane(plane_state, NULL); + } + + ret = drm_atomic_commit(state); free: - drm_connector_list_iter_put(&conn_iter); drm_atomic_state_put(stat...
2017 Jul 11
0
[PATCH v2 03/12] drm/nouveau: Handle drm_atomic_helper_swap_state failure
...0f..3bfea54ffd7c 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -4122,6 +4122,10 @@ nv50_disp_atomic_commit(struct drm_device *dev, goto err_cleanup; } + ret = drm_atomic_helper_swap_state(state, true); + if (ret) + goto err_cleanup; + for_each_plane_in_state(state, plane, plane_state, i) { struct nv50_wndw_atom *asyw = nv50_wndw_atom(plane_state); struct nv50_wndw *wndw = nv50_wndw(plane); @@ -4135,7 +4139,6 @@ nv50_disp_atomic_commit(struct drm_device *dev, } } - drm_atomic_helper_swap_state(state, true); drm_atomic_state_get(state);...
2017 Sep 08
0
[PATCH 4.13 39/47] drm/nouveau: Fix error handling in nv50_disp_atomic_commit
...ions(-) --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -4134,7 +4134,7 @@ nv50_disp_atomic_commit(struct drm_devic if (!nonblock) { ret = drm_atomic_helper_wait_for_fences(dev, state, true); if (ret) - goto done; + goto err_cleanup; } for_each_plane_in_state(state, plane, plane_state, i) { @@ -4162,7 +4162,7 @@ nv50_disp_atomic_commit(struct drm_devic if (crtc->state->enable) { if (!drm->have_disp_power_ref) { drm->have_disp_power_ref = true; - return ret; + return 0; } active = true; break; @@ -4174,6 +4174,9...
2017 Sep 08
0
[PATCH 4.12 35/43] drm/nouveau: Fix error handling in nv50_disp_atomic_commit
...ions(-) --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -4091,7 +4091,7 @@ nv50_disp_atomic_commit(struct drm_devic if (!nonblock) { ret = drm_atomic_helper_wait_for_fences(dev, state, true); if (ret) - goto done; + goto err_cleanup; } for_each_plane_in_state(state, plane, plane_state, i) { @@ -4119,7 +4119,7 @@ nv50_disp_atomic_commit(struct drm_devic if (crtc->state->enable) { if (!drm->have_disp_power_ref) { drm->have_disp_power_ref = true; - return ret; + return 0; } active = true; break; @@ -4131,6 +4131,9...
2017 Jan 16
0
[PATCH 3/4] drm/amd/display: Switch to using atomic_helper for flip.
...{ acrtc_new = to_amdgpu_crtc(new_state->crtc); - if (acrtc_new->flip_flags & DRM_MODE_PAGE_FLIP_ASYNC) + if (new_state->pflip_flags & DRM_MODE_PAGE_FLIP_ASYNC) page_flip_required = true; } return page_flip_required; @@ -2760,7 +2683,6 @@ int amdgpu_dm_atomic_commit( for_each_plane_in_state(state, plane, old_plane_state, i) { struct drm_plane_state *plane_state = plane->state; struct drm_crtc *crtc = plane_state->crtc; - struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); struct drm_framebuffer *fb = plane_state->fb; if (!fb || !crtc || !crtc->state->planes...
2017 Jan 09
0
[PATCH 3/3] drm/atomic: Make disable_all helper fully disable the crtc.
...; + + ret = drm_atomic_add_affected_connectors(state, crtc); + if (ret < 0) + goto free; } - err = drm_atomic_commit(state); + for_each_connector_in_state(state, conn, conn_state, i) { + ret = drm_atomic_set_crtc_for_connector(conn_state, NULL); + if (ret < 0) + goto free; + } + + for_each_plane_in_state(state, plane, plane_state, i) { + ret = drm_atomic_set_crtc_for_plane(plane_state, NULL); + if (ret < 0) + goto free; + + drm_atomic_set_fb_for_plane(plane_state, NULL); + } + + ret = drm_atomic_commit(state); free: - drm_connector_list_iter_put(&conn_iter); drm_atomic_state_put(stat...
2017 Jan 16
4
[PATCH 3/4] drm/amd/display: Switch to using atomic_helper for flip.
...w_state->crtc); > - if (acrtc_new->flip_flags & DRM_MODE_PAGE_FLIP_ASYNC) > + if (new_state->pflip_flags & DRM_MODE_PAGE_FLIP_ASYNC) > page_flip_required = true; > } > return page_flip_required; > @@ -2760,7 +2683,6 @@ int amdgpu_dm_atomic_commit( > for_each_plane_in_state(state, plane, old_plane_state, i) { > struct drm_plane_state *plane_state = plane->state; > struct drm_crtc *crtc = plane_state->crtc; > - struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); > struct drm_framebuffer *fb = plane_state->fb; > > if (!fb || !crtc...
2017 Jan 29
0
[v3 PATCH 3/3] drm/amd/display: Switch to using atomic_helper for flip.
...lane_state, true) || + if (!page_flip_needed( + plane_state, old_plane_state, true, crtc->state->pflip_flags) + || action == DM_COMMIT_ACTION_DPMS_ON || action == DM_COMMIT_ACTION_SET) { list_for_each_entry(connector, @@ -2760,21 +2686,22 @@ int amdgpu_dm_atomic_commit( for_each_plane_in_state(state, plane, old_plane_state, i) { struct drm_plane_state *plane_state = plane->state; struct drm_crtc *crtc = plane_state->crtc; - struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); struct drm_framebuffer *fb = plane_state->fb; + uint32_t pflip_flags; if (!fb || !crtc || !...
2017 Feb 23
0
[Intel-gfx] [PATCH 1/3] drm/atomic: Make disable_all helper fully disable the crtc.
...; > + if (ret < 0) > + goto free; > } > > - err = drm_atomic_commit(state); > + for_each_connector_in_state(state, conn, conn_state, i) { > + ret = drm_atomic_set_crtc_for_connector(conn_state, NULL); > + if (ret < 0) > + goto free; > + } > + > + for_each_plane_in_state(state, plane, plane_state, i) { > + ret = drm_atomic_set_crtc_for_plane(plane_state, NULL); > + if (ret < 0) > + goto free; > + > + drm_atomic_set_fb_for_plane(plane_state, NULL); > + } > + > + ret = drm_atomic_commit(state); > free: > - drm_connector_list_ite...
2017 Jan 30
1
[v3 PATCH 3/3] drm/amd/display: Switch to using atomic_helper for flip.
..._flip_needed(plane_state, old_plane_state, true, crtc->state->pflip_flags) || action == DM_COMMIT_ACTION_DPMS_ON || action == DM_COMMIT_ACTION_SET) { > list_for_each_entry(connector, > @@ -2760,21 +2686,22 @@ int amdgpu_dm_atomic_commit( > for_each_plane_in_state(state, plane, old_plane_state, i) { > struct drm_plane_state *plane_state = plane->state; > struct drm_crtc *crtc = plane_state->crtc; > - struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); > struct drm_framebuffer *fb = plane_state->fb; > + uint32_t pflip_flags; &...
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
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
2017 Jun 28
5
[PATCH 1/2] drm/atomic: Change drm_atomic_helper_swap_state to return an error.
...lay.c @@ -4119,9 +4119,13 @@ nv50_disp_atomic_commit(struct drm_device *dev, if (!nonblock) { ret = drm_atomic_helper_wait_for_fences(dev, state, true); if (ret) - goto done; + goto err_cleanup; } + ret = drm_atomic_helper_swap_state(state, true); + if (ret) + goto err_cleanup; + for_each_plane_in_state(state, plane, plane_state, i) { struct nv50_wndw_atom *asyw = nv50_wndw_atom(plane_state); struct nv50_wndw *wndw = nv50_wndw(plane); @@ -4135,7 +4139,6 @@ nv50_disp_atomic_commit(struct drm_device *dev, } } - drm_atomic_helper_swap_state(state, true); drm_atomic_state_get(state);...
2017 Jan 17
4
[PATCH v2 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
2017 Jun 30
0
[Intel-gfx] [PATCH 1/2] drm/atomic: Change drm_atomic_helper_swap_state to return an error.
...drm_device *dev, > if (!nonblock) { > ret = drm_atomic_helper_wait_for_fences(dev, state, true); > if (ret) > - goto done; > + goto err_cleanup; > } > > + ret = drm_atomic_helper_swap_state(state, true); > + if (ret) > + goto err_cleanup; > + > for_each_plane_in_state(state, plane, plane_state, i) { > struct nv50_wndw_atom *asyw = nv50_wndw_atom(plane_state); > struct nv50_wndw *wndw = nv50_wndw(plane); > @@ -4135,7 +4139,6 @@ nv50_disp_atomic_commit(struct drm_device *dev, > } > } > > - drm_atomic_helper_swap_state(state, true)...