linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@softhome.net>
To: benh@kernel.crashing.org, adaplas@pol.net
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: [PATCH] DDC2/I2C Support
Date: Tue, 6 Jan 2004 08:31:53 +0800	[thread overview]
Message-ID: <200401060831.53054.adaplas@softhome.net> (raw)
In-Reply-To: <1073339963.780.93.camel@gaston>

On Tuesday 06 January 2004 05:59, Benjamin Herrenschmidt wrote:

>
> So you choose to get away from the linux i2c infrastructure ?

I already looked at your tree.  After some thought, I agree with both of you 
(Kronos) that i2c/ddc2 should be driver specific.  I'll remove the generic 
fbi2c interface.

>
> > 2. [fbmon.c]: Consolidated different ways of getting EDID with the
> > following function:
> >
> > 	unsigned char *fb_get_edid(struct fb_info *info, struct pci_dev *pdev,
> > int what)
> >
> > 		the parameter "what" can be:
> > 			EDID_DDC2 - get EDID via DDC2/I2C fb_get_edid_from_ddc2()
> >			EDID_ARCH - get	EDID via BIOS or OF get_EDID_from_{OF|BIOS}()
>
> The later is very card-specific... I don't think it can be abstracted.
> Also, if you look at the new radeonfb, you'll notice that the BIOS
> search has actually more than one way of getting to the EDID and
> may gather more than just the EDID (panel power delay, panel fixed
> dividers, etc...) Also, the OF parsing code cannot easily be abstracted
> as the OF driver for different type of cards do things differently.
>
> Hrm... reading your actual patch, I see that you are actually doing
> this BIOS call to get it, not parsing the BIOS image. Ok, that may
> be interesting...
>

There was the patch I submitted some 8 months ago and has been in the kernel 
since linux-2.5.x.  For X86, it will get the EDID block via VBE calls before 
the kernel goes to protected mode.  This is used by get_EDID_from_BIOS() in 
fbmon.c. Actual code is in boot/arch/i386/boot/video.S[store_edid]

Currently, it's always compiled in and some people reported problems with it 
(like taking 5 minutes to boot - probably BIOS using DDC1). I just added a 
kernel config for it so people can choose to compile it out.  However, with 
most drivers still not having DDC/I2C support, it's an easy way of getting 
the EDID block.

> Also, the former need a way to tell on which port we want the EDID,
> and the EDID code may need a bit more than juts that "get EDID" (look
> the other bit banging done to the i2c registers in radeonfb).
>
> I'd actually keep all that in the driver...
>
> > 	2.a getting EDID from the BIOS is now configurable (CONFIG_EDID_BIOS)
> > since some people reported problems during booting or it takes a long
> > time for the process to finish.
>
> This is about using the VESA BIOS at boot or scanning the ROM image ?

This is about getting the EDID using VBE calls while in real mode. 

>
> > 4. [fbmon.c]: Extended struct fb_monspecs to include display information
> > specified in EDID.
> >
> > 	Use function
> > 		void fb_get_monspecs(unsigned char *edid, struct fb_monspecs *specs)
>
>  .../...
>
> Can we define a "parsed_EDID" structure or whatever we call it that
> contains the list of modes, the monspecs, and other informations
> obtained from the EDID all at once ? I also need the display model
> name and vendor for example (to deal with some "fixups"). it would
> be convenient to have one single parsing pass extracting all the
> informations to one structure...
>

Ok, this should not be hard.

> > --------------------------------------------------------
> >
> > 5. [fbcon.c]: Minor fixes on the cursor and scrolling.
>
> That pops up something else in my mind... Shouldn't we take the console
> sempahore when doing cursor ops in the workqueue ?

I believe so.  I'm not sure where to start though. info->fb_cursor is called 
by at least two functons (fbcon_cursor, fb_flash_cursor), and I don't see any 
form of locking, especially for the data in info->cursor which is constantly 
being modified by one and read by another.

>
> In my tree, I have moved the VT blanking code out of the timer to a
> workqueue as well and fixed other VT stuffs to make sure we always
> have the console semaphore when getting to fbdev's. The current
> "lock-less" state of the whole thing is scary...
>

Yes :-(.

> > 6. [RIVAFB]:
> >
> > 	a. Implemented I2C/DDC2 support.  Changing video modes should be more
> > robust even when using stty.
>
> I strongly suggest that you look at what I've done for radeonfb and stty
> in my tree with FB_ACTIVATE_FIND and my mode search algorithm....

Ok. 

>
> > 	b. fixed various hardware cursor corruption
> > 	c. fixed maximum yres_virtual.  Hardware accel engine will crash if blit
> > rectangle dimensions/origin exceeds 0x7fff.
> > 	d. added new boot parameter, "strictmode", to force driver to use only
> > modes specified in the EDID block.
>
> Boot parameters are evil... we should default to the "right" way whenever
> possible. Let's make sure we properly deal with either complete modes

Evil, yes, but for now, necessary. Until the stty fix (and the 
FB_ACTIVATE_FIND) is accepted by James, I will need this new boot parameter. 
 
I'll submit a new patch (without the fbi2c code) by next week.  Still too busy 
to work full time with fbdev.

Tony


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click

  parent reply	other threads:[~2004-01-06  0:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 14:31 [PATCH] DDC2/I2C Support adaplas
     [not found] ` <20040105171639.GA7048@dreamland.darkstar.lan>
2004-01-06  0:31   ` Antonino A. Daplas
     [not found] ` <1073339963.780.93.camel@gaston>
2004-01-06  0:31   ` Antonino A. Daplas [this message]
2004-01-06  0:42     ` Benjamin Herrenschmidt
2004-01-06  0:37 ` Benjamin Herrenschmidt

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=200401060831.53054.adaplas@softhome.net \
    --to=adaplas@softhome.net \
    --cc=adaplas@pol.net \
    --cc=benh@kernel.crashing.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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).