Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307481
b: refs/heads/master
c: ebe0f24
h: refs/heads/master
i:
  307479: cb36a3f
v: v3
  • Loading branch information
Laurent Pinchart authored and Dave Airlie committed May 22, 2012
1 parent af2bc8b commit 2cb4566
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 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: e6ecefaadfcdb03db8ac9e739b4ba7a93a8811b3
refs/heads/master: ebe0f2442cc4c5493a85c875d2d8a44ffecc1175
5 changes: 5 additions & 0 deletions trunk/drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3332,6 +3332,11 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev,
}
crtc = obj_to_crtc(obj);

if (crtc->funcs->gamma_set == NULL) {
ret = -ENOSYS;
goto out;
}

/* memcpy into gamma store */
if (crtc_lut->gamma_size != crtc->gamma_size) {
ret = -EINVAL;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ static void drm_fb_helper_restore_lut_atomic(struct drm_crtc *crtc)
{
uint16_t *r_base, *g_base, *b_base;

if (crtc->funcs->gamma_set == NULL)
return;

r_base = crtc->gamma_store;
g_base = r_base + crtc->gamma_size;
b_base = g_base + crtc->gamma_size;
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/staging/omapdrm/omap_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ struct omap_crtc {
struct drm_framebuffer *old_fb;
};

static void omap_crtc_gamma_set(struct drm_crtc *crtc,
u16 *red, u16 *green, u16 *blue, uint32_t start, uint32_t size)
{
/* not supported.. at least not yet */
}

static void omap_crtc_destroy(struct drm_crtc *crtc)
{
struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
Expand Down Expand Up @@ -198,7 +192,6 @@ static int omap_crtc_page_flip_locked(struct drm_crtc *crtc,
}

static const struct drm_crtc_funcs omap_crtc_funcs = {
.gamma_set = omap_crtc_gamma_set,
.set_config = drm_crtc_helper_set_config,
.destroy = omap_crtc_destroy,
.page_flip = omap_crtc_page_flip_locked,
Expand Down

0 comments on commit 2cb4566

Please sign in to comment.