diff options
author | Michel Dänzer <daenzer@vmware.com> | 2011-08-31 03:42:47 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-09-01 04:37:27 -0400 |
commit | f01b7ba0eba63fc758ea1e0d4100c5ea0482e43e (patch) | |
tree | 9eb8050542ef5a9cabbac16aee0adf121f195bad /drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | |
parent | 654a4ef07a53c6b20e5411718e3aebe04c6a985f (diff) |
vmwgfx: Add support for depth 8
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c index 7b8115aab54d..c6d09a618353 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | |||
@@ -83,6 +83,15 @@ static void vmw_ldu_crtc_gamma_set(struct drm_crtc *crtc, | |||
83 | u16 *r, u16 *g, u16 *b, | 83 | u16 *r, u16 *g, u16 *b, |
84 | uint32_t start, uint32_t size) | 84 | uint32_t start, uint32_t size) |
85 | { | 85 | { |
86 | struct vmw_private *dev_priv = vmw_priv(crtc->dev); | ||
87 | int i; | ||
88 | |||
89 | for (i = 0; i < size; i++) { | ||
90 | DRM_DEBUG("%d r/g/b = 0x%04x / 0x%04x / 0x%04x\n", i, r[i], g[i], b[i]); | ||
91 | vmw_write(dev_priv, SVGA_PALETTE_BASE + i * 3 + 0, r[i] >> 8); | ||
92 | vmw_write(dev_priv, SVGA_PALETTE_BASE + i * 3 + 1, g[i] >> 8); | ||
93 | vmw_write(dev_priv, SVGA_PALETTE_BASE + i * 3 + 2, b[i] >> 8); | ||
94 | } | ||
86 | } | 95 | } |
87 | 96 | ||
88 | static void vmw_ldu_crtc_destroy(struct drm_crtc *crtc) | 97 | static void vmw_ldu_crtc_destroy(struct drm_crtc *crtc) |
@@ -547,6 +556,8 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit) | |||
547 | 556 | ||
548 | drm_crtc_init(dev, crtc, &vmw_legacy_crtc_funcs); | 557 | drm_crtc_init(dev, crtc, &vmw_legacy_crtc_funcs); |
549 | 558 | ||
559 | drm_mode_crtc_set_gamma_size(crtc, 256); | ||
560 | |||
550 | drm_connector_attach_property(connector, | 561 | drm_connector_attach_property(connector, |
551 | dev->mode_config.dirty_info_property, | 562 | dev->mode_config.dirty_info_property, |
552 | 1); | 563 | 1); |