Skip to contentSkip to conversation

omapfb: setting GOLCD bit for shadow registers to make effect

PATCH In review arun c 4 participants 5 messages Sep 8, 2008 – Sep 9, 2008 Framebuffer layer

lore
Share & tools
lore

arun c

author
#0 lore raw

PATCH 1/1 omapfb: setting GOLCD bit for shadow registers to make effect

A shadow register change has no direct effect on the display configuration until the GOLCD (DISPC_CONTROL[5]) is set.

---
 drivers/video/omap/dispc.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/video/omap/dispc.c +5 -0
index 82ba030..2e7af85 100644
@@ -436,6 +436,11 @@ static inline int _setup_plane(int plane, int channel_out,
 
 	dispc_write_reg(ri_reg[plane], (screen_width - width) * bpp / 8 + 1);
 
+	/* Wait untill GOLCD bit is cleared and set it */
+	while (dispc_read_reg(DISPC_CONTROL) & (1 << 5))
+		continue;
+	MOD_REG_FLD(DISPC_CONTROL, 1 << 5, 1 << 5);
+
 	return height * screen_width * bpp / 8;
 }
 
Signature · 1 line
1.5.3.4
#1 lore raw
Quoted 13 lines · arun c

A shadow register change has no direct effect on the display configuration until the GOLCD (DISPC_CONTROL[5]) is set.

---
 drivers/video/omap/dispc.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/video/omap/dispc.c +0 -0
index 82ba030..2e7af85 100644

drivers/video/omap/dispc.c static inline int _setup_plane(int plane, int channel_out, · line 439

Quoted 4 lines
drivers/video/omap/dispc.c +1 -0
@@ -436,6 +436,11 @@ static inline int _setup_plane(int plane, int channel_out,
 
 	dispc_write_reg(ri_reg[plane], (screen_width - width) * bpp / 8 + 1);
 
+	/* Wait untill GOLCD bit is cleared and set it */

Nit: "until" (one l)

drivers/video/omap/dispc.c static inline int _setup_plane(int plane, int channel_out, · line 445

Quoted 6 lines
drivers/video/omap/dispc.c +4 -0
+	while (dispc_read_reg(DISPC_CONTROL) & (1 << 5))
+		continue;
+	MOD_REG_FLD(DISPC_CONTROL, 1 << 5, 1 << 5);
+
 	return height * screen_width * bpp / 8;
 }

This looks good. However, the same thing is needed in omap_dispc_enable_plane() as well. Placing the loop+set in a function (go_lcd()?) would make sense.

Signature · 7 lines
Måns Rullgård
[email protected]

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 29 lines · Måns Rullgård
Quoted 13 lines · arun c

A shadow register change has no direct effect on the display configuration until the GOLCD (DISPC_CONTROL[5]) is set.

---
 drivers/video/omap/dispc.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/video/omap/dispc.c +0 -0
index 82ba030..2e7af85 100644

drivers/video/omap/dispc.c static inline int _setup_plane(int plane, int channel_out, · line 439

Quoted 4 lines
drivers/video/omap/dispc.c +1 -0
@@ -436,6 +436,11 @@ static inline int _setup_plane(int plane, int channel_out,
 
      dispc_write_reg(ri_reg[plane], (screen_width - width) * bpp / 8 + 1);
 
+     /* Wait untill GOLCD bit is cleared and set it */

Nit: "until" (one l)

drivers/video/omap/dispc.c static inline int _setup_plane(int plane, int channel_out, · line 445

Quoted 6 lines
drivers/video/omap/dispc.c +4 -0
+     while (dispc_read_reg(DISPC_CONTROL) & (1 << 5))
+             continue;
+     MOD_REG_FLD(DISPC_CONTROL, 1 << 5, 1 << 5);
+
      return height * screen_width * bpp / 8;
 }
Quoted 4 lines

This looks good. However, the same thing is needed in omap_dispc_enable_plane() as well. Placing the loop+set in a function (go_lcd()?) would make sense.

Thanks.
Yes that will be nice, I still see modification of shadow registers in some more places with out issuing a GOLCD. I agree the best method is to make it a function

Quoted 9 lines

--
Måns Rullgård
[email protected]

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to Måns Rullgård
Quoted 11 lines · ext Måns Rullgård

drivers/video/omap/dispc.c static inline int _setup_plane(int plane, int channel_out, · line 445

Quoted 6 lines · arun c
drivers/video/omap/dispc.c +4 -0
+	while (dispc_read_reg(DISPC_CONTROL) & (1 << 5))
+		continue;
+	MOD_REG_FLD(DISPC_CONTROL, 1 << 5, 1 << 5);
+
 	return height * screen_width * bpp / 8;
 }

This looks good. However, the same thing is needed in omap_dispc_enable_plane() as well. Placing the loop+set in a function (go_lcd()?) would make sense.

Preferably something with a slightly more generic name, so it could also fire GODIGITAL for digital out, when support for that exists.

Cheers,
Daniel

#4 lore raw
Quoted 13 lines · Daniel Stone
Quoted 11 lines · ext Måns Rullgård

drivers/video/omap/dispc.c static inline int _setup_plane(int plane, int channel_out, · line 445

Quoted 6 lines · arun c
drivers/video/omap/dispc.c +4 -0
+	while (dispc_read_reg(DISPC_CONTROL) & (1 << 5))
+		continue;
+	MOD_REG_FLD(DISPC_CONTROL, 1 << 5, 1 << 5);
+
 	return height * screen_width * bpp / 8;
 }

This looks good. However, the same thing is needed in omap_dispc_enable_plane() as well. Placing the loop+set in a function (go_lcd()?) would make sense.

Quoted 2 lines

Preferably something with a slightly more generic name, so it could also fire GODIGITAL for digital out, when support for that exists.

I agree; didn't think of that at first.

Signature · 6 lines
Måns Rullgård
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html