vmwgfx fixes
Subsystems (3)
cover vmwgfx fixes
These patches fix some long-standing modesetting bugs.
PATCH 1/2 drm/vmwgfx: Fix framebuffer modesetting
From: Jakob Bornecrantz <[email protected]>
Must set SVGA_NUM_REG_GUEST_DISPLAY before setting up the display information.
Signed-off-by Jakob Bornecrantz <[email protected]>
Signed-off-by Thomas Hellstrom <[email protected]>
--- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 22 ++++------------------ 1 files changed, 4 insertions(+), 18 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +4 -18
@@ -152,20 +152,12 @@ static int vmw_fb_set_par(struct fb_info *info)struct vmw_fb_par *par = info->par;struct vmw_private *vmw_priv = par->vmw_priv; +vmw_kms_write_svga (vmw_priv, info->var.xres, info->var.yres, + info->fix.line_length, + par->bpp, par->depth);if (vmw_priv->capabilities &SVGA_CAP_DISPLAY_TOPOLOGY ) { -vmw_write (vmw_priv,SVGA_REG_DISPLAY_ID ,0 ); -vmw_write (vmw_priv,SVGA_REG_DISPLAY_IS_PRIMARY , true); -vmw_write (vmw_priv,SVGA_REG_DISPLAY_POSITION_X ,0 ); -vmw_write (vmw_priv,SVGA_REG_DISPLAY_POSITION_Y ,0 ); -vmw_write (vmw_priv,SVGA_REG_DISPLAY_WIDTH ,0 ); -vmw_write (vmw_priv,SVGA_REG_DISPLAY_HEIGHT ,0 ); -vmw_write (vmw_priv,SVGA_REG_DISPLAY_ID ,SVGA_ID_INVALID ); - -vmw_kms_write_svga (vmw_priv, info->var.xres, info->var.yres, - info->fix.line_length, - par->bpp, par->depth); -/* TODO check if pitch and offset changes */ +vmw_write (vmw_priv,SVGA_REG_NUM_GUEST_DISPLAYS ,1 );vmw_write (vmw_priv,SVGA_REG_DISPLAY_ID ,0 );vmw_write (vmw_priv,SVGA_REG_DISPLAY_IS_PRIMARY , true);vmw_write (vmw_priv,SVGA_REG_DISPLAY_POSITION_X , info->var.xoffset);
@@ -173,12 +165,6 @@ static int vmw_fb_set_par(struct fb_info *info)vmw_write (vmw_priv,SVGA_REG_DISPLAY_WIDTH , info->var.xres);vmw_write (vmw_priv,SVGA_REG_DISPLAY_HEIGHT , info->var.yres);vmw_write (vmw_priv,SVGA_REG_DISPLAY_ID ,SVGA_ID_INVALID ); -vmw_write (vmw_priv,SVGA_REG_NUM_GUEST_DISPLAYS ,1 ); - }else { -vmw_kms_write_svga (vmw_priv, info->var.xres, info->var.yres, - info->fix.line_length, - par->bpp, par->depth); - }/* This is really helpful since if this fails the user
Signature · 1 line
1.6.2.5
PATCH 2/2 drm/vmwgfx: Fix vga save / restore with display topology.
vga save / restore previously didn't handle the display topology case.
Signed-off-by Thomas Hellstrom <[email protected]>
--- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 15 ++++++++++- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 48 ++++++++++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 7 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +14 -1
@@ -47,6 +47,7 @@#define VMWGFX_FIFO_STATIC_SIZE (1024*1024)#define VMWGFX_MAX_RELOCATIONS 2048#define VMWGFX_MAX_GMRS 2048 +#define VMWGFX_MAX_DISPLAYS 16struct vmw_fpriv {struct drm_master *locked_master;
@@ -152,6 +153,14 @@ struct vmw_master {struct ttm_lock lock; }; +struct vmw_vga_topology_state { +uint32_t width; +uint32_t height; +uint32_t primary; +uint32_t pos_x; +uint32_t pos_y; +}; +struct vmw_private {struct ttm_bo_device bdev;struct ttm_bo_global_ref bo_global_ref;
@@ -179,16 +188,20 @@ struct vmw_private {* VGA registers. */ +struct vmw_vga_topology_state vga_save[VMWGFX_MAX_DISPLAYS ];uint32_t vga_width;uint32_t vga_height;uint32_t vga_depth;uint32_t vga_bpp;uint32_t vga_pseudo;uint32_t vga_red_mask; -uint32_t vga_blue_mask;uint32_t vga_green_mask; +uint32_t vga_blue_mask; +uint32_t vga_bpl;uint32_t vga_pitchlock; +uint32_t num_displays; +/* * Framebuffer info. */
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +42 -6
77 lines not on this page · raw message
Signature · 1 line
1.6.2.5