Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269571
b: refs/heads/master
c: 0bef23f
h: refs/heads/master
i:
  269569: 5ad13b4
  269567: 551d3ab
v: v3
  • Loading branch information
Michel Dänzer authored and Dave Airlie committed Sep 1, 2011
1 parent 90b92de commit fa16f6b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6558429bc4c7351cc3d80fc9055f1204a9adf060
refs/heads/master: 0bef23f9180b43e805ce4dabb90b24a0b558721c
6 changes: 3 additions & 3 deletions trunk/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,9 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf,
struct ttm_object_file *tfile,
struct ttm_buffer_object *bo,
SVGA3dCmdHeader *header);
void vmw_kms_write_svga(struct vmw_private *vmw_priv,
unsigned width, unsigned height, unsigned pitch,
unsigned bpp, unsigned depth);
int vmw_kms_write_svga(struct vmw_private *vmw_priv,
unsigned width, unsigned height, unsigned pitch,
unsigned bpp, unsigned depth);
int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
void vmw_kms_idle_workqueues(struct vmw_master *vmaster);
Expand Down
10 changes: 7 additions & 3 deletions trunk/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,14 @@ 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;
int ret;

ret = vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
info->fix.line_length,
par->bpp, par->depth);
if (ret)
return ret;

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) {
/* TODO check if pitch and offset changes */
vmw_write(vmw_priv, SVGA_REG_NUM_GUEST_DISPLAYS, 1);
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ int vmw_kms_cursor_bypass_ioctl(struct drm_device *dev, void *data,
return ret;
}

void vmw_kms_write_svga(struct vmw_private *vmw_priv,
int vmw_kms_write_svga(struct vmw_private *vmw_priv,
unsigned width, unsigned height, unsigned pitch,
unsigned bpp, unsigned depth)
{
Expand All @@ -1001,6 +1001,14 @@ void vmw_kms_write_svga(struct vmw_private *vmw_priv,
vmw_write(vmw_priv, SVGA_REG_WIDTH, width);
vmw_write(vmw_priv, SVGA_REG_HEIGHT, height);
vmw_write(vmw_priv, SVGA_REG_BITS_PER_PIXEL, bpp);

if (vmw_read(vmw_priv, SVGA_REG_DEPTH) != depth) {
DRM_ERROR("Invalid depth %u for %u bpp, host expects %u\n",
depth, bpp, vmw_read(vmw_priv, SVGA_REG_DEPTH));
return -EINVAL;
}

return 0;
}

int vmw_kms_save_vga(struct vmw_private *vmw_priv)
Expand Down
14 changes: 4 additions & 10 deletions trunk/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,8 @@ static int vmw_ldu_commit_list(struct vmw_private *dev_priv)
return 0;
fb = entry->base.crtc.fb;

vmw_kms_write_svga(dev_priv, w, h, fb->pitch,
fb->bits_per_pixel, fb->depth);

return 0;
return vmw_kms_write_svga(dev_priv, w, h, fb->pitch,
fb->bits_per_pixel, fb->depth);
}

if (!list_empty(&lds->active)) {
Expand Down Expand Up @@ -274,9 +272,7 @@ static int vmw_ldu_crtc_set_config(struct drm_mode_set *set)

vmw_ldu_del_active(dev_priv, ldu);

vmw_ldu_commit_list(dev_priv);

return 0;
return vmw_ldu_commit_list(dev_priv);
}


Expand All @@ -301,9 +297,7 @@ static int vmw_ldu_crtc_set_config(struct drm_mode_set *set)

vmw_ldu_add_active(dev_priv, ldu, vfb);

vmw_ldu_commit_list(dev_priv);

return 0;
return vmw_ldu_commit_list(dev_priv);
}

static struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
Expand Down

0 comments on commit fa16f6b

Please sign in to comment.