drm/vmwgfx: Fix order of operation
mode->hdisplay * (var->bits_per_pixel + 7) gets evaluated before the division, potentially making the pitch larger than it should be. Since the original intention is to do a div-round-up, just use the macro instead. Signed-off-by: NSinclair Yeh <syeh@vmware.com> Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
Showing
想要评论请 注册 或 登录