Re: [PATCH 1/2] drm/atomic-helper: always track connector commits, too
Op 10-11-17 om 11:53 schreef Daniel Vetter: > It's useful for syncing async connector work like link retraining. > > v2: Make it work (Manasi) > > Cc: Manasi Navare> Cc: Maarten Lankhorst > Cc: Ville Syrjälä > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/drm_atomic_helper.c | 12 +++- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c > b/drivers/gpu/drm/drm_atomic_helper.c > index c18c271e7508..ced1ac8e68a0 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -1793,11 +1793,8 @@ int drm_atomic_helper_setup_commit(struct > drm_atomic_state *state, > > !try_wait_for_completion(_conn_state->commit->flip_done)) > return -EBUSY; > > - /* commit tracked through new_crtc_state->commit, no need to do > it explicitly */ > - if (new_conn_state->crtc) > - continue; > - > - commit = crtc_or_fake_commit(state, old_conn_state->crtc); > + /* Always track connectors explicitly for e.g. link retraining. > */ > + commit = crtc_or_fake_commit(state, new_conn_state->crtc ?: > old_conn_state->crtc); > if (!commit) > return -ENOMEM; > > @@ -1811,10 +1808,7 @@ int drm_atomic_helper_setup_commit(struct > drm_atomic_state *state, > > !try_wait_for_completion(_plane_state->commit->flip_done)) > return -EBUSY; > > - /* > - * Unlike connectors, always track planes explicitly for > - * async pageflip support. > - */ > + /* Always track planes explicitly for async pageflip support. */ > commit = crtc_or_fake_commit(state, new_plane_state->crtc ?: > old_plane_state->crtc); > if (!commit) > return -ENOMEM; First patch reviewed and pushed to drm-misc-next. Will wait for CI_DRM results before pushing the second patch, though I don't expect anything breaking from this. :-) ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/2] drm/atomic-helper: always track connector commits, too
On Wed, Nov 08, 2017 at 05:21:04PM +0200, Ville Syrjälä wrote: > On Wed, Nov 08, 2017 at 11:54:49AM +0100, Daniel Vetter wrote: > > It's useful for syncing async connector work like link retraining. > > > > Cc: Manasi Navare> > Cc: Maarten Lankhorst > > Cc: Ville Syrjälä > > Signed-off-by: Daniel Vetter > > --- > > drivers/gpu/drm/drm_atomic_helper.c | 8 +++- > > 1 file changed, 3 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c > > b/drivers/gpu/drm/drm_atomic_helper.c > > index 71d712f1b56a..ea781d55f2c1 100644 > > --- a/drivers/gpu/drm/drm_atomic_helper.c > > +++ b/drivers/gpu/drm/drm_atomic_helper.c > > @@ -1791,7 +1791,8 @@ int drm_atomic_helper_setup_commit(struct > > drm_atomic_state *state, > > if (new_conn_state->crtc) > > continue; > > This guy says we will never have new_conn_state->crtc below. > > > > > - commit = crtc_or_fake_commit(state, old_conn_state->crtc); > > + /* Always track connectors explicitly for e.g. link retraining. > > */ > > + commit = crtc_or_fake_commit(state, new_conn_state->crtc ?: > > old_conn_state->crtc); Yes exactly, I had the same thought. Control will never reach here if new_conn_state->crtc is true. If we want to track it explicitly for link retraining pending modeset retry work then shouldnt we remove the remove the if (new_conn_state->crtc) continue part? Manasi > > if (!commit) > > return -ENOMEM; > > > > @@ -1805,10 +1806,7 @@ int drm_atomic_helper_setup_commit(struct > > drm_atomic_state *state, > > > > !try_wait_for_completion(_plane_state->commit->flip_done)) > > return -EBUSY; > > > > - /* > > -* Unlike connectors, always track planes explicitly for > > -* async pageflip support. > > -*/ > > + /* Always track planes explicitly for async pageflip support. */ > > commit = crtc_or_fake_commit(state, new_plane_state->crtc ?: > > old_plane_state->crtc); > > if (!commit) > > return -ENOMEM; > > -- > > 2.15.0 > > -- > Ville Syrjälä > Intel OTC > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/2] drm/atomic-helper: always track connector commits, too
On Wed, Nov 08, 2017 at 11:54:49AM +0100, Daniel Vetter wrote: > It's useful for syncing async connector work like link retraining. > > Cc: Manasi Navare> Cc: Maarten Lankhorst > Cc: Ville Syrjälä > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/drm_atomic_helper.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c > b/drivers/gpu/drm/drm_atomic_helper.c > index 71d712f1b56a..ea781d55f2c1 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -1791,7 +1791,8 @@ int drm_atomic_helper_setup_commit(struct > drm_atomic_state *state, > if (new_conn_state->crtc) > continue; This guy says we will never have new_conn_state->crtc below. > > - commit = crtc_or_fake_commit(state, old_conn_state->crtc); > + /* Always track connectors explicitly for e.g. link retraining. > */ > + commit = crtc_or_fake_commit(state, new_conn_state->crtc ?: > old_conn_state->crtc); > if (!commit) > return -ENOMEM; > > @@ -1805,10 +1806,7 @@ int drm_atomic_helper_setup_commit(struct > drm_atomic_state *state, > > !try_wait_for_completion(_plane_state->commit->flip_done)) > return -EBUSY; > > - /* > - * Unlike connectors, always track planes explicitly for > - * async pageflip support. > - */ > + /* Always track planes explicitly for async pageflip support. */ > commit = crtc_or_fake_commit(state, new_plane_state->crtc ?: > old_plane_state->crtc); > if (!commit) > return -ENOMEM; > -- > 2.15.0 -- Ville Syrjälä Intel OTC ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel