]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Fix depth input into drm_mode_legacy_fb_format
authorSinclair Yeh <syeh@vmware.com>
Wed, 18 Jan 2017 22:14:01 +0000 (14:14 -0800)
committerSinclair Yeh <syeh@vmware.com>
Fri, 27 Jan 2017 03:53:34 +0000 (19:53 -0800)
commit8861e8b7f0ee59a0cce6f8bade79c601283bb799
tree7ed12099198823ccb1d41180be6b85cee5ecce3f
parentba47a7809243362d1d2d5f2ec6dd229b20d75685
drm/vmwgfx: Fix depth input into drm_mode_legacy_fb_format

Currently the pitch is passed in as depth.  This causes
drm_mode_legacy_fb_format() to return the wrong pixel format.

The wrong pixel format will be rejected by vmw_kms_new_framebuffer(),
thus leaving par->set_fb to NULL.

This eventually causes a crash in vmw_fb_setcolreg() when the code
tries to dereference par->set_fb.

Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c