drm/fb: remove drm_fb_helper_setcolreg
authorJames Simmons <jsimmons@infradead.org>
Wed, 7 Apr 2010 15:06:21 +0000 (15:06 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 8 Apr 2010 00:09:50 +0000 (10:09 +1000)
This patch is against the drm-fbdevfix1 branch. It removes the
drm_fb_helper_setcolreg function. The reason is that fb_setcolreg is only
used in the case where fb_setcmap is called and no fb_ops->fb_setcmap is
used. In the drm case we always need a fb_setcmap hook to handle multiple
crtcs so we don't need a fb_setcolreg hook. Please apply.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/radeon/radeon_fb.c

index b889eb0aaf5fa8de3c636184da034dcd556b13bb..6929f5b21d2cd06b244124fa1831f5031444694a 100644 (file)
@@ -596,36 +596,6 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info)
 }
 EXPORT_SYMBOL(drm_fb_helper_setcmap);
 
-int drm_fb_helper_setcolreg(unsigned regno,
-                           unsigned red,
-                           unsigned green,
-                           unsigned blue,
-                           unsigned transp,
-                           struct fb_info *info)
-{
-       struct drm_fb_helper *fb_helper = info->par;
-       struct drm_crtc *crtc;
-       struct drm_crtc_helper_funcs *crtc_funcs;
-       int i;
-       int ret;
-
-       if (regno > 255)
-               return 1;
-
-       for (i = 0; i < fb_helper->crtc_count; i++) {
-               crtc = fb_helper->crtc_info[i].mode_set.crtc;
-               crtc_funcs = crtc->helper_private;
-
-               ret = setcolreg(crtc, red, green, blue, regno, info);
-               if (ret)
-                       return ret;
-
-               crtc_funcs->load_lut(crtc);
-       }
-       return 0;
-}
-EXPORT_SYMBOL(drm_fb_helper_setcolreg);
-
 int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
                            struct fb_info *info)
 {
index cc726ff0a02df855dd345bf0b87b50637e6822cd..cbb8cb7144c63c67d785f9ceab7412fb8945d66d 100644 (file)
@@ -56,7 +56,6 @@ static struct fb_ops intelfb_ops = {
        .owner = THIS_MODULE,
        .fb_check_var = drm_fb_helper_check_var,
        .fb_set_par = drm_fb_helper_set_par,
-       .fb_setcolreg = drm_fb_helper_setcolreg,
        .fb_fillrect = cfb_fillrect,
        .fb_copyarea = cfb_copyarea,
        .fb_imageblit = cfb_imageblit,
index bc81ec7dc13139b62f21b50e484be2b479d5bad4..bea9f780d2c7df147884cb1a8b92d03de3d46551 100644 (file)
@@ -98,7 +98,6 @@ static struct fb_ops nouveau_fbcon_ops = {
        .owner = THIS_MODULE,
        .fb_check_var = drm_fb_helper_check_var,
        .fb_set_par = drm_fb_helper_set_par,
-       .fb_setcolreg = drm_fb_helper_setcolreg,
        .fb_fillrect = cfb_fillrect,
        .fb_copyarea = cfb_copyarea,
        .fb_imageblit = cfb_imageblit,
@@ -112,7 +111,6 @@ static struct fb_ops nv04_fbcon_ops = {
        .owner = THIS_MODULE,
        .fb_check_var = drm_fb_helper_check_var,
        .fb_set_par = drm_fb_helper_set_par,
-       .fb_setcolreg = drm_fb_helper_setcolreg,
        .fb_fillrect = nv04_fbcon_fillrect,
        .fb_copyarea = nv04_fbcon_copyarea,
        .fb_imageblit = nv04_fbcon_imageblit,
@@ -126,7 +124,6 @@ static struct fb_ops nv50_fbcon_ops = {
        .owner = THIS_MODULE,
        .fb_check_var = drm_fb_helper_check_var,
        .fb_set_par = drm_fb_helper_set_par,
-       .fb_setcolreg = drm_fb_helper_setcolreg,
        .fb_fillrect = nv50_fbcon_fillrect,
        .fb_copyarea = nv50_fbcon_copyarea,
        .fb_imageblit = nv50_fbcon_imageblit,
index 93cc54fac33060c646d15b97eef2923dac4ad1d7..d3ed4afdbdee649f526f659789e631d537a44a7a 100644 (file)
@@ -52,7 +52,6 @@ static struct fb_ops radeonfb_ops = {
        .owner = THIS_MODULE,
        .fb_check_var = drm_fb_helper_check_var,
        .fb_set_par = drm_fb_helper_set_par,
-       .fb_setcolreg = drm_fb_helper_setcolreg,
        .fb_fillrect = cfb_fillrect,
        .fb_copyarea = cfb_copyarea,
        .fb_imageblit = cfb_imageblit,