diff mbox

[v2,4/7] drm/omapdrm: Fix omap_atomic_wait_for_completion

Message ID 20170719143920.25685-5-maarten.lankhorst@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maarten Lankhorst July 19, 2017, 2:39 p.m. UTC
Use the new iterator macro and look for crtc_state->active instead of
enable, only crtc_state->enable implies that vblanks will happen.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/omapdrm/omap_drv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Daniel Vetter July 25, 2017, 8:27 a.m. UTC | #1
On Wed, Jul 19, 2017 at 04:39:17PM +0200, Maarten Lankhorst wrote:
> Use the new iterator macro and look for crtc_state->active instead of
> enable, only crtc_state->enable implies that vblanks will happen.

s/enable/active/, since enable only means logically enabled (aka resources
reserved). With that my r-b holds.
-Daniel

> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/omapdrm/omap_drv.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
> index 022029ea6972..66d3c6bfd6a8 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -57,13 +57,13 @@ static void omap_fb_output_poll_changed(struct drm_device *dev)
>  static void omap_atomic_wait_for_completion(struct drm_device *dev,
>  					    struct drm_atomic_state *old_state)
>  {
> -	struct drm_crtc_state *old_crtc_state;
> +	struct drm_crtc_state *new_crtc_state;
>  	struct drm_crtc *crtc;
>  	unsigned int i;
>  	int ret;
>  
> -	for_each_crtc_in_state(old_state, crtc, old_crtc_state, i) {
> -		if (!crtc->state->enable)
> +	for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) {
> +		if (!new_crtc_state->active)
>  			continue;
>  
>  		ret = omap_crtc_wait_pending(crtc);
> -- 
> 2.11.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Maarten Lankhorst Aug. 1, 2017, 9:50 a.m. UTC | #2
Op 25-07-17 om 10:27 schreef Daniel Vetter:
> On Wed, Jul 19, 2017 at 04:39:17PM +0200, Maarten Lankhorst wrote:
>> Use the new iterator macro and look for crtc_state->active instead of
>> enable, only crtc_state->enable implies that vblanks will happen.
> s/enable/active/, since enable only means logically enabled (aka resources
> reserved). With that my r-b holds.
> -Daniel
Ok thanks. I've pushed patch 1, 4, 5 and 6.

I'll wait a bit longer for the conflict in patch 3, and for a better solution on async in patch 2.

It seems the nouveau patches caused a bit of a conflict in nv50_disp_atomic_commit_tail
because of better event handling compared to drm-misc, I've fixed up drm-tip.
diff mbox

Patch

diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 022029ea6972..66d3c6bfd6a8 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -57,13 +57,13 @@  static void omap_fb_output_poll_changed(struct drm_device *dev)
 static void omap_atomic_wait_for_completion(struct drm_device *dev,
 					    struct drm_atomic_state *old_state)
 {
-	struct drm_crtc_state *old_crtc_state;
+	struct drm_crtc_state *new_crtc_state;
 	struct drm_crtc *crtc;
 	unsigned int i;
 	int ret;
 
-	for_each_crtc_in_state(old_state, crtc, old_crtc_state, i) {
-		if (!crtc->state->enable)
+	for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) {
+		if (!new_crtc_state->active)
 			continue;
 
 		ret = omap_crtc_wait_pending(crtc);