* How to get SDA/SCL bit position in the control word register of the video card?
@ 2005-11-24 10:45 Vishal Linux
2005-11-24 10:53 ` Vojtech Pavlik
2005-11-25 19:33 ` Jean Delvare
0 siblings, 2 replies; 7+ messages in thread
From: Vishal Linux @ 2005-11-24 10:45 UTC (permalink / raw)
To: linux-kernel
Hello,
I am trying to communicate to the monitor eeprom to get the monitor
capabilities and for that i need to have SDA/SCL bit positions in the
control word register of the video card (to read and wrtie data using
i2c protocol).
Different video card vendors have different offsets for the control
word register and different bit positions for SDA/SCL.
I tried to use linux kernel API char* get_EDID_from_BIOS(void*) and
then using kgdb to debug the kernel module (that i wrote) to get the
same but failed to find the way to get the above.
I do have the offset of the control word register and Masking Value of
Intel and Matrox card but i would like NOT to hardcode the masking
value and the offset in my code. This will lead me to modify my code
for the different cards.
Is there any way to get the control word register's address (and then
SDA/SCL bit position) on the linux operating system. Is this
information available to linux kernel ?
FYI : Masking Value that i am referring to is the value that has to be
ANDed to the DATA(bit - 0/1) before writing it to Control word
register so that the right bit can be written on to the SDA/SCL lines.
Any pointers to this or your guidance would be highly appreciated.
warm regards,
Vishal Soni.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to get SDA/SCL bit position in the control word register of the video card?
2005-11-24 10:45 How to get SDA/SCL bit position in the control word register of the video card? Vishal Linux
@ 2005-11-24 10:53 ` Vojtech Pavlik
2005-11-25 19:33 ` Jean Delvare
1 sibling, 0 replies; 7+ messages in thread
From: Vojtech Pavlik @ 2005-11-24 10:53 UTC (permalink / raw)
To: Vishal Linux; +Cc: linux-kernel
On Thu, Nov 24, 2005 at 10:45:14AM +0000, Vishal Linux wrote:
> Hello,
>
>
> I am trying to communicate to the monitor eeprom to get the monitor
> capabilities and for that i need to have SDA/SCL bit positions in the
> control word register of the video card (to read and wrtie data using
> i2c protocol).
>
> Different video card vendors have different offsets for the control
> word register and different bit positions for SDA/SCL.
>
> I tried to use linux kernel API char* get_EDID_from_BIOS(void*) and
> then using kgdb to debug the kernel module (that i wrote) to get the
> same but failed to find the way to get the above.
>
> I do have the offset of the control word register and Masking Value of
> Intel and Matrox card but i would like NOT to hardcode the masking
> value and the offset in my code. This will lead me to modify my code
> for the different cards.
>
> Is there any way to get the control word register's address (and then
> SDA/SCL bit position) on the linux operating system. Is this
> information available to linux kernel ?
>
> FYI : Masking Value that i am referring to is the value that has to be
> ANDed to the DATA(bit - 0/1) before writing it to Control word
> register so that the right bit can be written on to the SDA/SCL lines.
>
> Any pointers to this or your guidance would be highly appreciated.
No, it's not possible. That's why Linux has to resort to using the BIOS
for this - only the specific BIOS knows how the manufacturer wired the
card.
--
Vojtech Pavlik
SuSE Labs, SuSE CR
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to get SDA/SCL bit position in the control word register of the video card?
2005-11-24 10:45 How to get SDA/SCL bit position in the control word register of the video card? Vishal Linux
2005-11-24 10:53 ` Vojtech Pavlik
@ 2005-11-25 19:33 ` Jean Delvare
2005-11-26 4:12 ` Vishal Linux
1 sibling, 1 reply; 7+ messages in thread
From: Jean Delvare @ 2005-11-25 19:33 UTC (permalink / raw)
To: Vishal Linux; +Cc: LKML
Hi Vishal,
First of all, I would suggest that you post using your real name.
Pretending that you are Linux on your own will not make you popular.
> I am trying to communicate to the monitor eeprom to get the monitor
> capabilities and for that i need to have SDA/SCL bit positions in the
> control word register of the video card (to read and wrtie data using
> i2c protocol).
>
> Different video card vendors have different offsets for the control
> word register and different bit positions for SDA/SCL.
True, this is actually totally hardware-dependant.
> I tried to use linux kernel API char* get_EDID_from_BIOS(void*) and
> then using kgdb to debug the kernel module (that i wrote) to get the
> same but failed to find the way to get the above.
I couldn't find any function by that name in the Linux kernel source
tree. What are you talking about?
> I do have the offset of the control word register and Masking Value of
> Intel and Matrox card but i would like NOT to hardcode the masking
> value and the offset in my code. This will lead me to modify my code
> for the different cards.
>
> Is there any way to get the control word register's address (and then
> SDA/SCL bit position) on the linux operating system. Is this
> information available to linux kernel ?
Support for different hardware belong to different drivers. If you are
trying to put support for many incompatible chips in a single driver,
you're doing something wrong.
Anyway, we already have DDC (I2C) support for almost all graphics
adapters in Linux. In most cases, the support is part of the
framebuffer driver (radeonfb, i2c-matroxfb, i810fb, savagefb,
nvidiafb.) We also have some legacy standalone drivers (i2c-810,
i2c-prosavage, i2c-savage4, i2c-voodoo3) which should be obsoleted over
time.
So, although you didn't clearly say what you really were trying to do,
it's almost certainly wrong. Don't go reinventing the wheel, use
existing drivers. Once you have loaded the proper driver for your
hardware, you can load the eeprom module to get access to the EDID
data. There is an helper script, named ddcmon [1], in the lm_sensors
package, which will decode the EDID data in a human-readable format.
You may also want to take a look at an older program called read-edid
[2], which does actually attempt to use the BIOS to retrieve the EDID,
with varying success, then decodes it in a form suitable for X
configuration files. This can be used in combination with another
script from the lm_sensors package, decode-edid.pl [3], to get the same
output from the i2c adapter and eeprom modules instead of BIOS.
[1] http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/prog/eeprom/ddcmon
[2] http://john.fremlin.de/programs/linux/read-edid/
[3] http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/prog/eeprom/decode-edid.pl
--
Jean Delvare
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to get SDA/SCL bit position in the control word register of the video card?
2005-11-25 19:33 ` Jean Delvare
@ 2005-11-26 4:12 ` Vishal Linux
2005-11-26 10:36 ` Jean Delvare
0 siblings, 1 reply; 7+ messages in thread
From: Vishal Linux @ 2005-11-26 4:12 UTC (permalink / raw)
To: Jean Delvare; +Cc: LKML
On 11/26/05, Jean Delvare <khali@linux-fr.org> wrote:
> Hi Vishal,
Hello Mr. Delvare,
>
> First of all, I would suggest that you post using your real name.
> Pretending that you are Linux on your own will not make you popular
This was funny and what is also sometimes considered as ASSUMING something
and JUMPING to conclusion and JUDGING people without knowing them.
My actual name is Vishal Soni and my email address for personal
communication is
vishal.soni.1@gmail.com
I created email address vishal.linux so that i can dedicate one email
address to the mailing lists for my linux interest and the hundred of
mails, which keeps coming to the mailing list does not block my
personal mails.
You wrote.........
" Pretending that you are Linux on your own will not make you popular"
I don't really give damn to the popularity. I am just another open
source community fan, who is trying to learn about linux and enjoy it.
And open source community dudes are no fools that they wud be getting
this kind of weird feeling and wud make any X,Y,Z........ The LINUX
owner :).
This also reminds me about the real meaning of assume,
(ASSuME) "Making Ass out of You and Me."
So please don't judge the people without knowing them. Every one's way
of thinking and doing things is different.
>
> > I am trying to communicate to the monitor eeprom to get the monitor
> > capabilities and for that i need to have SDA/SCL bit positions in the
>
> > I tried to use linux kernel API char* get_EDID_from_BIOS(void*) and
> > then using kgdb to debug the kernel module (that i wrote) to get the
> > same but failed to find the way to get the above.
>
> I couldn't find any function by that name in the Linux kernel source
> tree. What are you talking about?
/usr/src/linux-2.6.x/include/video/edid.h
>
> > I do have the offset of the control word register and Masking Value of
> > Intel and Matrox card but i would like NOT to hardcode the masking
> > value and the offset in my code. This will lead me to modify my code
> > for the different cards.
> >
> > Is there any way to get the control word register's address (and then
> > SDA/SCL bit position) on the linux operating system. Is this
> > information available to linux kernel ?
>
> Support for different hardware belong to different drivers. If you are
> trying to put support for many incompatible chips in a single driver,
Yeah this is not to be done..........
> you're doing something wrong.
As i said........ in the subject i was trying to .........
to get SDA/SCL bit position in the control word register of the video card?
so that i can communicate to the monitor......... without hardcoding
the offset of control word register in my code for every different
card.
> You may also want to take a look at an older program called read-edid
> [2], which does actually attempt to use the BIOS to retrieve the EDID,
> with varying success, then decodes it in a form suitable for X
> configuration files. This can be used in combination with another
> script from the lm_sensors package, decode-edid.pl [3], to get the same
> output from the i2c adapter and eeprom modules instead of BIOS.
>
> [1] http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/prog/eeprom/ddcmon
> [2] http://john.fremlin.de/programs/linux/read-edid/
> [3] http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/prog/eeprom/decode-edid.pl
Yes i am studying the code.......of read-edid .
Thankyou for your time.
Vishal.
>
> --
> Jean Delvare
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to get SDA/SCL bit position in the control word register of the video card?
2005-11-26 4:12 ` Vishal Linux
@ 2005-11-26 10:36 ` Jean Delvare
2005-11-26 11:25 ` Vishal Soni
2005-11-26 11:34 ` Antonino A. Daplas
0 siblings, 2 replies; 7+ messages in thread
From: Jean Delvare @ 2005-11-26 10:36 UTC (permalink / raw)
To: Vishal Soni; +Cc: LKML
Hi Vishal,
> On 11/26/05, Jean Delvare wrote:
> > First of all, I would suggest that you post using your real name.
> > Pretending that you are Linux on your own will not make you popular
>
> This was funny and what is also sometimes considered as ASSUMING something
> and JUMPING to conclusion and JUDGING people without knowing them.
Calm down please.
I did not assume anything. You posted as "Vishal Linux", this is a
hard fact. I also did not judge you in any way. I merely *suggested* a
change, in your own interest.
The way people on this list perceive you will decide whether they are
going help you or not. Naming yourself "Vishal Linux" suggests that you
are the only person on Earth with first name "Vishal" who is entitled
to be related with the Linux kernel in any way. We expect more humility
from newcomers.
Additionnally, it's much easier to deal with the real names. There are
litterally thousands people posting to the LKML every year, having to
deal with nicknames or first names only makes it very hard to remember
who is who.
> I created email address vishal.linux so that i can dedicate one email
> address to the mailing lists for my linux interest and the hundred of
> mails, which keeps coming to the mailing list does not block my
> personal mails.
This is a technical detail. You can still post as "Vishal Soni" using
this second email address. I invite you do to so.
Now, feel free to ignore my suggestion. Just like I'll feel free to
ignore any further post from "Vishal Linux", especially if said post
includes slang, random insults, and abuses ellipsis.
> > > I tried to use linux kernel API char* get_EDID_from_BIOS(void*) and
> > > then using kgdb to debug the kernel module (that i wrote) to get the
> > > same but failed to find the way to get the above.
> >
> > I couldn't find any function by that name in the Linux kernel source
> > tree. What are you talking about?
>
> /usr/src/linux-2.6.x/include/video/edid.h
There is no function by that name in that file, neither in Linus'
latest kernel, nor in Andrew Morton's one. Whatever you are talking
about does not seem to exist.
> Thankyou for your time.
You're welcome.
--
Jean Delvare
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to get SDA/SCL bit position in the control word register of the video card?
2005-11-26 10:36 ` Jean Delvare
@ 2005-11-26 11:25 ` Vishal Soni
2005-11-26 11:34 ` Antonino A. Daplas
1 sibling, 0 replies; 7+ messages in thread
From: Vishal Soni @ 2005-11-26 11:25 UTC (permalink / raw)
To: Jean Delvare; +Cc: linux-kernel
> Calm down please.
>
> I did not assume anything. You posted as "Vishal Linux", this is a
> hard fact. I also did not judge you in any way. I merely *suggested* a
> change, in your own interest.
I did not think this much and created this email address some 2 years
back and have been using it since then. Well, i have carried out the
desired change.
>
> The way people on this list perceive you will decide whether they are
> going help you or not.
>
> Additionnally, it's much easier to deal with the real names. There are
> litterally thousands people posting to the LKML every year, having to
> deal with nicknames or first names only makes it very hard to remember
> who is who.
>
> This is a technical detail. You can still post as "Vishal Soni" using
> this second email address. I invite you do to so.
:) Invitation accepted.
Cheers Now !!
>
> Now, feel free to ignore my suggestion.
Its a good suggestion.......just that it was put across........hmmmmm
Well no hard feelings.
> Just like I'll feel free to
> ignore any further post from "Vishal Linux",
Now, there is no Vishal Linux........ happy !! afterall you too is
GNU philosophy believer.
> especially if said post
> includes slang, random insults, and abuses ellipsis.
> > > I couldn't find any function by that name in the Linux kernel source
> > > tree. What are you talking about?
> > /usr/src/linux-2.6.x/include/video/edid.h
>
> There is no function by that name in that file, neither in Linus'
> latest kernel, nor in Andrew Morton's one.
http://lxr.linux.no/source/include/video/edid.h
Line 17
>
> You're welcome.
Thank you.
Vishal.
>
> --
> Jean Delvare
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to get SDA/SCL bit position in the control word register of the video card?
2005-11-26 10:36 ` Jean Delvare
2005-11-26 11:25 ` Vishal Soni
@ 2005-11-26 11:34 ` Antonino A. Daplas
1 sibling, 0 replies; 7+ messages in thread
From: Antonino A. Daplas @ 2005-11-26 11:34 UTC (permalink / raw)
To: Jean Delvare; +Cc: Vishal Soni, LKML
Jean Delvare wrote:
> Hi Vishal,
>
>>>>> I tried to use linux kernel API char* get_EDID_from_BIOS(void*) and
>>>> then using kgdb to debug the kernel module (that i wrote) to get the
>>>> same but failed to find the way to get the above.
>>> I couldn't find any function by that name in the Linux kernel source
>>> tree. What are you talking about?
>> /usr/src/linux-2.6.x/include/video/edid.h
>
> There is no function by that name in that file, neither in Linus'
> latest kernel, nor in Andrew Morton's one. Whatever you are talking
> about does not seem to exist.
>
That's the old name. It's now renamed to fb_firmware_edid() which is in
drivers/video/fbmon.c. But you won't get anything from this function.
The DDC transfer was done entirely by the Video BIOS using a VBE interrupt
call during boot in arch/i386/boot/video.S:store_edid.
Tony
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-11-26 11:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-24 10:45 How to get SDA/SCL bit position in the control word register of the video card? Vishal Linux
2005-11-24 10:53 ` Vojtech Pavlik
2005-11-25 19:33 ` Jean Delvare
2005-11-26 4:12 ` Vishal Linux
2005-11-26 10:36 ` Jean Delvare
2005-11-26 11:25 ` Vishal Soni
2005-11-26 11:34 ` Antonino A. Daplas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox