Project

General

Profile

Actions

Submit #3031

closed

Update drm/radeon to Linux 4.7.10 as much as possible

Added by davshao almost 7 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Driver
Target version:
Start date:
04/26/2017
Due date:
% Done:

90%

Estimated time:

Description

Sometimes one must go backwards before one can go forwards. The attached patch updates drm/radeon to Linux 4.7.10 as much as possible, with the obvious exception of patches related to dma_fence, reservation objects, dma_buf, prime, DisplayPort MST, and interval trees. In particular, because I do not have DisplayPort hardware to test, I expect complete breakage.

When I want decent font display without corruption on a CAICOS Sapphire Radeon HD6450 card, I use in a hacked version of pkgsrc for mesa 17 in /usr/pkg/share/X11/xorg.conf.d a 20-glamor.conf file resembling:

Section "Module" 
    Load "dri2" 
    Load "glamoregl" 
EndSection
Section "Device" 
    Identifier "Radeon Graphics" 
    Driver "radeon" 
    Option "AccelMethod" "glamor" 
    Option "ShadowPrimary" "on" 
EndSection

Take out the Option "ShadowPrimary" "on" and there are quite visible artifacts, but I am still able to fire up firefox using

LD_PRELOAD=/usr/pkg/lib/libGL.so firefox &

with layers acceleration forced to get some sort of display in WebGL Water:

http://madebyevan.com/webgl-water/

The patch is radeon47fast.patch generated by git format patch. Also attached is a diff between drm/radeon after the patch compared to Linux 4.7.10's. radeon_4_07.diff shows exactly what is left to be done.

The patch seems to apply cleanly up through at least

commit f30091155bf042c3e2934ca63573dabebe30f556
Date:   Mon Apr 24 19:22:39 2017 +0200

    <fcntl.h>: Add some missing defines (required by POSIX).

Files

radeon47fast.patch (923 KB) radeon47fast.patch davshao, 04/26/2017 08:57 PM
radeon_4_07.diff (512 KB) radeon_4_07.diff davshao, 04/26/2017 08:59 PM
IMG_20170705_201122.jpg (919 KB) IMG_20170705_201122.jpg kernel crash screenshot arcade@b1t.name, 07/05/2017 10:30 AM
bad_and_good.log (17.8 KB) bad_and_good.log two different samples, first bad then good arcade@b1t.name, 07/06/2017 02:38 AM
Actions #1

Updated by ftigeot almost 7 years ago

  • Status changed from New to In Progress
  • Assignee set to ftigeot
  • % Done changed from 0 to 90

Thanks for the commit, it has been pushed to master today.

With current dports packages and a Radeon R5 230, there was no need to preload a specific library, the webgl demo was perfectly functional out of the box and no artifact was visible.

Actions #2

Updated by ftigeot almost 7 years ago

This update unfortunately breaks X11 on at least one system.

Hardware is based on:
drm0: <Hawaii PRO [Radeon R9 290]> on vgapci0

Starting X with no special directives in xorg.conf gives a black screen, and the computer then needs to be hard reset.

Actions #3

Updated by mneumann almost 7 years ago

ftigeot wrote:

This update unfortunately breaks X11 on at least one system.

Hardware is based on:
drm0: <Hawaii PRO [Radeon R9 290]> on vgapci0

Starting X with no special directives in xorg.conf gives a black screen, and the computer then needs to be hard reset.

It works now as of commit http://gitweb.dragonflybsd.org/dragonfly.git/commit/62dc643ef61b347c4c2e60ad9ea68dd766741c90 (and http://gitweb.dragonflybsd.org/dragonfly.git/commit/7d829069c0009b901fc3cac433685334a793947f).

I need drm.radeon.audio=0 in /boot/loader.conf, otherwise "kldload radeonkms" will fail with a blank screen.
Also I need to "kldload radeonkms" before starting Xorg, otherwise chrome won't work (I have radeonkms_load="YES" in /etc/rc.conf). WebGL works out of the box, but chrome does show some artifacts, e.g. when I resize the window.

Great work! I think we can close the issue.

Actions #4

Updated by arcade@b1t.name over 6 years ago

That was so nice you waited for me to try filing a bug for this one and instead finding an open question to join.

drm0: <Trinity [Radeon HG 7560D]> at vgapci0

When loading radeonkms something is printed on the screen and screen switches somewhere. When radeonkms is loaded via `/boot/loader.conf` kernel crashes with attached screen, keyboard is no working because usb was not initialised yet. `drm.radeon.audio=0` doesn't help.

I think Xorg has nothing to do here, it just triggers loading radeonkms and "things" "happen".

Actions #5

Updated by arcade@b1t.name over 6 years ago

I can haz logs.

Actions #6

Updated by tuxillo over 2 years ago

  • Description updated (diff)
Actions #7

Updated by daftaupe about 1 year ago

  • Status changed from In Progress to Closed

@ftigeot pushed the following commit https://gitweb.dragonflybsd.org/dragonfly.git/commit/4be47400997875399098ad904fb4ca65b3244cca which brings drm/radeon version to the one of Linux 4.10.17.

I'm closing as we now have a more recent version in base.

Actions

Also available in: Atom PDF