Opened 15 years ago

Closed 13 years ago

#5722 closed enhancement (fixed)

Radeon HD driver enhancement [2600 Pro]

Reported by: michaelvoliveira Owned by: kallisti5
Priority: normal Milestone: R1
Component: Drivers/Graphics/radeon_hd Version: R1/Development
Keywords: radeonhd 2600pro Cc: czeidler, mdisreali@…
Blocked By: Blocking:
Platform: All

Description

Hi czeidler

You could add support to my card.. I want to test it too

Here go some data

// vendors
#define VENDOR_ID_ATI	0x1002 /* Shapphire */

//family
/* R600 */
RHD_RV630, "RV630" 

//model
RHD_DEVICE_MATCH(  0x9589, RHD_RV630 ), /* Radeon HD 2600 Pro */

Thanks!

Attachments (21)

radeon_hd_2600pro_02.patch (679 bytes ) - added by Disreali 13 years ago.
re-Add radeon hd 2600 pro to radeon_hd driver
radeon_hd_2600pro_03.patch (1.0 KB ) - added by Disreali 13 years ago.
syslog_r42899-2ha.txt (487.5 KB ) - added by Disreali 13 years ago.
radeon_hd_2600pro_04.patch (733 bytes ) - added by Disreali 13 years ago.
Adds RadeonHD 2600 Pro Card ID to driver hrev42904 and newer
syslog_r42925-2a_rhd2600pro.txt (969.6 KB ) - added by Disreali 13 years ago.
syslog_hrev43314_rhd2600-pro_back_screen.txt (472.1 KB ) - added by Disreali 13 years ago.
syslog_hrev43692_rhd-2400pro_blank_on_boot.txt (512.0 KB ) - added by Disreali 13 years ago.
syslog from fresh install
hrev43782_syslog_radeon_hd_2600pro_blank_screen.txt (718.5 KB ) - added by Disreali 13 years ago.
syslog_hrev43798_radeon-hd-2600_black_screen.txt (512.0 KB ) - added by Disreali 13 years ago.
syslog_hrev43810_blackscreen_on_boot.txt (474.5 KB ) - added by Disreali 13 years ago.
syslog-hrev43810-4a-dirty_2600pro_black-screen_on_boot.txt (976.0 KB ) - added by Disreali 13 years ago.
syslog_hrev43811-1-gbde4eef_edgecase_patch.txt (934.7 KB ) - added by Disreali 13 years ago.
IMAG0208.JPG (470.6 KB ) - added by Disreali 13 years ago.
syslog_hrev43830-4-gfea34cf2n_gcc2_gdb_on_radeon_hd-accelerant.txt (474.4 KB ) - added by Disreali 13 years ago.
0001-radeon_hd-Reduce-risk-of-edge-case-failure.patch (4.2 KB ) - added by Disreali 13 years ago.
adding alex's edgecase patch
syslog_hrev43830-2hn_rhd2600pro_black-screen_on_1stboot.txt (494.4 KB ) - added by Disreali 13 years ago.
syslog_hrev43833_radeon_2600pro_black-screen.txt (496.1 KB ) - added by Disreali 13 years ago.
syslog_hrev43844_rhd-2600por_black_screen.txt (477.0 KB ) - added by Disreali 13 years ago.
0001-Increase-AtomBIOS-loop-timeout-to-1024.patch (818 bytes ) - added by Disreali 13 years ago.
syslog_hrev43845_TIMEOUT_PATCH_WORKS!!!!!!!.txt (418.5 KB ) - added by Disreali 13 years ago.
syslog_hrev43845-atombios_timeout-512.txt (561.2 KB ) - added by Disreali 13 years ago.
syslog with atombios loop timeout at 512

Change History (71)

comment:1 by Disreali, 15 years ago

Cc: mdisreali@… added

comment:2 by michaelvoliveira, 15 years ago

Component: Drivers/GraphicsDrivers/Graphics/radeon
Owner: changed from nobody to euan

comment:3 by anevilyak, 15 years ago

Component: Drivers/Graphics/radeonDrivers/Graphics
Owner: changed from euan to czeidler
Status: newassigned

Radeon HD is a separate driver from Radeon. Reassigning.

comment:4 by czeidler, 15 years ago

First mode detection has to be implemented. What is your native display resolution? The driver offers no advantage over the vesa driver when the vesa driver runs with the correct resolution.

comment:5 by michaelvoliveira, 15 years ago

Hi czeidler!!

