projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
video
/
s1d13xxxfb.c
diff --git
a/drivers/video/s1d13xxxfb.c
b/drivers/video/s1d13xxxfb.c
index 789de13f461f689280e2b94c78b50c18387bfe0f..fa98d91c42eb2cd858b516fdcc384833094672b1 100644
(file)
--- a/
drivers/video/s1d13xxxfb.c
+++ b/
drivers/video/s1d13xxxfb.c
@@
-67,12
+67,18
@@
static struct fb_fix_screeninfo __devinitdata s1d13xxxfb_fix = {
static inline u8
s1d13xxxfb_readreg(struct s1d13xxxfb_par *par, u16 regno)
{
static inline u8
s1d13xxxfb_readreg(struct s1d13xxxfb_par *par, u16 regno)
{
+#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) || defined(CONFIG_PLAT_MAPPI3)
+ regno=((regno & 1) ? (regno & ~1L) : (regno + 1));
+#endif
return readb(par->regs + regno);
}
static inline void
s1d13xxxfb_writereg(struct s1d13xxxfb_par *par, u16 regno, u8 value)
{
return readb(par->regs + regno);
}
static inline void
s1d13xxxfb_writereg(struct s1d13xxxfb_par *par, u16 regno, u8 value)
{
+#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) || defined(CONFIG_PLAT_MAPPI3)
+ regno=((regno & 1) ? (regno & ~1L) : (regno + 1));
+#endif
writeb(value, par->regs + regno);
}
writeb(value, par->regs + regno);
}
@@
-259,7
+265,11
@@
s1d13xxxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
dbg("s1d13xxxfb_setcolreg: pseudo %d, val %08x\n",
regno, pseudo_val);
dbg("s1d13xxxfb_setcolreg: pseudo %d, val %08x\n",
regno, pseudo_val);
+#if defined(CONFIG_PLAT_MAPPI)
+ ((u32 *)info->pseudo_palette)[regno] = cpu_to_le16(pseudo_val);
+#else
((u32 *)info->pseudo_palette)[regno] = pseudo_val;
((u32 *)info->pseudo_palette)[regno] = pseudo_val;
+#endif
break;
case FB_VISUAL_PSEUDOCOLOR:
break;
case FB_VISUAL_PSEUDOCOLOR:
@@
-645,7
+655,7
@@
bail:
}
#ifdef CONFIG_PM
}
#ifdef CONFIG_PM
-static int s1d13xxxfb_suspend(struct device *dev,
u32
state, u32 level)
+static int s1d13xxxfb_suspend(struct device *dev,
pm_message_t
state, u32 level)
{
struct fb_info *info = dev_get_drvdata(dev);
struct s1d13xxxfb_par *s1dfb = info->par;
{
struct fb_info *info = dev_get_drvdata(dev);
struct s1d13xxxfb_par *s1dfb = info->par;