summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/kms
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/egl/kms')
-rw-r--r--src/gallium/state_trackers/egl/kms/native_kms.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/egl/kms/native_kms.c b/src/gallium/state_trackers/egl/kms/native_kms.c
index f8c5599023..d1ff0f47b6 100644
--- a/src/gallium/state_trackers/egl/kms/native_kms.c
+++ b/src/gallium/state_trackers/egl/kms/native_kms.c
@@ -597,20 +597,14 @@ kms_display_get_configs(struct native_display *ndpy, int *num_configs)
if (!kms_display_is_format_supported(&kdpy->base, format, TRUE))
format = PIPE_FORMAT_NONE;
}
- if (format == PIPE_FORMAT_NONE)
+ if (format == PIPE_FORMAT_NONE) {
+ free(kdpy->config);
+ kdpy->config = NULL;
return NULL;
+ }
nconf->color_format = format;
- format = PIPE_FORMAT_Z24_UNORM_S8_USCALED;
- if (!kms_display_is_format_supported(&kdpy->base, format, FALSE)) {
- format = PIPE_FORMAT_S8_USCALED_Z24_UNORM;
- if (!kms_display_is_format_supported(&kdpy->base, format, FALSE))
- format = PIPE_FORMAT_NONE;
- }
- nconf->depth_format = format;
- nconf->stencil_format = format;
-
nconf->scanout_bit = TRUE;
}