It's ok for me! I use 1024x768 with my old and giant screen.. I could live with 800x600 too. Only for testing, I want the driver.

comment:6 by amonpaike, 14 years ago

can add my hardware? i can test it

device Display controller (VGA compatible controller, VGA controller) [3|0|0]
  vendor 1002: ATI Technologies Inc
  device 9581: M76 [Radeon Mobility HD 2600 Series]

http://cgit.freedesktop.org/xorg/driver/xf86-video-radeonhd/tree/src/rhd_id.c

//family
   /* R600 Mobility */
   { RHD_M76,   "M76" }

//model
RHD_DEVICE_MATCH(  0x9581, RHD_M76   ), /* Mobility Radeon HD 2600 */


  /* 0x9581 : M76 : Mobility Radeon HD 2600 */

comment:7 by Disreali, 14 years ago

Is it a matter of just adding the Radeon's device ID to one of the driver files? Which one?

.../haiku/src/add-ons/kernel/drivers/graphics/radeon_hd/driver.cpp ?

comment:8 by michaelvoliveira, 14 years ago

I already replaced into my local copy here, but seems that not worked at all

comment:9 by czeidler, 14 years ago

The problem is that we need to read the possible resolutions from the monitor (read edid). The current resolution is hardcoded for my machine. To do so the xorg driver devs told me that atom bios is needed. Basically to get the information to read the registers needed to use the IC2 bus to get the edid infos...

There have been a guy who wanted to write a hd driver but he haven't replied on my mail last week :-(

you can try to replace my resolution with yours, but there are also some other smaller parts different for different chip sets...

comment:10 by michaelvoliveira, 14 years ago

Ah.. good tip! thank you clemens!!!

But how can I scale the resolution to sync in modes.cpp, for example?

Seems that you are using 1366x768, but I want to change for 1920x1080,

comment:11 by michaelvoliveira, 14 years ago

Ok! I copy from my /var/log/Xorg.0.log in Ubuntu:

	gDisplayMode.timing.pixel_clock = 14850; /* 148.5 mhz
	gDisplayMode.timing.h_display = 1920;					/* in pixels (not character clocks) */
	gDisplayMode.timing.h_sync_start = 2008;
	gDisplayMode.timing.h_sync_end = 2052;
	gDisplayMode.timing.h_total = 2200;  /* h_blank_end
	gDisplayMode.timing.v_display = 1080;					/* in lines */
	gDisplayMode.timing.v_sync_start = 1084;
	gDisplayMode.timing.v_sync_end = 1089;
	gDisplayMode.timing.v_total = 1125; /* v_blanking
	gDisplayMode.timing.flags = 0;						/* sync polarity, etc. */

	gDisplayMode.space = B_RGB32_LITTLE;				/* pixel configuration */
	gDisplayMode.virtual_width = 1920;		/* in pixels */
	gDisplayMode.virtual_height = 1080;		/* in lines */
	gDisplayMode.h_display_start = 0;	/* first displayed pixel in line */
	gDisplayMode.v_display_start = 0;	/* first displayed line */
	gDisplayMode.flags = 0;		

But when Haiku boots, the frequency of 48hrz that you are using is not supported for my monitor, only 60hrz.

	*_low = 60L;
	*_high = 100 * 1000000L;
	return B_OK;

I changed there, but without success. There's another place to set 60hrz?

comment:12 by czeidler, 14 years ago

If I remember correct I also got the display mode from the xorg log.

Another problem could be that my chipset is a RHD_RS780 and yours is a RHD_RV630. I would propose that you go through the accelerator (also check the driver) and search for the according parts in the xorg driver: http://cgit.freedesktop.org/xorg/driver/xf86-video-radeonhd I used to same definitions/code so it should be relative easy to grep the right parts. Sometimes there are different code paths for different chipsets, so you have to adjust the haiku code... (as far as I remember there were only a few of them and it should be relative straight forward)

Don't know about the frequency but I think this should be ok. Do you see anything or does the monitor just switch off?

Good luck!

comment:13 by michaelvoliveira, 14 years ago

Hi Clemens!

I give up and bought a new Radeon HD 5500 series (0x68da) which is not listed into xorg driver (because is brand new for the driver). Now the card is detected, the Haiku starts up, but the image seems "mirrored" and with scanlines.

Anyway, it's a good progress.

comment:14 by czeidler, 14 years ago

Thats very good! Take a look at DxModeSet and DxModeScale. They are probably broken... Compare with xorg...

comment:15 by kallisti5, 14 years ago

