mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	backend/drm: fix retry pageflip
This commit is contained in:
		
							parent
							
								
									d6c74d8a16
								
							
						
					
					
						commit
						f0f97280a0
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -199,14 +199,13 @@ static void wlr_drm_connector_swap_buffers(struct wlr_output *output) {
 | 
				
			||||||
	if (drm->parent) {
 | 
						if (drm->parent) {
 | 
				
			||||||
		bo = wlr_drm_surface_mgpu_copy(&plane->mgpu_surf, bo);
 | 
							bo = wlr_drm_surface_mgpu_copy(&plane->mgpu_surf, bo);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	uint32_t fb_id = get_fb_for_bo(bo);
 | 
						uint32_t fb_id = get_fb_for_bo(bo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (drm->iface->crtc_pageflip(drm, conn, crtc, fb_id, NULL)) {
 | 
						if (drm->iface->crtc_pageflip(drm, conn, crtc, fb_id, NULL)) {
 | 
				
			||||||
		conn->pageflip_pending = true;
 | 
							conn->pageflip_pending = true;
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		wl_event_source_timer_update(conn->retry_pageflip,
 | 
							wl_event_source_timer_update(conn->retry_pageflip,
 | 
				
			||||||
			1000.0f / conn->output.current_mode->refresh);
 | 
								1000000.0f / conn->output.current_mode->refresh);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -241,7 +240,7 @@ void wlr_drm_connector_start_renderer(struct wlr_drm_connector *conn) {
 | 
				
			||||||
		conn->pageflip_pending = true;
 | 
							conn->pageflip_pending = true;
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		wl_event_source_timer_update(conn->retry_pageflip,
 | 
							wl_event_source_timer_update(conn->retry_pageflip,
 | 
				
			||||||
			1000.0f / conn->output.current_mode->refresh);
 | 
								1000000.0f / conn->output.current_mode->refresh);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue