mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	backend/drm: fetch current CRTC once on startup
Once we are DRM master, the CRTC cannot be changed behind our back except during a VT switch. After a VT switch, we try to restore whatever KMS state we had last programmed. Reloading the current CRTC from KMS breaks this and can result in a modeset without a FB. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3432
This commit is contained in:
		
							parent
							
								
									4f920a206c
								
							
						
					
					
						commit
						c6d8a11d2c
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -1363,14 +1363,14 @@ void scan_drm_connectors(struct wlr_drm_backend *drm,
 | 
				
			||||||
			snprintf(wlr_conn->name, sizeof(wlr_conn->name),
 | 
								snprintf(wlr_conn->name, sizeof(wlr_conn->name),
 | 
				
			||||||
				"%s-%"PRIu32, conn_name, drm_conn->connector_type_id);
 | 
									"%s-%"PRIu32, conn_name, drm_conn->connector_type_id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								wlr_conn->crtc = connector_get_current_crtc(wlr_conn, drm_conn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			wl_list_insert(drm->outputs.prev, &wlr_conn->link);
 | 
								wl_list_insert(drm->outputs.prev, &wlr_conn->link);
 | 
				
			||||||
			wlr_log(WLR_INFO, "Found connector '%s'", wlr_conn->name);
 | 
								wlr_log(WLR_INFO, "Found connector '%s'", wlr_conn->name);
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			seen[index] = true;
 | 
								seen[index] = true;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		wlr_conn->crtc = connector_get_current_crtc(wlr_conn, drm_conn);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		// This can only happen *after* hotplug, since we haven't read the
 | 
							// This can only happen *after* hotplug, since we haven't read the
 | 
				
			||||||
		// connector properties yet
 | 
							// connector properties yet
 | 
				
			||||||
		if (wlr_conn->props.link_status != 0) {
 | 
							if (wlr_conn->props.link_status != 0) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue