linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-kernel@vger.kernel.org, Harald Welte <laforge@gnumonks.org>,
	Deepak Saxena <dsaxena@laptop.org>,
	linux-fbdev@vger.kernel.org, JosephChan@via.com.tw,
	ScottFang@viatech.com.cn
Subject: Re: [PATCH 10/11] viafb: rework the I2C support in the VIA framebuffer
Date: Fri, 23 Apr 2010 23:21:58 +0000	[thread overview]
Message-ID: <4BD22B96.5020102@gmx.de> (raw)
In-Reply-To: <20100423165256.654ca5eb@bike.lwn.net>

Jonathan Corbet schrieb:
> On Sat, 24 Apr 2010 00:40:39 +0200
> Florian Tobias Schandinat <FlorianSchandinat@gmx.de> wrote:
> 
>> Actually that is probably a mistake on my side. I had the impression 
>> that it was much longer but didn't take into account that the old 
>> behaviour allowed the VGA console to work until viafb was completly 
>> loaded and fbcon took over while the new one immediately destroys the 
>> screen and shows random things until it is completely loaded. 
> 
> "New one" being new relative to what?  Is that change the result of the
> patches I've posted, or something else?

Relative to the patch we are talking about. With patches 01-09 applied 
it just works fine as it always did (no screen "destruction" on load, a 
working VGA console if unloaded as described earlier). With additionally 
patch 10 applied I get the weird behaviour I'm talking about.

>>> As for #2, I can certainly say that I've never unloaded this code, so
>>> that's an untested path.  I'll have a look and see if I can see
>>> anything obvious.  
>> Well as for the behaviour change described above I think the problem 
>> might be in the load path. At least when I faked an exit as when memory 
>> size detection or ioremapping fails (which is a very common issue that 
>> really needs a workaround) I get the same unusable VGA console. This 
>> needs to be fixed.
> 
> Interesting.  In the environment I've been working in the whole box is
> a brick if the framebuffer doesn't come up right.  But things are
> pretty solid on that front here.

Well the ioremapping fails when huge amount of video memory is available 
(128 MB and up) if no extra space is allocated the "vmalloc=" kernel 
option. To not require it we (a) should only remap the needed memory or 
(b) reduce the memory to be remapped until we succeed (or hit a too low 
value).

>> This whole I2C stuff seems incredibly unstable I even have indicators 
>> that the current code might be to blame for freezing the machine on some 
>> configurations with P4M900 IGP. I just try to prevent it to get even 
>> worse...
> 
> I have to say that i2c has often been the bane of my existence.  It
> seems like something that just barely works most of the time.
> 
> That said, it's been a long time since I've seen any trouble I could
> blame on i2c in the viafb driver.  It's *really* hard to imagine how
> it could free machines.  Unless, maybe, you're hitting some sort of
> race condition in all of those indexed I/O port operations.  But that
> looks like something which would be hard to do on most machines that
> would have these chipsets in them.

I don't know but a freeze reported due to viafb with viafb itself 
exiting due to ioremap failure can't have so much causes. Either we do 
something terribly wrong on the error out side (this might be possible 
regarding the current condition of error handling) or in the I2C setup 
which is done prior to remapping. The full story can be read on
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/539020

> The second series adds some locking around i2c port operations, but has
> not yet pushed that locking into the framebuffer side of the driver;
> that would be a good thing to do.
> 
> Meanwhile, I'm a little unsure now...is there an action item for me
> with regard to the i2c code?  I've been staring at it since your last
> note, but I couldn't find any obvious problems.  I do have to say that
> Harald's rework is far cleaner than what came before...

Well the main question is probably:
How does it change the behaviour towards the hardware?
I tend to think that OLPC might not be the only ones who did something 
weird with it....and we already know that we shouldn't trust the 
documentation too much.


Thanks,

Florian Tobias Schandinat

  reply	other threads:[~2010-04-23 23:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-18 18:21 [RFC] Initial OLPC Viafb merge (V2) Jonathan Corbet
2010-04-18 18:21 ` [PATCH 01/11] [FB] viafb: Fix various resource leaks during module_init() Jonathan Corbet
2010-04-18 18:21 ` [PATCH 02/11] viafb: use proper pci config API Jonathan Corbet
2010-04-18 18:21 ` [PATCH 03/11] viafb: Unmap the frame buffer on initialization error Jonathan Corbet
2010-04-18 18:21 ` [PATCH 04/11] viafb: Retain GEMODE reserved bits Jonathan Corbet
2010-04-18 18:21 ` [PATCH 05/11] viafb: Unify duplicated set_bpp() code Jonathan Corbet
2010-04-18 18:21 ` [PATCH 06/11] viafb: Determine type of 2D engine and store it in chip_info Jonathan Corbet
2010-04-18 18:21 ` [PATCH 07/11] viafb: complete support for VX800/VX855 accelerated framebuffer Jonathan Corbet
2010-04-18 18:21 ` [PATCH 08/11] viafb: Add 1200x900 DCON/LCD panel modes for OLPC XO-1.5 Jonathan Corbet
2010-04-18 18:21 ` [PATCH 09/11] viafb: Do not probe for LVDS/TMDS on " Jonathan Corbet
2010-04-23 20:56   ` Florian Tobias Schandinat
2010-04-23 21:09     ` Jonathan Corbet
2010-04-18 18:21 ` [PATCH 10/11] viafb: rework the I2C support in the VIA framebuffer driver Jonathan Corbet
2010-04-23 21:12   ` [PATCH 10/11] viafb: rework the I2C support in the VIA framebuffer Florian Tobias Schandinat
2010-04-23 21:57     ` [PATCH 10/11] viafb: rework the I2C support in the VIA Jonathan Corbet
2010-04-23 22:40       ` [PATCH 10/11] viafb: rework the I2C support in the VIA framebuffer Florian Tobias Schandinat
2010-04-23 22:52         ` [PATCH 10/11] viafb: rework the I2C support in the VIA Jonathan Corbet
2010-04-23 23:21           ` Florian Tobias Schandinat [this message]
2010-04-24 10:47             ` [PATCH 10/11] viafb: rework the I2C support in the VIA framebuffer Florian Tobias Schandinat
2010-04-24 13:33               ` [PATCH 10/11] viafb: rework the I2C support in the VIA Jonathan Corbet
2010-04-24 13:53                 ` Harald Welte
2010-04-25 14:38                   ` Jonathan Corbet
2010-04-25 15:56                     ` [PATCH 10/11] viafb: rework the I2C support in the VIA framebuffer Florian Tobias Schandinat
2010-04-26 19:40                       ` [PATCH 10/11] viafb: rework the I2C support in the VIA Jonathan Corbet
2010-04-18 18:21 ` [PATCH 11/11] suppress verbose debug messages: change printk() to DEBUG_MSG() Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BD22B96.5020102@gmx.de \
    --to=florianschandinat@gmx.de \
    --cc=JosephChan@via.com.tw \
    --cc=ScottFang@viatech.com.cn \
    --cc=corbet@lwn.net \
    --cc=dsaxena@laptop.org \
    --cc=laforge@gnumonks.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).