Commit b360a3ce authored by Thomas Hellstrom's avatar Thomas Hellstrom

drm/vmwgfx: Fix surface framebuffer check for guest-backed surfaces

With guest-backed surfaces, surface->sizes == NULL, causing a kernel oops.
Use the base_size member instead.
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarJakob Bornecrantz <jakob@vmware.com>
Reviewed-by: default avatarBrian Paul <brianp@vmware.com>
parent 7cba9062
...@@ -672,9 +672,9 @@ static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv, ...@@ -672,9 +672,9 @@ static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv,
if (unlikely(surface->mip_levels[0] != 1 || if (unlikely(surface->mip_levels[0] != 1 ||
surface->num_sizes != 1 || surface->num_sizes != 1 ||
surface->sizes[0].width < mode_cmd->width || surface->base_size.width < mode_cmd->width ||
surface->sizes[0].height < mode_cmd->height || surface->base_size.height < mode_cmd->height ||
surface->sizes[0].depth != 1)) { surface->base_size.depth != 1)) {
DRM_ERROR("Incompatible surface dimensions " DRM_ERROR("Incompatible surface dimensions "
"for requested mode.\n"); "for requested mode.\n");
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment