Commit f2047397 authored by Javier M. Mellid's avatar Javier M. Mellid Committed by Greg Kroah-Hartman

staging: sm7xxfb: code cleanup on smtcfb_setmode

Code cleanup on smtcfb_setmode.

Tested with SM712.
Signed-off-by: default avatarJavier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 128e8616
...@@ -565,17 +565,6 @@ void smtcfb_setmode(struct smtcfb_info *sfb) ...@@ -565,17 +565,6 @@ void smtcfb_setmode(struct smtcfb_info *sfb)
sfb->fb.var.red.offset = 16; sfb->fb.var.red.offset = 16;
sfb->fb.var.green.offset = 8; sfb->fb.var.green.offset = 8;
sfb->fb.var.blue.offset = 0; sfb->fb.var.blue.offset = 0;
break;
case 8:
sfb->fb.fix.visual = FB_VISUAL_PSEUDOCOLOR;
sfb->fb.fix.line_length = sfb->fb.var.xres;
sfb->fb.var.red.offset = 5;
sfb->fb.var.red.length = 3;
sfb->fb.var.green.offset = 2;
sfb->fb.var.green.length = 3;
sfb->fb.var.blue.offset = 0;
sfb->fb.var.blue.length = 2;
break; break;
case 24: case 24:
sfb->fb.fix.visual = FB_VISUAL_TRUECOLOR; sfb->fb.fix.visual = FB_VISUAL_TRUECOLOR;
...@@ -583,25 +572,30 @@ void smtcfb_setmode(struct smtcfb_info *sfb) ...@@ -583,25 +572,30 @@ void smtcfb_setmode(struct smtcfb_info *sfb)
sfb->fb.var.red.length = 8; sfb->fb.var.red.length = 8;
sfb->fb.var.green.length = 8; sfb->fb.var.green.length = 8;
sfb->fb.var.blue.length = 8; sfb->fb.var.blue.length = 8;
sfb->fb.var.red.offset = 16; sfb->fb.var.red.offset = 16;
sfb->fb.var.green.offset = 8; sfb->fb.var.green.offset = 8;
sfb->fb.var.blue.offset = 0; sfb->fb.var.blue.offset = 0;
break;
case 8:
sfb->fb.fix.visual = FB_VISUAL_PSEUDOCOLOR;
sfb->fb.fix.line_length = sfb->fb.var.xres;
sfb->fb.var.red.length = 3;
sfb->fb.var.green.length = 3;
sfb->fb.var.blue.length = 2;
sfb->fb.var.red.offset = 5;
sfb->fb.var.green.offset = 2;
sfb->fb.var.blue.offset = 0;
break; break;
case 16: case 16:
default: default:
sfb->fb.fix.visual = FB_VISUAL_TRUECOLOR; sfb->fb.fix.visual = FB_VISUAL_TRUECOLOR;
sfb->fb.fix.line_length = sfb->fb.var.xres * 2; sfb->fb.fix.line_length = sfb->fb.var.xres * 2;
sfb->fb.var.red.length = 5; sfb->fb.var.red.length = 5;
sfb->fb.var.green.length = 6; sfb->fb.var.green.length = 6;
sfb->fb.var.blue.length = 5; sfb->fb.var.blue.length = 5;
sfb->fb.var.red.offset = 11; sfb->fb.var.red.offset = 11;
sfb->fb.var.green.offset = 5; sfb->fb.var.green.offset = 5;
sfb->fb.var.blue.offset = 0; sfb->fb.var.blue.offset = 0;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment