Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH] video: msmfb: Put the partial update magic value into the fix_screen struct.
@ 2011-02-25 21:05 Carl Vanderlip
  2011-02-26 12:31 ` [PATCH] video: msmfb: Put the partial update magic value into Janorkar, Mayuresh
  0 siblings, 1 reply; 2+ messages in thread
From: Carl Vanderlip @ 2011-02-25 21:05 UTC (permalink / raw)
  To: davidb
  Cc: Dima Zavin, open list:ARM/QUALCOMM MSM...,
	open list:FRAMEBUFFER LAYER, open list

From: Dima Zavin <dima@android.com>

This can then be tested by userspace to see if the capability is supported.
Userspace cannot rely on that value being left in var_screen, since userspace
itself can change it.

---
 drivers/video/msm/msm_fb.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/video/msm/msm_fb.c b/drivers/video/msm/msm_fb.c
index 5436aeb..bbf841e 100644
--- a/drivers/video/msm/msm_fb.c
+++ b/drivers/video/msm/msm_fb.c
@@ -469,6 +469,14 @@ static void setup_fb_info(struct msmfb_info *msmfb)
 	fb_info->var.yoffset = 0;
 
 	if (msmfb->panel->caps & MSMFB_CAP_PARTIAL_UPDATES) {
+		/* set the param in the fixed screen, so userspace can't
+		 * change it. This will be used to check for the
+		 * capability. */
+		fb_info->fix.reserved[0] = 0x5444;
+		fb_info->fix.reserved[1] = 0x5055;
+
+		/* This preloads the value so that if userspace doesn't
+		 * change it, it will be a full update */
 		fb_info->var.reserved[0] = 0x54445055;
 		fb_info->var.reserved[1] = 0;
 		fb_info->var.reserved[2] = (uint16_t)msmfb->xres |
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-26 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 21:05 [PATCH] video: msmfb: Put the partial update magic value into the fix_screen struct Carl Vanderlip
2011-02-26 12:31 ` [PATCH] video: msmfb: Put the partial update magic value into Janorkar, Mayuresh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox