Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269568
b: refs/heads/master
c: f01b7ba
h: refs/heads/master
v: v3
  • Loading branch information
Michel Dänzer authored and Dave Airlie committed Sep 1, 2011
1 parent 551d3ab commit 65f942b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 654a4ef07a53c6b20e5411718e3aebe04c6a985f
refs/heads/master: f01b7ba0eba63fc758ea1e0d4100c5ea0482e43e
3 changes: 3 additions & 0 deletions trunk/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,9 @@ static int vmw_kms_new_framebuffer_surface(struct vmw_private *dev_priv,
case 15:
format = SVGA3D_A1R5G5B5;
break;
case 8:
format = SVGA3D_LUMINANCE8;
break;
default:
DRM_ERROR("Invalid color depth: %d\n", mode_cmd->depth);
return -EINVAL;
Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ static void vmw_ldu_crtc_gamma_set(struct drm_crtc *crtc,
u16 *r, u16 *g, u16 *b,
uint32_t start, uint32_t size)
{
struct vmw_private *dev_priv = vmw_priv(crtc->dev);
int i;

for (i = 0; i < size; i++) {
DRM_DEBUG("%d r/g/b = 0x%04x / 0x%04x / 0x%04x\n", i, r[i], g[i], b[i]);
vmw_write(dev_priv, SVGA_PALETTE_BASE + i * 3 + 0, r[i] >> 8);
vmw_write(dev_priv, SVGA_PALETTE_BASE + i * 3 + 1, g[i] >> 8);
vmw_write(dev_priv, SVGA_PALETTE_BASE + i * 3 + 2, b[i] >> 8);
}
}

static void vmw_ldu_crtc_destroy(struct drm_crtc *crtc)
Expand Down Expand Up @@ -547,6 +556,8 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit)

drm_crtc_init(dev, crtc, &vmw_legacy_crtc_funcs);

drm_mode_crtc_set_gamma_size(crtc, 256);

drm_connector_attach_property(connector,
dev->mode_config.dirty_info_property,
1);
Expand Down

0 comments on commit 65f942b

Please sign in to comment.