.. | .. |
---|
26 | 26 | * |
---|
27 | 27 | **************************************************************************/ |
---|
28 | 28 | |
---|
29 | | -#include <linux/export.h> |
---|
| 29 | +#include <linux/pci.h> |
---|
30 | 30 | |
---|
31 | | -#include <drm/drmP.h> |
---|
| 31 | +#include <drm/drm_fourcc.h> |
---|
| 32 | +#include <drm/ttm/ttm_placement.h> |
---|
| 33 | + |
---|
32 | 34 | #include "vmwgfx_drv.h" |
---|
33 | 35 | #include "vmwgfx_kms.h" |
---|
34 | | - |
---|
35 | | -#include <drm/ttm/ttm_placement.h> |
---|
36 | 36 | |
---|
37 | 37 | #define VMW_DIRTY_DELAY (HZ / 30) |
---|
38 | 38 | |
---|
.. | .. |
---|
498 | 498 | |
---|
499 | 499 | static int vmw_fb_kms_framebuffer(struct fb_info *info) |
---|
500 | 500 | { |
---|
501 | | - struct drm_mode_fb_cmd2 mode_cmd; |
---|
| 501 | + struct drm_mode_fb_cmd2 mode_cmd = {0}; |
---|
502 | 502 | struct vmw_fb_par *par = info->par; |
---|
503 | 503 | struct fb_var_screeninfo *var = &info->var; |
---|
504 | 504 | struct drm_framebuffer *cur_fb; |
---|
.. | .. |
---|
624 | 624 | } |
---|
625 | 625 | |
---|
626 | 626 | |
---|
627 | | -static struct fb_ops vmw_fb_ops = { |
---|
| 627 | +static const struct fb_ops vmw_fb_ops = { |
---|
628 | 628 | .owner = THIS_MODULE, |
---|
629 | 629 | .fb_check_var = vmw_fb_check_var, |
---|
630 | 630 | .fb_set_par = vmw_fb_set_par, |
---|
.. | .. |
---|
642 | 642 | struct vmw_fb_par *par; |
---|
643 | 643 | struct fb_info *info; |
---|
644 | 644 | unsigned fb_width, fb_height; |
---|
645 | | - unsigned fb_bpp, fb_depth, fb_offset, fb_pitch, fb_size; |
---|
| 645 | + unsigned int fb_bpp, fb_pitch, fb_size; |
---|
646 | 646 | struct drm_display_mode *init_mode; |
---|
647 | 647 | int ret; |
---|
648 | 648 | |
---|
649 | 649 | fb_bpp = 32; |
---|
650 | | - fb_depth = 24; |
---|
651 | 650 | |
---|
652 | 651 | /* XXX As shouldn't these be as well. */ |
---|
653 | 652 | fb_width = min(vmw_priv->fb_max_width, (unsigned)2048); |
---|
.. | .. |
---|
655 | 654 | |
---|
656 | 655 | fb_pitch = fb_width * fb_bpp / 8; |
---|
657 | 656 | fb_size = fb_pitch * fb_height; |
---|
658 | | - fb_offset = vmw_read(vmw_priv, SVGA_REG_FB_OFFSET); |
---|
659 | 657 | |
---|
660 | 658 | info = framebuffer_alloc(sizeof(*par), device); |
---|
661 | 659 | if (!info) |
---|