Resolution: fixed
Status: assignedclosed

as czeidler said, reading the EDID from the monitor for modeline settings is the final piece to getting *basic* mode-changing functionality to this driver.

added 0x9589 (2600) to radeon_hd driver in hrev41072

I am setting this to resolved for now as all of these Radeon HD cards should have basic functionality after EDID / atombios support is added to the radeon_hd driver. (this is a big task however)

I created #7395 to track getting basic functionality of EDID reading within the radeon_hd driver.

comment:16 by kallisti5, 14 years ago

Component: Drivers/GraphicsDrivers/Graphics/radeon_hd

comment:17 by Disreali, 13 years ago

Keywords: 2600pro added; sapphire driver removed
Resolution: fixed
Status: closedreopened

Somewhere between hrev41072 and hrev42676, the entry for the RadeonHD 2600 Pro in the driver went missing.

Attaching new patch.

by Disreali, 13 years ago

Attachment: radeon_hd_2600pro_02.patch added

re-Add radeon hd 2600 pro to radeon_hd driver

comment:18 by Disreali, 13 years ago

patch: 01

comment:19 by anevilyak, 13 years ago

Owner: changed from czeidler to kallisti5
Status: reopenedassigned

comment:20 by Disreali, 13 years ago

After reveiwing the file again, I saw that the pciid for the 2600 pro is now labled for another card. https://dev.haiku-os.org/browser/haiku/trunk/src/add-ons/kernel/drivers/graphics/radeon_hd/driver.cpp#L80

The "Radeon HD 3610" does not appear in the xorg driver.

Will attach an updated patch soon.

by Disreali, 13 years ago

Attachment: radeon_hd_2600pro_03.patch added

comment:21 by Disreali, 13 years ago

I did more google searching and found that both the RadeonHD 3610, the 2600Pro, and others have the same 0x9589 device ID. http://www.amddevcentral.com/gpu_assets/ATI_Device_ID_List_July_2010.txt

Therefore, the first patch is correct, and the second should be ignored. I tried to mark it "obsolete" but trac did not let me.

comment:22 by kallisti5, 13 years ago

Resolution: fixed
Status: assignedclosed

This should be resolved post hrev42888 as mode setting on earlier cards is now working.

comment:23 by Disreali, 13 years ago

I just installed hrev42889 and just get a black screen at boot. I need to force safe-mode-video in order to get any video. I'll try to do a build that adds the 2600Pro id to see if that makes any difference.

Alex, Thanks for all the work you have done on the RadeonHD driver.

comment:24 by kallisti5, 13 years ago

Resolution: fixed
Status: closedreopened

Disreali: hmm, really shouldn't be getting a black screen at this point on a 2600 Pro.

Could you grab the logs?

Thanks!

by Disreali, 13 years ago

Attachment: syslog_r42899-2ha.txt added

comment:25 by Disreali, 13 years ago

Attached syslog. Is there anything else that would help?

comment:26 by Disreali, 13 years ago

Attaching a new patch as the card ID format was changed in hrev42904.

by Disreali, 13 years ago

Attachment: radeon_hd_2600pro_04.patch added

Adds RadeonHD 2600 Pro Card ID to driver hrev42904 and newer

comment:27 by mmadia, 13 years ago

Set patches *_02 and *_03 as obsolete, per request by Disreali.

comment:28 by Disreali, 13 years ago

Kallisti5,

It seems that the Radeon HD 3610 may be a re-branded 2600 Pro. Is it possible to confirm this? If that is the case, then my patches not correct solutions to the 2600 Pro not being listed in the driver.

It was suggested on irc that if the two cards are the same, that a notice be put in the driver. Could 2 cards be referenced on the same line in the driver such as the following?

0x9589, 2, 0, RADEON_R600 | 0x30, CHIP_STD, "Radeon HD 3610 | Radeon HD 2600 Pro"

comment:29 by Disreali, 13 years ago

Forgot to add the url to AMD's device ID List.

http://developer.amd.com/gpu_assets/ATI_Device_ID_List_June_2011.txt

comment:30 by kallisti5, 13 years ago

the name is just cosmetic and really isn't used for anything but showing the device in the console.

The chipset is the same (hrev630) and the DCE is the same.

If the chipset flags are different (IGP,Mobile,etc) for all three cards it may raise issues... but for the moment it all looks cosmetic.

comment:31 by Disreali, 13 years ago

Kallisti5, as requested, I'm attaching the syslog from hrev42925. I removed the 2600pro patch and did a jam -qa build.

