cursor-renderer/native: Skip init_hw_cursor_support_for_gpu for headless
By definition, headless means no HW display output, so initializing HW cursor support makes no sense. Fixes hitting the g_warning in tests when there's a GPU device available, breaking them. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4259>
This commit is contained in:
parent
99dbcf1b8c
commit
ba3b709e08
@ -1350,12 +1350,17 @@ static void
|
|||||||
init_hw_cursor_support_for_gpu (MetaGpuKms *gpu_kms)
|
init_hw_cursor_support_for_gpu (MetaGpuKms *gpu_kms)
|
||||||
{
|
{
|
||||||
MetaKmsDevice *kms_device = meta_gpu_kms_get_kms_device (gpu_kms);
|
MetaKmsDevice *kms_device = meta_gpu_kms_get_kms_device (gpu_kms);
|
||||||
|
MetaKms *kms = meta_kms_device_get_kms (kms_device);
|
||||||
|
MetaBackend *backend = meta_kms_get_backend (kms);
|
||||||
MetaCursorRendererNativeGpuData *cursor_renderer_gpu_data;
|
MetaCursorRendererNativeGpuData *cursor_renderer_gpu_data;
|
||||||
const MetaFormatInfo *format_info;
|
const MetaFormatInfo *format_info;
|
||||||
struct gbm_device *gbm_device;
|
struct gbm_device *gbm_device;
|
||||||
uint64_t width, height;
|
uint64_t width, height;
|
||||||
MetaDrmFormatBuf tmp;
|
MetaDrmFormatBuf tmp;
|
||||||
|
|
||||||
|
if (meta_backend_is_headless (backend))
|
||||||
|
return;
|
||||||
|
|
||||||
cursor_renderer_gpu_data =
|
cursor_renderer_gpu_data =
|
||||||
meta_create_cursor_renderer_native_gpu_data (gpu_kms);
|
meta_create_cursor_renderer_native_gpu_data (gpu_kms);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user