Ticket #2255 (closed defect: fixed)

Opened 10 years ago

Last modified 2 years ago

xf86-video-glamo/703acea13: xrandr -o 1; xrandr -o 3 causes distortion

Reported by: lindi Owned by: openmoko-devel
Priority: high Milestone: stable-kernel-2009.1
Component: unknown Version: unspecified
Severity: normal Keywords:
Cc: lars@…, balajirrao@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: yes PatchReviewResult:
Reproducible: always

Description

[ I hope it is appropriate to use docs.openmoko.org for Xorg driver bugs even though openmoko inc. is not shipping it yet. ]

Steps to reproduce:
1) xrandr -o 1
2) xrandr -o 3

Expected results:
2) http://iki.fi/lindi/openmoko/xf86-video-glamo/xrandr-o3-distortion/03080002.jpg

Actual results:
2) http://iki.fi/lindi/openmoko/xf86-video-glamo/xrandr-o3-distortion/03080001.jpg

More info:
1) If I do "xrandr -o 0; xrandr -o 3" I don't hit this problem.
2) kernel is from andy-tracking c1b03e4da
3) X is from debian experimental, xserver-xorg-core 2:1.5.99.902-1
4) xf86-video-glamo is 703acea13

Attachments

PIC1.png (170.4 KB) - added by wendy_hung 10 years ago.
PIC2.png (137.8 KB) - added by wendy_hung 10 years ago.
fix-xglamo-hack.patch (7.0 KB) - added by arhuaco 10 years ago.
Patch that makes Xglamo workaround opt-out.

Change History

comment:1 Changed 10 years ago by lars

I can't repoduce the problem. But it looks a lot like an old kernel bug, which should have been fixed.
Whats the content of /sys/class/graphics/fb0/{stride,virtual_size} before and after the rotation?
Does the problem also occur if you use Xglamo?

comment:2 Changed 10 years ago by lindi

lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
480,1280
lindi@ginger:~$ xrandr -o 1
lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
1280,480
lindi@ginger:~$ xrandr -o 3
# now graphics looks distorted
lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
960,640

With Xglamo "xrandr -o 1; xrandr -o 3" does not show broken data but I don't see icewm taskbar even with "-o 1" anymore. Also, if I after that do "xrandr -o 0; xrandr -o 1" I get WSOD with Xglamo.

If I do a fresh start of Xorg and do only "xrandr -o 3" the graphics looks ok and sysfs says

$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
1280,480

comment:3 Changed 10 years ago by lindi

I reverted kernel commmits

c2c300c5484a7100cc17fc6e3ff8c6822dcf7998
8e07543735b1b180ff45993f0e3cc82dad8142ea
6bf861ed654ff59cdf8829e47d6b7361c40f75ba

and now the problem does not seem to occur:

lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
480,1280
lindi@ginger:~$ xrandr -o 1
lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
1280,480
lindi@ginger:~$ xrandr -o 3
lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
1280,480

comment:4 Changed 10 years ago by lindi

It seems that a side-effect of reverting the kernel commits is that "shutdown -h now" now does not succeed since Xorg is stuck in uninterruptible sleep (wchan = sync_page).

comment:5 Changed 10 years ago by lindi

I reverted only 6bf861ed654ff59cdf8829e47d6b7361c40f75ba and I can still see the bug on screen and in the output of virtual_size:

lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
960,640
lindi@ginger:~$ xrandr -o 1
lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
640,960
lindi@ginger:~$ xrandr -o 3
lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
480,1280

Now also /etc/init.d/xdm stop works normally.

comment:6 follow-up: ↓ 13 Changed 10 years ago by lindi

I reverted now both 8e07543735b1b180ff45993f0e3cc82dad8142ea and 6bf861ed654ff59cdf8829e47d6b7361c40f75ba and everything seems to work normally:

lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
480,1280
lindi@ginger:~$ xrandr -o 1
lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
1280,480
lindi@ginger:~$ xrandr -o 3
lindi@ginger:~$ head /sys/class/graphics/fb0/{stride,virtual_size}
==> /sys/class/graphics/fb0/stride <==
960

==> /sys/class/graphics/fb0/virtual_size <==
1280,480

