mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	backend/drm: force LINEAR for cursor plane formats
If the kernel driver doesn't support modifiers, it still expects cursor FBs to have a LINEAR layout. See [1] for expectations for framebuffers attached to the cursor plane. [1]: https://patchwork.freedesktop.org/patch/408512/
This commit is contained in:
		
							parent
							
								
									caeed70f28
								
							
						
					
					
						commit
						7ea0e9f277
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -136,6 +136,13 @@ static bool add_plane(struct wlr_drm_backend *drm,
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		drmModeFreePropertyBlob(blob);
 | 
							drmModeFreePropertyBlob(blob);
 | 
				
			||||||
 | 
						} else if (type == DRM_PLANE_TYPE_CURSOR) {
 | 
				
			||||||
 | 
							// Force a LINEAR layout for the cursor if the driver doesn't support
 | 
				
			||||||
 | 
							// modifiers
 | 
				
			||||||
 | 
							for (size_t i = 0; i < p->formats.len; ++i) {
 | 
				
			||||||
 | 
								wlr_drm_format_set_add(&p->formats, p->formats.formats[i]->format,
 | 
				
			||||||
 | 
									DRM_FORMAT_MOD_LINEAR);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	switch (type) {
 | 
						switch (type) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue