Jump to content

ATI Framebuffer development


Slice
 Share

466 posts in this topic

Recommended Posts

Can you get EDID from any other operating system? That will tell if it's your video card that lacks the DDC ability.

WinXP fails with internal LCD. But it knows monitor properties. I think EDID is included in windows drivers.

With external CRT I'll try later.

Link to comment
Share on other sites

I hope YES.

 

I make one more test. I connect outer LCD monitor Samsung 740b through VGA connector. My laptop has no DVI connector.

BIOS_4_SCRATCH=03000006 exactly as CRT monitor :D

One difference in 0x5c=0xA or 0xE. These bits is not defined. (CRTC_STATUS).

Other difference (0x60)=0x300. No DDC connect?

 

So if I were to use the files form this topic would I at least get CI/QE for my x200/x1150? I'm not really too concerned about anything else like dual monitors or anything.

Link to comment
Share on other sites

WinXP fails with internal LCD. But it knows monitor properties. I think EDID is included in windows drivers.

With external CRT I'll try later.

 

No way windows could have EDID for every internal LCD screen on the market. What about new models made after driver release? Window must have a way of forcing I2C connection to the monitor, or the EDID for non-working I2C connections is stored somewhere in card or motherboard BIOS. The answer is in the Windows Radeon drivers somewhere.

Link to comment
Share on other sites

So if I were to use the files form this topic would I at least get CI/QE for my x200/x1150? I'm not really too concerned about anything else like dual monitors or anything.

Wait, please. I know that x200 (RS400) and x1150 (RS480) have exactly the same problem with QE/CI as I have with my RS300. But I have no other method to test else creating new drivers. If I would have good framebuffer then I shall make QE for RSxxx.

 

No way windows could have EDID for every internal LCD screen on the market. What about new models made after driver release? Window must have a way of forcing I2C connection to the monitor, or the EDID for non-working I2C connections is stored somewhere in card or motherboard BIOS. The answer is in the Windows Radeon drivers somewhere.

But all laptop manufactures give you OEM drivers that can be specific for the internal monitor.

I already reversed windows drivers and know about windows I2C method. It doesn't work! I also reported abot third party GetEDID programs for windows. No one is successfull.

But I think that different EDIDs differs only in monitor's name. Callisto with 2 EDIDs works almost everywhere.

 

Testers! Please make the same observations about different monitors connected as I did.

Connect different monitors/TV.

For each configuration reboot and test:

kextload -v RadeonPCI.kext

./RadeonDump -r 0,100

./RadeonDump -i

Please report DevID of your videocard and specify monitor's model and common properties.

RadeonDump.zip

RadeonDump.src.zip

Link to comment
Share on other sites

About the EDID, I vaguely remember this info is hardcoded inside the ROM of ATI mobilitys, which would make more sense for a fixed display than read it from DCC.

I manually read my ROM and didn't found something like EDID. But the information may present in another form. ;)

Link to comment
Share on other sites

For Slice:

I'll upload the only windows program that can read my internal laptop's EDID. And I tried many others...

Install, run, press F10 and select get EDID. It works on my IBM T43 (ATI x300) even if in the main window

it said: DDC/CI not supported!

Maybe it is usefull if disassambled...

 

For any external display plugged into my IBM, Dong's code read ok the EDID.

softMCCS.rar

IBM_LCD_EDID.txt

Link to comment
Share on other sites

For Slice:

I'll upload the only windows program that can read my internal laptop's EDID. And I tried many others...

Install, run, press F10 and select get EDID. It works on my IBM T43 (ATI x300) even if in the main window

it said: DDC/CI not supported!

Maybe it is usefull if disassambled...

 

For any external display plugged into my IBM, Dong's code read ok the EDID.

I checked your program and got

000C800740...Hardware monitor enumeration
000C800741...*******************************************
000C800742...Querying 00010001
000C892F43...Nothing found on 00010001
000C892F44...*******************************************
000C892F45...Querying 00020001
000C892F46.....[S] <A0:w> [P]
000C896147.....[S] <A0:w> [P]
000C89CF48.....[S] <A0:w> [P]
000C89CF49...Nothing found on 00020001
000C89CF4A...*******************************************
000C89CF4B...Querying 00030001
000C89CF4C.....[S] <A0:w> [P]
000C8A014D.....[S] <A0:w> [P]
000C8A654E.....[S] <A0:w> [P]
000C8A654F...Nothing found on 00030001
000C8A6550...*******************************************
000C8A6551...Querying 00040001
000C8A6552.....[S] <A0:w> [P]
000C8AA153.....[S] <A0:w> [P]
000C8B0654.....[S] <A0:w> [P]
000C8B0655...Nothing found on 00040001