This means that we have narrowed the bug down to commit:

commit 8e07543735b1b180ff45993f0e3cc82dad8142ea
Author: Balaji Rao <balajirrao@openmoko.org>
Date:   Thu Jan 29 18:25:32 2009 +0000

    Subject: glamo_fix_improper_xrandr_geometry_setting.patch
    X-Git-Url: http://git.openmoko.org/?p=kernel.git;a=commitdiff_plain;h=3b09161ffa5f29870d1f2cab1442f79ff2017b69
    
    glamo_fix_improper_xrandr_geometry_setting.patch
    
    Switching to xrandr -o 3 from xrandr -o 1 caused the screen to look crazy
    because of the way lcd geometry is set in glamo. This patch fixes it.
    
    Signed-off-by: Balaji Rao <balajirrao@openmoko.org>

I'add add balajirrao to Cc but I don't seem to have permissions to do that. I'm sending him email instead.

comment:7 Changed 10 years ago by lars

8e07543735b1b180ff45993f0e3cc82dad8142ea seems to try to fix some Xglamo bugs in the kernel driver. This is a really really bad idea and I don't think I'm going to re-implement bugs seen in Xglamo just to be compatible with the kernel driver.

comment:8 Changed 10 years ago by andy

  • Cc balajirrao@… added

If it's better to fix these issues in Xglamo, who is going to do that? It's out of scope for Balaji and myself.

It's fine if someone will commit to that, we will reduce Balaji's patch down to what it usefully otherwise corrects if anything.

But the problem Balaji's fixing there is reported as a Kernel regression IIRC "that worked on 2.6.24".

Changed 10 years ago by wendy_hung

Changed 10 years ago by wendy_hung

comment:9 Changed 10 years ago by wendy_hung

the picture looks like what we got
Tried update the image today(2009/03/10), the same device have different behave (see PIC1-duplicate screen and wite noise/PIC2-white bar only )

this bug might relate with #1336

comment:10 Changed 10 years ago by lars

If it's better to fix these issues in Xglamo, who is going to do that?

Not sure, who's maintaining Xglamo?

But the problem Balaji's fixing there is reported as a Kernel regression IIRC "that worked on 2.6.24".

What he was trying to fix is that "xrandr -o 1; xrandr -o 3" was causing the same problem with Xglamo that its now causing with xf86-video-glamo. And IIRC that bug was also present on 2.6.24.

this bug might relate with #1336

Nope, it's a different cause with the same result (width and height swapped).

comment:11 Changed 10 years ago by lindi

What's the status of this bug? Couldn't we just have a kernel configuration option to disable/enable this workaround if we still want to support Xglamo but nobody has time to fix Xglamo itself. CONFIG_WORKAROUND_BUGGY_XGLAMO, anyone?

comment:12 Changed 10 years ago by arhuaco

This is out of scope for me also. If we know exactly what the workaround is and someone wants to fix in where it should be fixed I think we could add the .config option. Now the question is: who is going to fix Xglamo(whatever needs to be fixed)?

I also guess we can delay this change until we actually need it. Right?

comment:13 in reply to: ↑ 6 Changed 10 years ago by arhuaco

Replying to lindi:

I reverted now both 8e07543735b1b180ff45993f0e3cc82dad8142ea and 6bf861ed654ff59cdf8829e47d6b7361c40f75ba and everything seems to work normally:

Ok. We talked on IRC about this. The current status is:

  • We can not remove the workaround because people might depend on it now.
  • We will make it opt-out, probably with a /sysfs entry. That could help development.
  • I'll add this task to my TODO list. If in a week or so nobody has done it I'll do it.

comment:14 Changed 10 years ago by arhuaco

  • Priority changed from highest to high
  • Milestone set to stable-kernel-2009.1

Changed 10 years ago by arhuaco

Patch that makes Xglamo workaround opt-out.

comment:15 Changed 10 years ago by arhuaco

  • HasPatchForReview set

I couldn't test this patch in Debian because my bootstrapped failed. I gotta sleep now and I'll test it later. If you can test it before please do...

I think it should work because I remember the original bug and it is still there when I disable the workaround with:

echo 0 > /sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-regltr.9/glamo3362.0/glamo-fb.0/xglamo_hack

