diff options
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/fbtft/fb_ssd1331.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/fbtft/fb_ssd1331.c b/drivers/staging/fbtft/fb_ssd1331.c index 9aa9864fcf30..e4a759b54ba0 100644 --- a/drivers/staging/fbtft/fb_ssd1331.c +++ b/drivers/staging/fbtft/fb_ssd1331.c @@ -26,7 +26,13 @@ static int init_display(struct fbtft_par *par) par->fbtftops.reset(par); write_reg(par, 0xae); /* Display Off */ - write_reg(par, 0xa0, 0x70 | (par->bgr << 2)); /* Set Colour Depth */ + + /* Set Column Address Mapping, COM Scan Direction and Colour Depth */ + if (par->info->var.rotate == 180) + write_reg(par, 0xa0, 0x60 | (par->bgr << 2)); + else + write_reg(par, 0xa0, 0x72 | (par->bgr << 2)); + write_reg(par, 0x72); /* RGB colour */ write_reg(par, 0xa1, 0x00); /* Set Display Start Line */ write_reg(par, 0xa2, 0x00); /* Set Display Offset */ |