But in software mode it create something like EDID. I think it uses Windows driver information.

Here is full log.

 

I try also ELDIM EDID viewer. It is interesting that it got Monitor name... after I install ViewSonic EDID.exe. But other values are not real. (Model, serial number etc)

Link to comment
Share on other sites

For any external display plugged into my IBM, Dong's code read ok the EDID.

So I will use Dong's codes.

Can you make

./RadeonDump -r 0,100

with every monitor connected?

Link to comment
Share on other sites

Only now I read next part of Linux drivers and found that Joblo made panel_info from EDID while Linux from BIOS.

So my LCD has no DDC and BIOS doesn't contain EDID but it contains all necessory LVDS information to work.

Previous codes to read LVDS information are simply wrong.

Sorry for all who said me that early. If you would be more specific I should made the driver quickly.

Link to comment
Share on other sites

RadeonDump results with internal LCD only and with another external LCD (LG L226WTQ, 22', 1680x1050 native res.)

 

I also tested with a TV connected to S-video but nothing changed... TV is not detected.

 

One more file: Linux log.

Even if in the log appears that it can't read EDID from DDC, Linux is detecting the internal LCD OK,

the display parameters are ok.

My current internal LCD is not the original one. The original one was 1024x768 and I changed it

some time ago with a 1400x1050 display. So the correct information about its resolution can't be

read from the BIOS, but detected somehow else. And Linux does it OK.

radeondump_r_0_100.rtf

radeondump_internal_LCD_only.rtf

radeondump_EDID_ext_monitor.rtf

Xorg.0.log.zip

Link to comment
Share on other sites

RadeonDump results with internal LCD only and with another external LCD (LG L226WTQ, 22', 1680x1050 native res.)

 

I also tested with a TV connected to S-video but nothing changed... TV is not detected.

Trying to analyse

First file "r 0 100"

0x0020: 0x01000047\  MT_LCD + MT_CRT + 0x40 (?) + 0x1 (?)
0x0024: 0x01000001\
0x0060: 0x00000300\
0x0064: 0x00000300\
0x0068: 0x00000000\
0x006C: 0x00000000\

Please specify what is connected

 

"LCD only"

Bios Connector table: \
Port0: DDCType-0x60, DACType-1, TMDSType-1, ConnectorType-1\   // VGA
Port1: DDCType-0x64, DACType-1, TMDSType-1, ConnectorType-3\   // DVI-D
Port4: DDCType-0x0, DACType-0, TMDSType-0, ConnectorType-7\	 // LVDS
Port5: DDCType-0x0, DACType-2, TMDSType-0, ConnectorType-5\	 // S-Video

"ext monitor"

EDID for connector 0:\
0x0000: 00FFFFFFFFFFFF001E6D4D56E4F20000\

So you plug ext monitor into VGA. And you have also external DVI?

Link to comment
Share on other sites

No, I don't have DVI connector.

First file was with internal LCD only.

Second file was with the external LCD connected on VGA port.

Connecting a TV on the S-video port doesn't change anything - TV is not detected

 

 

Some useful files: 20-pin and 30-pin laptop connectors and other info...

 

The 20-pin is for old laptops with displays with resolution only up to 1024x768.

Most of today's laptops use the 30-pin connector which permit higher resolution.

It is possible to connect a 20-pin display on a 30-pin motherboard connector, but

the pin's functions will be different - see the files

spwg_spec_version3.5_3_29_2005.rar

idf_display_interchangeability_course.rar

Link to comment
Share on other sites

No, I don't have DVI connector.

First file was with internal LCD only.

Second file was with the external LCD connected on VGA port.

Connecting a TV on the S-video port doesn't change anything - TV is not detected

Some useful files: 20-pin and 30-pin laptop connectors and other info...

It would be nice if you show me Radeon registers with TV connected. No any change? I have changes in 0x20.

 

Yes, there is a docking station / port replicator for IBM T43 which has a DVI connector.

Unfortunately I don't have this docking station so I can make some tests with a DVI monitor connected.

OK. So your BIOS connector information is good.

 

Now I rewriting the sources to be more Linux like for easy add new codes from Linux sources. It takes me a time.

Link to comment
Share on other sites

The main news in the topic.

 

I create a driver that contains initialisation or Radeon chip, BIOS reading, and Monitor data reading.

So we have all variables needed to work.

 

I think it must works for any Radeon R200-R700. Test please!

What is absent?

1. I did not implement I2C because I can't test. Probably I have mechanically broken DDC connectors (from warranty repairing). The I2C needed only for external monitors. I got good LCD panel information from BIOS.

ATIFB: fb_phys_base=d0000000 fb_local_base=38000000
ATI: Found Intel x86 BIOS ROM Image
ATIFB: Legacy BIOS detected:
Found ATI 5835 named ATI MOBILITY RADEON 9000 IGP
ATIFB: Bios Connector table: 
ATIFB: Port0: DDCType-0x68, DACType-2, TMDSType-2, ConnectorType-7
ATIFB: Port1: DDCType-0x60, DACType-2, TMDSType-1, ConnectorType-1
ATIFB: Port4: DDCType-0x0, DACType-0, TMDSType-0, ConnectorType-7
ATIFB: Port5: DDCType-0x0, DACType-2, TMDSType-0, ConnectorType-5
ATIFB: Retreived PLL infos from BIOS
ATIFB: Reference=14.32 MHz (RefDiv=6) Memory=300.00 Mhz, System=165.00 MHz
ATIFB: PLL min 20000 max 35000
ATIFB: radeon_get_moninfo: bios 4 scratch = 1000004
ATIFB: biosEDID @0000
ATIFB: LCD,EDID injected
ATIFB: radeon_check_modes
ATIFB: Panel ID string: 1024x768                
ATIFB: Panel Size from BIOS: 1024x768
ATIFB: BIOS provided dividers will be used.
ATIFB: LVDS Info:
XRes: 1024, YRes: 768, DotClock: 65000
HBlank: 320, HOverPlus: 16, HSyncWidth: 136
VBlank: 38, VOverPlus: 2, VSyncWidth: 6
ATIFB: Setting up default mode based on panel info
fb_edid_to_monspecs
edid_checksum OK
edid_check_header OK
========================================
Display Information (EDID)
========================================
  EDID Version 1.3
  Manufacturer: @@@
  Model: 00000000
  Serial#: 00000000
  Year: 1990 Week 0
  Display Characteristics:
     Monitor Operating Limits:    Detailed Timings
     96 MHz 1440 1504 1536 1760 900 903 906 912 -HSync -VSync

  Supported VESA Modes
     Manufacturer's mask: 0
  Standard Timings
  Detailed Timings
Extrapolated
          H: 30-56KHz V: 60-60Hz DCLK: 96MHz
     Digital Display Input
     Sync: 
     Max H-size in cm: 34
     Max V-size in cm: 22
     Gamma: 2.20
     DPMS: Active no, Suspend no, Standby no
     RGB Color Display
     Chroma
        RedX:     0.590 RedY:     0.345
        GreenX:   0.315 GreenY:   0.555
        BlueX:    0.155 BlueY:    0.155
        WhiteX:   0.313 WhiteY:   0.329
     First DETAILED Timing is preferred
  Detailed Timings
     96 MHz 1440 1504 1536 1760 900 903 906 912 -HSync -VSync

  Supported VESA Modes
     Manufacturer's mask: 0
  Standard Timings
  Detailed Timings
  modes from EDID extracted
========================================

 

2. I make codes for second monitor too but they are not finished. It would be later if I get good reports.

3. I do not see problems to write change resolution.

4. I want to change default address for framebuffer from PCI space (0xd0000000) to real space (0x38000000) that may be a key to get mouse not influence to performance. It would be useful for shared memory chips RS300, RS400, RS480, RS630.

Link to comment
Share on other sites

Now lets speak about needed commands

enum {
                                                               /* Control Codes */
   cscReset                    = 0,
   cscKillIO                   = 1,
   cscSetMode                  = 2,
   cscSetEntries               = 3,
   cscSetGamma                 = 4,
   cscGrayPage                 = 5,
   cscGrayScreen               = 5,
   cscSetGray                  = 6,
   cscSetInterrupt             = 7,
   cscDirectSetEntries         = 8,
   cscSetDefaultMode           = 9,
   cscSwitchMode               = 10,
   cscSetSync                  = 11,
   cscSavePreferredConfiguration = 16,
   cscSetHardwareCursor        = 22,
   cscDrawHardwareCursor       = 23,
   cscSetConvolution           = 24,
   cscSetPowerState            = 25,
   cscPrivateControlCall       = 26,                           /* Takes a VDPrivateSelectorDataRec*/
   cscSetMultiConnect          = 28,                           /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/
   cscSetClutBehavior          = 29,                           /* Takes a VDClutBehavior */
   cscSetDetailedTiming        = 31,                           /* Takes a VDDetailedTimingPtr */
   cscDoCommunication          = 33,                           /* Takes a VDCommunicationPtr */
   cscProbeConnection		= 34,				/* Takes nil pointer */
                                                               /* (may generate a kFBConnectInterruptServiceType service interrupt) */
   cscSetScaler		= 36,				/* Takes a VDScalerPtr */
   cscSetMirror                = 37,				/* Takes a VDMirrorPtr*/
   cscSetFeatureConfiguration  = 38,				/* Takes a VDConfigurationPtr*/
   cscUnusedCall               = 127                           /* This call used to expand the scrn resource.  Its imbedded data contains more control info */
};

enum {
                                                               /* Status Codes */
   cscGetMode                  = 2,
   cscGetEntries               = 3,
   cscGetPageCnt               = 4,
   cscGetPages                 = 4,                            /* This is what C&D 2 calls it. */
   cscGetPageBase              = 5,
   cscGetBaseAddr              = 5,                            /* This is what C&D 2 calls it. */
   cscGetGray                  = 6,
   cscGetInterrupt             = 7,
   cscGetGamma                 = 8,
   cscGetDefaultMode           = 9,
   cscGetCurMode               = 10,
   cscGetSync                  = 11,
   cscGetConnection            = 12,                           /* Return information about the connection to the display */
   cscGetModeTiming            = 13,                           /* Return timing info for a mode */
   cscGetModeBaseAddress       = 14,                           /* Return base address information about a particular mode */
   cscGetScanProc              = 15,                           /* QuickTime scan chasing routine */
   cscGetPreferredConfiguration = 16,
   cscGetNextResolution        = 17,
   cscGetVideoParameters       = 18,
   cscGetGammaInfoList         = 20,
   cscRetrieveGammaTable       = 21,
   cscSupportsHardwareCursor   = 22,
   cscGetHardwareCursorDrawState = 23,
   cscGetConvolution           = 24,
   cscGetPowerState            = 25,
   cscPrivateStatusCall        = 26,                           /* Takes a VDPrivateSelectorDataRec*/
   cscGetDDCBlock              = 27,                           /* Takes a VDDDCBlockRec  */
   cscGetMultiConnect          = 28,                           /* From a GDI point of view, this call should be implemented completely in the HAL and not at all in the core.*/
   cscGetClutBehavior          = 29,                           /* Takes a VDClutBehavior */
   cscGetTimingRanges          = 30,                           /* Takes a VDDisplayTimingRangePtr */
   cscGetDetailedTiming        = 31,                           /* Takes a VDDetailedTimingPtr */
   cscGetCommunicationInfo     = 32,                           /* Takes a VDCommunicationInfoPtr */
   cscGetScalerInfo		= 35,				/* Takes a VDScalerInfoPtr */
   cscGetScaler		= 36,				/* Takes a VDScalerPtr */
   cscGetMirror                = 37,				/* Takes a VDMirrorPtr*/
   cscGetFeatureConfiguration  = 38				/* Takes a VDConfigurationPtr*/
};

I look IOGraphics sources and found

cscGetTimingRanges - write to registry but no drivers use it. Not needed!

cscDoCommunication - same as doI2Crequest(..). No problem

cscGetNextResolution - simply return next ID to list in System Preferencies

struct VDResolutionInfoRec {
DisplayModeID				   csPreviousDisplayModeID;	/* ID of the previous resolution in a chain */
DisplayModeID				   csDisplayModeID;			/* ID of the next resolution */
unsigned long				   csHorizontalPixels;		 /* # of pixels in a horizontal line at the max depth */
unsigned long				   csVerticalLines;			/* # of lines in a screen at the max depth */
Fixed						   csRefreshRate;			  /* Vertical Refresh Rate in Hz */
DepthMode					   csMaxDepthMode;			 /* 0x80-based number representing max bit depth */
unsigned long				   csResolutionFlags;		  /* Reserved - flag bits */
unsigned long				   csReserved;				 /* Reserved */
};
typedef struct VDResolutionInfoRec	  VDResolutionInfoRec;

cscGetVideoParameters - more complex structure. Copy from RadeonFB project.

cscGetDetailedTiming - copy from panel_info that we already have.

cscGetModeTiming - also no problem

cscGetCurMode - get current state. We always know it! Joblo return Unsupported.

cscGetScaler - new display mode but I don't understand for a what. No sample from Joblo.

cscGetPreferredConfiguration - optimal mode for monitor? Joblo return Unsupported.

cscGetMirror - dunno

cscGetMultiConnect - used for I2C

cscGetFeatureConfiguration - dummy. Read what write and no more.

cscGetSync - some Apple's monitor feature

cscGetFeatureList - some Apple's monitor feature

cscProbeConnection - is monitor is reconnected?

cscSetDetailedTiming - real task for brave man. I hope Linux do it.

 

The leo is not so fierce as painted.

Link to comment
Share on other sites

dong

 

your old question

pixelInfo->vpRowBytes = fBitsPerPixel * cachedMode->HDisplay / 8;

if HDisplay == 1050.

I think no problem

(fBitsPerPixel * cachedMode->HDisplay) / 8; fBitsPerPixel =8, 16, 24, 32 is easy divided by 8.

Link to comment
Share on other sites

I don't have any luck with this. I have an nx6325 (ATI Mobility Radeon X1150). I downloaded and used ATILead.kext from the first post of the ATILead thread and the Ati.kext file from the first post of this thread(I did not modify either).

 

I get messages on the terminal saying that values from the bios have been set and the EDID extracted etc. but then nothing; it gives me an error about loading kernel symbols(which it does anyway) then freezes :-(. Is there any information you need me to coax out of the system? (Thank you so much for your work)

Link to comment
Share on other sites

I don't have any luck with this. I have an nx6325 (ATI Mobility Radeon X1150). I downloaded and used ATILead.kext from the first post of the ATILead thread and the Ati.kext file from the first post of this thread(I did not modify either).

 

I get messages on the terminal saying that values from the bios have been set and the EDID extracted etc. but then nothing; it gives me an error about loading kernel symbols(which it does anyway) then freezes :-(. Is there any information you need me to coax out of the system? (Thank you so much for your work)

I need more advanced report.

Boot with -v -s

then sh /etc/rc

when freeze you can type Ctrl-C

and then dmesg >dmesgSmykul.txt

ioreg -l -x -w 2048 >ioregSmykul.txt

Then, if you can enter gui with only ATILead or only Ati.kext or without both, type in terminal

sudo kextload -v RadeonPCI.kext

./RadeonDump -r 0,1000 >regsSmykul.txt

./RadeonDump -i >EDIDSmykul.txt

Please specify your OS and hardware config.

Link to comment
Share on other sites

I just attempted this but I can't ctrl-c when it freezes.

 

Also I only have rc.common and rc.netboot in my /etc/ directory. I tried the procedure twice; once with each rc file but had no luck. I can however boot with only one of the files (Either Ati.kext or ATILead.kext) but with just ATILead.kext my screen does nothing (I.e. I can hear the mouse hitting the screen corners but it still looks like I am staring at a console).

 

I am currently using an install from the kalyway 10.5.2 DVD. My graphics card is an ATI Mobility Radeon X1150 and the screen is a standard LCD (15", 1024x768). The processor is an AMD Turion TL-52 x2 64bit and I have 3Gb of ram installed.

 

<Edit>

Reg and EDID files added

</Edit>

regsSmykul.txt

EDIDSmykul.txt

Link to comment
Share on other sites

I just attempted this but I can't ctrl-c when it freezes.

 

Also I only have rc.common and rc.netboot in my /etc/ directory. I tried the procedure twice; once with each rc file but had no luck. I can however boot with only one of the files (Either Ati.kext or ATILead.kext) but with just ATILead.kext my screen does nothing (I.e. I can hear the mouse hitting the screen corners but it still looks like I am staring at a console).

 

I am currently using an install from the kalyway 10.5.2 DVD. My graphics card is an ATI Mobility Radeon X1150 and the screen is a standard LCD (15", 1024x768). The processor is an AMD Turion TL-52 x2 64bit and I have 3Gb of ram installed.

 

Reg and EDID files added

You didn't show me messages so I can't say you anything.

Link to comment
Share on other sites

Sorry Dong!

Only now I read your sources RadeonX1000 because I thought it is not for me. You already done most of my problems. What is your stop problem?

Did you know that RadeonHD is only addition to RadeonXF?

Link to comment
Share on other sites

 Share

×
×
  • Create New...