BTW, I should rename this entry to xglamo_workaround.

comment:16 Changed 10 years ago by arhuaco

I tried with this old version and I got some corruption even with the workaround disabled.
http://www.ginguppin.de/node/23

Could you send me your xf86-video-glamo binary?

I wouldn't like to compile it (is there a HOWTO somewhere?). Do I need to build OE in order to compile it?

comment:17 Changed 10 years ago by lindi

You can get the binary and source from my unofficial debian repository at

http://iki.fi/lindi/debian/pool/main/x/xf86-video-glamo/

As you can see from debian/rules the package is built with just

autoreconf -i
./configure
make
make install

with dependencies

Build-Depends: debhelper (>= 7), pkg-config, xserver-xorg-dev (>= 2:1.5.99.901), x11proto-core-dev, x11proto-fonts-dev, x11proto-randr-dev, x11proto-render-dev, x11proto-video-dev, automake, libtool, xutils-dev

comment:18 Changed 10 years ago by arhuaco

More data. With b8b36e5ec3db71d5 "xrandr -o 1; xrandr -o 3" causes a WSOD here while using Xorg. (GTA02v6).

I'm using u-boot. Given the recent information we have from #2274 about a WSOD happening with u-boot and not with Qi I guess I should test with Qi now. I will work on it now...

comment:19 Changed 10 years ago by arhuaco

  • Status changed from new to closed
  • Resolution set to fixed

I finally tested the patch as I should have tested it and it works. Please disregard my previous update about this bug.

Thanks to this issue I tried Qi, I have Debian now and I tried Xorg. Who said all issues are bad? :-)

The patch is in andy-tracking now.

comment:20 Changed 10 years ago by lindi

I can still hit this bug with andy-tracking b4136a36f31a65d0 from today. Is there some extra information I should provide?

comment:21 Changed 10 years ago by arhuaco

Did you try this before running Xorg?

echo 0 > /sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-regltr.9/glamo3362.0/glamo-fb.0/xglamo_hack

It can also be disabled in the .config.

comment:22 Changed 10 years ago by lindi

No sorry, I forgot that. I added
echo 0 > /sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-regltr.9/glamo3362.0/glamo-fb.0/xglamo_hack
to /etc/init.d/xdm and now I can do not hit this bug anymore with b4136a36f31a65d0, thanks a lot!

comment:23 Changed 2 years ago by RoberMync