I don't recall if the boot icons were visible on hrev42889, but they are visible on the hrev42925 build. However, I still a black screen after the boot icons change colours unless I use safe_mode_video.

by Disreali, 13 years ago

comment:32 by amonpaike, 13 years ago

hi kallisti5

Haiku hrev42930 gcc4 hybrid

my laptop have a mobility radeon hd 2600 (m72) recognized from haiku on radeon hd 3600(rv630)

i have an external monitor also on hdmi port

it works only if switch on external monitor on boot (fn + f8 external-switch)

step 1 haiku boot on external monitor

step 2 haiku load desktop on laptop monitor and external monitor goes off

step 3 after 1-2 seconds i have haiku on clonemode on all two screens

on "screen settings" it recognize "AU optronic 15.4 monitor" from laptop but i have set the resolution to 1280x1024 (external monitor)

all two screen are in native pixel format 1280x1024 and 1280x800 (i think spaces are cutted on bottom)


if i run haiku from laptop monitor, i can see boot operations and after a blackscreen (i think overrefresh or not recognize correct resolution)

comment:33 by Disreali, 13 years ago

patch: 10

comment:34 by Disreali, 13 years ago

Mark the latest patch as obsolete as mentioned in comment:28

comment:35 by Disreali, 13 years ago

Still getting a black screen after the boot splash icons on hrev43314. Attaching syslog.

comment:36 by Disreali, 13 years ago

hrev43692 still displays black unless I force safe-mode-video.

Attaching syslog of regular boot and then a safe-mode-video boot.

by Disreali, 13 years ago

syslog from fresh install

comment:37 by kallisti5, 13 years ago

Be sure to try hrev43787+

KERN: radeon_hd: radeon_gpu_mc_setup_r600: Modifying non-idle Memory Controller!  idlestate: 0x200001C0

Instead of just looking at the Memory controller, we now wait for it to become idle.. this may fix this issue.

Grab some new syslogs as well if things don't go well.

Thanks!

comment:38 by Disreali, 13 years ago

attaching syslog from hrev43782.

comment:39 by kallisti5, 13 years ago

try post hrev43810. hrev43810 fixes a *big* oops.

comment:40 by Disreali, 13 years ago

syslog from hrev43810. 1st boot is without safe mode, 2nd forces vesa.

comment:41 by Disreali, 13 years ago

Summary: Radeon HD driver enhancement [Sapphire 2600 Pro]Radeon HD driver enhancement [2600 Pro]

kallisti5,

Still seeing black screen on fresh install.

attaching syslog of hrev43810 built with the change you requested I test. I rebooted several times before resorting to safe-mode-video.

comment:42 by Disreali, 13 years ago

kallisti5,

I tested your edge-case patch and it did not help my situation, but may help others.

attaching syslog. rebooted several timed before using safe-mode-video.

comment:43 by Disreali, 13 years ago

Just built and tested hrev43830 and the system crashes to gdb because of the radeon_hd accelerant.

attaching syslog and picture of crash.

by Disreali, 13 years ago

Attachment: IMAG0208.JPG added

by Disreali, 13 years ago

adding alex's edgecase patch

comment:44 by kallisti5, 13 years ago

That patch wasn't a final version... I never committed it because I wasn't happy with what it did.

Remove the patch, and you shouldn't crash any more :)

comment:45 by Disreali, 13 years ago

I installed an "official nightly" of hrev43830-2hn and did not have any crashing. It is now back to showing a black screen after the boot splash, unless fail-safe video is used.

Attaching syslog.

Alex, once again, thanks for your efforts on this issue.

comment:46 by Disreali, 13 years ago

Built and installed hrev43833-gcc4 and I'm still getting a black screen unless I force fail-safe video. Hopefully some of the others with AMD gpu's are fairing better.

comment:47 by Disreali, 13 years ago

Still getting a black screen on hrev43844.

comment:48 by Disreali, 13 years ago

patch: 01

comment:49 by Disreali, 13 years ago

The above patch was suggested kallisti5. The change has proven to fix video on my 2600pro.

by Disreali, 13 years ago

syslog with atombios loop timeout at 512

comment:50 by kallisti5, 13 years ago

Resolution: fixed
Status: reopenedclosed

This should be solved with the changes in hrev43852 (time based timeout vs loop count timeout)

Please test with latest and greatest nightly... if you have any additional problems let me know and we can re-open this ticket or open a new one.

Thanks!

Note: See TracTickets for help on using tickets.