QVGA on a hardware which supports only >= VGA

3 messages, 2 authors, 2011-12-02 · open the first message on its own page

QVGA on a hardware which supports only >= VGA

From: Christian Gmeiner <christian.gmeiner@gmail.com>
Date: 2011-11-18 12:01:00

Hi all,

I am currently in the process to get some local patches into mainline
and/or fix my
problems the right way. At the moment I am stuck with this problem:

I am on a device (x86), which is Geode lx800 based and there is a
panel connected to
it. The problem is that two different screen resolutions are used. QVGA and VGA.
Should not sound like a problem, but the lx800 can only do VGA. So get
it working,
I need to pass the correct resolution via kernel cmd to the lxfb
driver and I am using
this patch (based on 2.6.36.4 kernel):
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1050,6 +1050,7 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
 		ret = copy_to_user(argp, &var, sizeof(var)) ? -EFAULT : 0;
 		break;
 	case FBIOPUT_VSCREENINFO:
+#if 0
 		if (copy_from_user(&var, argp, sizeof(var)))
 			return -EFAULT;
 		if (!lock_fb_info(info))
@@ -1062,6 +1063,8 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
 		unlock_fb_info(info);
 		if (!ret && copy_to_user(argp, &var, sizeof(var)))
 			ret = -EFAULT;
+#endif
+		ret = 0;
 		break;
 	case FBIOGET_FSCREENINFO:
 		if (!lock_fb_info(info))
@@ -1086,6 +1089,7 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
 		ret = fb_cmap_to_user(&cmap_from, &cmap);
 		break;
 	case FBIOPAN_DISPLAY:
+#if 0
 		if (copy_from_user(&var, argp, sizeof(var)))
 			return -EFAULT;
 		if (!lock_fb_info(info))
@@ -1096,6 +1100,8 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
 		unlock_fb_info(info);
 		if (ret = 0 && copy_to_user(argp, &var, sizeof(var)))
 			return -EFAULT;
+#endif
+		ret = 0;
 		break;
 	case FBIO_CURSOR:
 		ret = -EINVAL;

I need to mention that I am using a custom BIOS and Linux based
bootloader (kexec) in the
boot process. At the moment I am looking into coreboot, but I wanted
to know how to
solve this "problem" the correct way.

To sum it up: I want to use a QVGA panel with a hardware that only
supports >= VGA.

Thanks
--
Christian Gmeiner, MSc

Re: QVGA on a hardware which supports only >= VGA

From: Christian Gmeiner <christian.gmeiner@gmail.com>
Date: 2011-11-22 13:52:14

ping
--
Christian Gmeiner, MSc



2011/11/18 Christian Gmeiner [off-list ref]:
quoted hunk
Hi all,

I am currently in the process to get some local patches into mainline
and/or fix my
problems the right way. At the moment I am stuck with this problem:

I am on a device (x86), which is Geode lx800 based and there is a
panel connected to
it. The problem is that two different screen resolutions are used. QVGA and VGA.
Should not sound like a problem, but the lx800 can only do VGA. So get
it working,
I need to pass the correct resolution via kernel cmd to the lxfb
driver and I am using
this patch (based on 2.6.36.4 kernel):
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1050,6 +1050,7 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
               ret = copy_to_user(argp, &var, sizeof(var)) ? -EFAULT : 0;
               break;
       case FBIOPUT_VSCREENINFO:
+#if 0
               if (copy_from_user(&var, argp, sizeof(var)))
                       return -EFAULT;
               if (!lock_fb_info(info))
@@ -1062,6 +1063,8 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
               unlock_fb_info(info);
               if (!ret && copy_to_user(argp, &var, sizeof(var)))
                       ret = -EFAULT;
+#endif
+               ret = 0;
               break;
       case FBIOGET_FSCREENINFO:
               if (!lock_fb_info(info))
@@ -1086,6 +1089,7 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
               ret = fb_cmap_to_user(&cmap_from, &cmap);
               break;
       case FBIOPAN_DISPLAY:
+#if 0
               if (copy_from_user(&var, argp, sizeof(var)))
                       return -EFAULT;
               if (!lock_fb_info(info))
@@ -1096,6 +1100,8 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
               unlock_fb_info(info);
               if (ret = 0 && copy_to_user(argp, &var, sizeof(var)))
                       return -EFAULT;
+#endif
+               ret = 0;
               break;
       case FBIO_CURSOR:
               ret = -EINVAL;

I need to mention that I am using a custom BIOS and Linux based
bootloader (kexec) in the
boot process. At the moment I am looking into coreboot, but I wanted
to know how to
solve this "problem" the correct way.

To sum it up: I want to use a QVGA panel with a hardware that only
supports >= VGA.

Thanks
--
Christian Gmeiner, MSc

Re: QVGA on a hardware which supports only >= VGA

From: James Simmons <hidden>
Date: 2011-12-02 17:57:44

2011/11/18 Christian Gmeiner [off-list ref]:
quoted
Hi all,

I am currently in the process to get some local patches into mainline
and/or fix my
problems the right way. At the moment I am stuck with this problem:

I am on a device (x86), which is Geode lx800 based and there is a
panel connected to
it. The problem is that two different screen resolutions are used. QVGA and VGA.
Should not sound like a problem, but the lx800 can only do VGA. So get
it working,
I need to pass the correct resolution via kernel cmd to the lxfb
driver and I am using
this patch (based on 2.6.36.4 kernel):
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1050,6 +1050,7 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
               ret = copy_to_user(argp, &var, sizeof(var)) ? -EFAULT : 0;
               break;
       case FBIOPUT_VSCREENINFO:
+#if 0
               if (copy_from_user(&var, argp, sizeof(var)))
                       return -EFAULT;
               if (!lock_fb_info(info))
@@ -1062,6 +1063,8 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
               unlock_fb_info(info);
               if (!ret && copy_to_user(argp, &var, sizeof(var)))
                       ret = -EFAULT;
+#endif
+               ret = 0;
               break;
       case FBIOGET_FSCREENINFO:
               if (!lock_fb_info(info))
@@ -1086,6 +1089,7 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
               ret = fb_cmap_to_user(&cmap_from, &cmap);
               break;
       case FBIOPAN_DISPLAY:
+#if 0
               if (copy_from_user(&var, argp, sizeof(var)))
                       return -EFAULT;
               if (!lock_fb_info(info))
@@ -1096,6 +1100,8 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
               unlock_fb_info(info);
               if (ret == 0 && copy_to_user(argp, &var, sizeof(var)))
                       return -EFAULT;
+#endif
+               ret = 0;
               break;
       case FBIO_CURSOR:
               ret = -EINVAL;

I need to mention that I am using a custom BIOS and Linux based
bootloader (kexec) in the
boot process. At the moment I am looking into coreboot, but I wanted
to know how to
solve this "problem" the correct way.

To sum it up: I want to use a QVGA panel with a hardware that only
supports >= VGA.
That breaks the userland interface. What exactly is breaking? It looks 
like a userland app is causing the headaches.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help