Sildenafil En Ligne 10 Mg <a href=http://viag1.xyz/generic-viagra-buy.php>Generic Viagra Buy</a> Effet Cialis Viagra Nitrofurantoin Mono Mcr 100myl <a href=http://zol1.xyz/zoloft-cheap.php>Zoloft Cheap</a> Propecia Calorias Cialis Usa <a href=http://cial5mg.xyz/purchase-cialis.php>Purchase Cialis</a> Potenzmittel Levitra Comparaison Prix Viagra Cialis <a href=http://zol1.xyz/zoloft-free-trial.php>Zoloft Free Trial</a> Generico Viagra Farmacia Cheap Sildenafil <a href=http://viag1.xyz/cheap-viagra-on-line.php>Cheap Viagra On Line</a> Acheter Baclofene Suisse Cialis Belgique Sans Ordonnance <a href=http://zol1.xyz/buy-generic-zoloft-online.php>Buy Generic Zoloft Online</a> Est Bid <a href=http://viag1.xyz/sildenafil-100mg.php>Sildenafil 100mg</a> Que Es Cialis Super Active Amoxicilina Cash On Delivery <a href=http://priligy.ccrpdc.com/pastilla-priligy.php>Pastilla Priligy</a> Ou Acheter Le Viagra En Belgique Vente De Cialis Sur Le Net <a href=http://kama1.xyz/buy-kamagra-online-cheap.php>Buy Kamagra Online Cheap</a> Furadoine 50mg Uk Viagra Pills In Mexico <a href=http://priligy.ccrpdc.com/priligy-pastillas.php>Priligy Pastillas</a> Pay With Check By Phone Site Fiable Achat Cialis <a href=http://cial1.xyz/tadalafil.php>?Tadalafil</a> Buying Amoxicilina No Physician Approval Free Shipping Shop Como Puedo Comprar Viagra Sin Receta <a href=http://zol1.xyz/sertraline-no-prescription.php>Sertraline No Prescription</a> Propecia Generic Finasteride Hair Loss Propranolol Online Delivered In Usa <a href=http://zol1.xyz>Buy Zoloft</a> Priligy Och Viagra Preis Viagra Frau <a href=http://viag1.xyz/low-price-viagra.php>Low Price Viagra</a> Dose Amoxicillin Child Throat Baclofene En Belgique <a href=http://antabuse.ccrpdc.com/low-cost-antabuse-online.php>Low Cost Antabuse Online</a> Buy Isotretinoin Without Perscription Mail Order Finasteride Mastercard <a href=http://zol1.xyz/map.php>Zoloft Online Usa</a> Super Kamagra Billig Dyes Amoxicillin Cancer <a href=http://kama1.xyz/cheap-kamagra-no-rx.php>Cheap Kamagra No Rx</a> Cheap Kamagra Oral Jelly Online Amoxicillin Trying To Conceive <a href=http://zol1.xyz/generic-zoloft.php>Generic Zoloft</a> Achat Cialis En Belgique Acquistare Viagra Pfizer <a href=http://viag1.xyz/real-viagra-online.php>Real Viagra Online</a> Cialis 5 Mg Precio Espana Tadalafil Generic Best Prices <a href=http://zithromax.ccrpdc.com/cheap-zithromax-on-line.php>Cheap Zithromax On Line</a> Kamagra Reviews Cephalexin And Side Effects In Children <a href=http://cial1.xyz/online-cialis.php>Online Cialis</a> Acquistare Levitra Generico Italia Amoxicillin Ear Infection <a href=http://cial5mg.xyz/tadalafil-online.php>Tadalafil Online</a> Priligy Espana Precio Viagra Super Active Plus Review <a href=http://kama1.xyz/buy-kamagra-online-cheap.php>Buy Kamagra Online Cheap</a> Achat Cialis 5mg Who Makes Zithromax <a href=http://zol1.xyz/cheap-zoloft.php>Cheap Zoloft</a> Comprar Cialis 20 Mg Original Cialis In Der Apotheke Kaufen <a href=http://cial1.xyz/shop-cialis-online.php>Shop Cialis Online</a> Forum Levitra Pas Cher Steroids Cycle With Nolvadex <a href=http://cialis.ccrpdc.com/cheap-cialis.php>Cheap Cialis</a> Cephalexin Genrx Viagra Rezeptfrei Frankreich <a href=http://viagra.ccrpdc.com/cheap-viagra-25mg.php>Cheap Viagra 25mg</a> buy accutane mastercard Hpb Approved Generic Viagra In Canada <a href=http://kama1.xyz/buy-cheap-kamagra.php>Buy Cheap Kamagra</a> Canine Cephalexin Drug Info isotretinoin 20mg <a href=http://cial1.xyz/low-cost-cialis-online.php>Low Cost Cialis Online</a> Jelly Kamagra Propiedades De Propecia <a href=http://propecia.ccrpdc.com/how-much-is-propecia.php>How Much Is Propecia</a> Where To Buy Valtrex Online Healthmedicalcare Biz <a href=http://cial5mg.xyz/online-cialis.php>Online Cialis</a> Costo Levitra 10 Mg In Farmacia Cialis At Discount <a href=http://kama1.xyz/order-kamagra-in-usa.php>Order Kamagra In Usa</a> Robaxin No Prescription Canada Cialis Cuanto Tiempo Antes <a href=http://zol1.xyz/zoloft-online.php>Zoloft Online</a> Amoxicillin Maculopapular Virus Levitra Without A Rx <a href=http://priligy.ccrpdc.com/dapoxetine-priligy.php>Dapoxetine Priligy</a> Cephalexin Dose For 200 Pounds Zithromax For Animals <a href=http://cial1.xyz/map.php>Buying Cialis Online</a> Levitra Zonder Recept Commande Cialis France <a href=http://zol1.xyz/order-generic-zoloft.php>Order Generic Zoloft</a> Amoxicillin Rash From Mono

Note: See TracTickets for help on using tickets.