Merge branch 'for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[deliverable/linux.git] / drivers / gpu / drm / ast / ast_mode.c
index c337922606e322ae9e0abdf57fc4196849f0bc39..5957c3e659feeb7e4ead966b5912a1584d3bb2a9 100644 (file)
@@ -624,19 +624,21 @@ static void ast_crtc_reset(struct drm_crtc *crtc)
 
 }
 
-static void ast_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
-                                u16 *blue, uint32_t start, uint32_t size)
+static int ast_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
+                             u16 *blue, uint32_t size)
 {
        struct ast_crtc *ast_crtc = to_ast_crtc(crtc);
-       int end = (start + size > 256) ? 256 : start + size, i;
+       int i;
 
        /* userspace palettes are always correct as is */
-       for (i = start; i < end; i++) {
+       for (i = 0; i < size; i++) {
                ast_crtc->lut_r[i] = red[i] >> 8;
                ast_crtc->lut_g[i] = green[i] >> 8;
                ast_crtc->lut_b[i] = blue[i] >> 8;
        }
        ast_crtc_load_lut(crtc);
+
+       return 0;
 }
 
 
This page took 0.096821 seconds and 5 git commands to generate.