Displaying 20 results from an estimated 37 matches for "drm_for_each_crtc".
2018 Jul 17
1
[PATCH v2 2/3] drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit()
On Thu, Jul 12, 2018 at 01:02:53PM -0400, Lyude Paul wrote:
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -1878,7 +1878,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
> nv50_disp_atomic_commit_tail(state);
>
> drm_for_each_crtc(crtc, dev) {
> - if (crtc->state->enable) {
> + if (crtc->state->active) {
> if (!drm->have_disp_power_ref) {
> drm->have_disp_power_ref = true;
> return 0;
Somewhat tangential comment on this older patch, since you
continue to dig around in the run...
2018 Dec 10
2
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...be used by non-atomic legacy drivers. For an atomic
- * version look at drm_atomic_helper_shutdown().
- *
- * Returns:
- * Zero on success, error code on failure.
- */
-int drm_crtc_force_disable_all(struct drm_device *dev)
-{
- struct drm_crtc *crtc;
- int ret = 0;
-
- drm_modeset_lock_all(dev);
- drm_for_each_crtc(crtc, dev)
- if (crtc->enabled) {
- ret = drm_crtc_force_disable(crtc);
- if (ret)
- goto out;
- }
-out:
- drm_modeset_unlock_all(dev);
- return ret;
-}
-EXPORT_SYMBOL(drm_crtc_force_disable_all);
-
static unsigned int drm_num_crtcs(struct drm_device *dev)
{
unsigned int num = 0;
di...
2018 Dec 10
0
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...mic_helper_shutdown().
> - *
> - * Returns:
> - * Zero on success, error code on failure.
> - */
> -int drm_crtc_force_disable_all(struct drm_device *dev)
> -{
> - struct drm_crtc *crtc;
> - int ret = 0;
> -
> - drm_modeset_lock_all(dev);
> - drm_for_each_crtc(crtc, dev)
> - if (crtc->enabled) {
> - ret = drm_crtc_force_disable(crtc);
> - if (ret)
> - goto out;
> - }
> -out:
> - drm_modeset_unlock_all(dev);
> - retu...
2018 Dec 17
0
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...be used by non-atomic legacy drivers. For an atomic
- * version look at drm_atomic_helper_shutdown().
- *
- * Returns:
- * Zero on success, error code on failure.
- */
-int drm_crtc_force_disable_all(struct drm_device *dev)
-{
- struct drm_crtc *crtc;
- int ret = 0;
-
- drm_modeset_lock_all(dev);
- drm_for_each_crtc(crtc, dev)
- if (crtc->enabled) {
- ret = drm_crtc_force_disable(crtc);
- if (ret)
- goto out;
- }
-out:
- drm_modeset_unlock_all(dev);
- return ret;
-}
-EXPORT_SYMBOL(drm_crtc_force_disable_all);
-
static unsigned int drm_num_crtcs(struct drm_device *dev)
{
unsigned int num = 0;
di...
2018 Jul 12
5
[PATCH v2 0/3] drm/nouveau: Fix runtime PM leaks
This is the latest version of
https://patchwork.freedesktop.org/series/45862/ . One new patch has been
added that also addresses some additional issues I found with
pmops_runtime_idle that would stop nouveau from suspending the GPU when
running under X.
Additionally,
"drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit()" has had
it's CC to stable removed.
Lyude Paul (3):
2017 Feb 21
2
[PATCH 1/3] drm/atomic: Make disable_all helper fully disable the crtc.
...state->acquire_ctx = ctx;
- drm_connector_list_iter_get(dev, &conn_iter);
- drm_for_each_connector_iter(conn, &conn_iter) {
- struct drm_crtc *crtc = conn->state->crtc;
- struct drm_crtc_state *crtc_state;
-
- if (!crtc || conn->dpms != DRM_MODE_DPMS_ON)
- continue;
-
+ drm_for_each_crtc(crtc, dev) {
crtc_state = drm_atomic_get_crtc_state(state, crtc);
if (IS_ERR(crtc_state)) {
- err = PTR_ERR(crtc_state);
+ ret = PTR_ERR(crtc_state);
goto free;
}
crtc_state->active = false;
+
+ ret = drm_atomic_set_mode_prop_for_crtc(crtc_state, NULL);
+ if (ret < 0)...
2018 Dec 11
1
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...Sean Paul <sean at poorly.run>
Sean
> With that fixed:
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
>
> > +{
> > + struct drm_crtc *crtc;
> > + int ret = 0;
> > +
> > + drm_modeset_lock_all(dev);
> > + drm_for_each_crtc(crtc, dev)
> > + if (crtc->enabled) {
> > + struct drm_mode_set set = {
> > + .crtc = crtc,
> > + };
> > +
> > + ret = drm_mode_set_config_internal(&a...
2018 Jul 12
0
[PATCH v2 2/3] drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit()
...nv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index d9da69c83ae7..9bae4db84cfb 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1878,7 +1878,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
nv50_disp_atomic_commit_tail(state);
drm_for_each_crtc(crtc, dev) {
- if (crtc->state->enable) {
+ if (crtc->state->active) {
if (!drm->have_disp_power_ref) {
drm->have_disp_power_ref = true;
return 0;
--
2.17.1
2018 Jul 23
0
[PATCH] drm/nouveau/drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit()
...nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 2b3ccd850750..bc5c4f2402b4 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -4198,7 +4198,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
nv50_disp_atomic_commit_tail(state);
drm_for_each_crtc(crtc, dev) {
- if (crtc->state->enable) {
+ if (crtc->state->active) {
if (!drm->have_disp_power_ref) {
drm->have_disp_power_ref = true;
return 0;
--
2.17.1
2018 Jul 03
3
[PATCH 0/2] drm/nouveau: Fix runtime PM leaks
One very easy to trigger runtime PM leak, along with a rare never before
seen runtime PM leak!
Lyude Paul (2):
drm/nouveau: Fix runtime PM leak in drm_open()
drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit()
drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_drm.c | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
--
2.17.1
2017 Jan 09
0
[PATCH 3/3] drm/atomic: Make disable_all helper fully disable the crtc.
...state->acquire_ctx = ctx;
- drm_connector_list_iter_get(dev, &conn_iter);
- drm_for_each_connector_iter(conn, &conn_iter) {
- struct drm_crtc *crtc = conn->state->crtc;
- struct drm_crtc_state *crtc_state;
-
- if (!crtc || conn->dpms != DRM_MODE_DPMS_ON)
- continue;
-
+ drm_for_each_crtc(crtc, dev) {
crtc_state = drm_atomic_get_crtc_state(state, crtc);
if (IS_ERR(crtc_state)) {
- err = PTR_ERR(crtc_state);
+ ret = PTR_ERR(crtc_state);
goto free;
}
crtc_state->active = false;
+
+ ret = drm_atomic_set_mode_prop_for_crtc(crtc_state, NULL);
+ if (ret < 0)...
2017 Feb 23
0
[Intel-gfx] [PATCH 1/3] drm/atomic: Make disable_all helper fully disable the crtc.
...onnector_list_iter_get(dev, &conn_iter);
> - drm_for_each_connector_iter(conn, &conn_iter) {
> - struct drm_crtc *crtc = conn->state->crtc;
> - struct drm_crtc_state *crtc_state;
> -
> - if (!crtc || conn->dpms != DRM_MODE_DPMS_ON)
> - continue;
> -
> + drm_for_each_crtc(crtc, dev) {
> crtc_state = drm_atomic_get_crtc_state(state, crtc);
> if (IS_ERR(crtc_state)) {
> - err = PTR_ERR(crtc_state);
> + ret = PTR_ERR(crtc_state);
> goto free;
> }
>
> crtc_state->active = false;
> +
> + ret = drm_atomic_set_mode_pr...
2020 Mar 18
0
[PATCH 6/9] drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom
...nector_state, *new_connector_state;
struct drm_connector *connector;
struct drm_crtc_state *new_crtc_state;
struct drm_crtc *crtc;
+ struct nv50_head *head;
+ struct nv50_head_atom *asyh;
int ret, i;
+ if (core->assign_windows && core->func->head->static_wndw_map) {
+ drm_for_each_crtc(crtc, dev) {
+ new_crtc_state = drm_atomic_get_crtc_state(state,
+ crtc);
+ if (IS_ERR(new_crtc_state))
+ return PTR_ERR(new_crtc_state);
+
+ head = nv50_head(crtc);
+ asyh = nv50_head_atom(new_crtc_state);
+ core->func->head->static_wndw_map(head, asyh);
+ }
+ }
+...
2020 Apr 17
0
[RFC v3 08/11] drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom
...nector_state, *new_connector_state;
struct drm_connector *connector;
struct drm_crtc_state *new_crtc_state;
struct drm_crtc *crtc;
+ struct nv50_head *head;
+ struct nv50_head_atom *asyh;
int ret, i;
+ if (core->assign_windows && core->func->head->static_wndw_map) {
+ drm_for_each_crtc(crtc, dev) {
+ new_crtc_state = drm_atomic_get_crtc_state(state,
+ crtc);
+ if (IS_ERR(new_crtc_state))
+ return PTR_ERR(new_crtc_state);
+
+ head = nv50_head(crtc);
+ asyh = nv50_head_atom(new_crtc_state);
+ core->func->head->static_wndw_map(head, asyh);
+ }
+ }
+...
2020 May 08
0
[RFC v4 09/12] drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom
...nector_state, *new_connector_state;
struct drm_connector *connector;
struct drm_crtc_state *new_crtc_state;
struct drm_crtc *crtc;
+ struct nv50_head *head;
+ struct nv50_head_atom *asyh;
int ret, i;
+ if (core->assign_windows && core->func->head->static_wndw_map) {
+ drm_for_each_crtc(crtc, dev) {
+ new_crtc_state = drm_atomic_get_crtc_state(state,
+ crtc);
+ if (IS_ERR(new_crtc_state))
+ return PTR_ERR(new_crtc_state);
+
+ head = nv50_head(crtc);
+ asyh = nv50_head_atom(new_crtc_state);
+ core->func->head->static_wndw_map(head, asyh);
+ }
+ }
+...
2019 Feb 01
2
[PATCH v2 3/4] drm/atomic: Add drm_atomic_state->duplicated
...\n",
> connector->base.id, connector->name);
> return -EINVAL;
> @@ -3180,6 +3187,7 @@ drm_atomic_helper_duplicate_state(struct drm_device *dev,
> return ERR_PTR(-ENOMEM);
>
> state->acquire_ctx = ctx;
> + state->duplicated = true;
>
> drm_for_each_crtc(crtc, dev) {
> struct drm_crtc_state *crtc_state;
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index 4325e1518286..ea1540ea67af 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
>...
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:
2019 Feb 02
0
[PATCH v3 3/4] drm/atomic: Add drm_atomic_state->duplicated
...MIC("[CONNECTOR:%d:%s] is not registered\n",
connector->base.id, connector->name);
return -EINVAL;
@@ -3180,6 +3187,7 @@ drm_atomic_helper_duplicate_state(struct drm_device *dev,
return ERR_PTR(-ENOMEM);
state->acquire_ctx = ctx;
+ state->duplicated = true;
drm_for_each_crtc(crtc, dev) {
struct drm_crtc_state *crtc_state;
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 4325e1518286..61bba5bd1551 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -3097,6 +3097,10 @@ static...
2019 Feb 01
0
[PATCH v2 3/4] drm/atomic: Add drm_atomic_state->duplicated
...MIC("[CONNECTOR:%d:%s] is not registered\n",
connector->base.id, connector->name);
return -EINVAL;
@@ -3180,6 +3187,7 @@ drm_atomic_helper_duplicate_state(struct drm_device *dev,
return ERR_PTR(-ENOMEM);
state->acquire_ctx = ctx;
+ state->duplicated = true;
drm_for_each_crtc(crtc, dev) {
struct drm_crtc_state *crtc_state;
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 4325e1518286..ea1540ea67af 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -3097,6 +3097,10 @@ static...
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 +++---------