Announcement

Collapse
No announcement yet.

More Radeon & AMDGPU Fixes Line-Up For Linux 4.10

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • netkas
    replied
    hello again.

    tested my patch, it works, I get screen output and acceleration

    log: http://pastebin.com/GrxUUPHZ

    interesting part of log -
    [ 2.154872] [drm] ACPI VFCT[0] contains a BIOS for 02:00.0 1002:6810, size 65536

    [ 4.497936] [drm] ACPI VFCT[0] contains a BIOS for 02:00.0 1002:6810, size 65536

    [ 4.497939] [drm] ACPI VFCT[0] table is not for this card

    [ 4.497941] [drm] Checking next ACPI VFCT bios image

    [ 4.497944] [drm] ACPI VFCT[1] contains a BIOS for 06:00.0 1002:6810, size 65536

    the patch - http://rgho.st/8YFjKysNy

    however after about 1 min the system hard freezes(even without x.org running), tried radeon.dpm=0, no change. kernel 4.4
    Last edited by netkas; 25 January 2017, 05:18 AM.

    Leave a comment:


  • netkas
    replied
    I'll try to test this updated function some time soon, will report back.

    Code:
    static bool radeon_acpi_vfct_bios(struct radeon_device *rdev)
    
    {
    
    bool ret = false;
    
        bool vbios_found = false;
    
    struct acpi_table_header *hdr;
    
    acpi_size tbl_size;
    
    UEFI_ACPI_VFCT *vfct;
    
    GOP_VBIOS_CONTENT *vbios;
    
    VFCT_IMAGE_HEADER *vhdr;
    
        uint16_t vbios_index = 0;
    
        uint32_t vbios_offset = 0;
    
    if (!ACPI_SUCCESS(acpi_get_table_with_size("VFCT", 1, &hdr, &tbl_size)))
    
    return false;
    
    if (tbl_size < sizeof(UEFI_ACPI_VFCT)) {
    
    DRM_ERROR("ACPI VFCT table present but broken (too short #1)\n");
    
    goto out_unmap;
    
    }
    
    
    
        vfct = (UEFI_ACPI_VFCT *)hdr;
    
    
    
    
        while (vbios_found == false)
    
        {
    
    
    
            if (vfct->VBIOSImageOffset + sizeof(VFCT_IMAGE_HEADER) + vbios_offset > tbl_size) {
    
                DRM_ERROR("ACPI VFCT table present but broken (too short #2)\n");
    
                goto out_unmap;
    
            }
    
    
    
            vbios = (GOP_VBIOS_CONTENT *)((char *)hdr + vfct->VBIOSImageOffset + vbios_offset);
    
            vhdr = &vbios->VbiosHeader;
    
            DRM_INFO("ACPI VFCT[%d] contains a BIOS for %02x:%02x.%d %04x:%04x, size %d\n", vbios_index,
    
                     vhdr->PCIBus, vhdr->PCIDevice, vhdr->PCIFunction,
    
                     vhdr->VendorID, vhdr->DeviceID, vhdr->ImageLength);
    
    
    
            if (vhdr->PCIBus == rdev->pdev->bus->number &&
    
                vhdr->PCIDevice == PCI_SLOT(rdev->pdev->devfn) &&
    
                vhdr->PCIFunction == PCI_FUNC(rdev->pdev->devfn) &&
    
                vhdr->VendorID == rdev->pdev->vendor &&
    
                vhdr->DeviceID == rdev->pdev->device) {            
    
                vbios_found = true;
    
                break;
    
            } else {
    
                DRM_INFO("ACPI VFCT[%d] table is not for this card\n", vbios_index);
    
            }
    
    
    
            if (vfct->VBIOSImageOffset + sizeof(VFCT_IMAGE_HEADER) + vhdr->ImageLength + vbios_offset > tbl_size) {
    
                DRM_ERROR("ACPI VFCT image truncated\n");
    
                goto out_unmap;
    
            }
    
            if (vfct->VBIOSImageOffset + sizeof(VFCT_IMAGE_HEADER) + vhdr->ImageLength + vbios_offset < tbl_size) {
    
                DRM_INFO("Checking next ACPI VFCT bios image\n");
    
                vbios_index++;
    
                vbios_offset += sizeof(VFCT_IMAGE_HEADER) + vhdr->ImageLength;
    
    
    
    
            }
    
        }
    
        if (!vbios_found) goto out_unmap;
    
    
    
    
    rdev->bios = kmemdup(&vbios->VbiosContent, vhdr->ImageLength, GFP_KERNEL);
    
    ret = !!rdev->bios;
    
    
    
    
    out_unmap:
    
    return ret;
    
    }

    Leave a comment:


  • netkas
    replied
    so, here


    if check for first vbios failed at line 630, a check for second vbios need to be done, it can be found at

    if ((vfct->VBIOSImageOffset + sizeof(VFCT_IMAGE_HEADER) + vhdr->ImageLength) < tbt_size) {

    vhdr = vfct->VBIOSImageOffset + sizeof(VFCT_IMAGE_HEADER) + vhdr->ImageLength;

    //start some checks again

    }

    Leave a comment:


  • netkas
    replied
    sp, infact VFCT table has two vbioses, for both cards (master and slave), first going slave vbios, then master vbios.

    Radeon driver is only able to extract first one. (in facts it's only looking for first one)

    windows amd drivers I believe is able to extract both

    here is that vfct table - http://rgho.st/6pG498pFz

    first vbios starts at 0x68, second vbios starts at 0x10084

    Last edited by netkas; 24 January 2017, 03:07 PM.

    Leave a comment:


  • bridgman
    replied

    Thanks for getting the logs. Problem seems to be:

    Code:
    [    8.358193] [drm] initializing kernel modesetting (PITCAIRN 0x1002:0x6810 0x106B:0x012A 0x00).
    [    8.379700] [drm] register mmio base: 0xA0600000
    [    8.400813] [drm] register mmio size: 262144
    [    8.421487] [drm] ACPI VFCT contains a BIOS for 02:00.0 1002:6810, size 65536
    [    8.442002] [drm] ACPI VFCT table is not for this card
    [    8.462549] amdgpu 0000:06:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x0000
    [    8.483276] amdgpu 0000:06:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x0000
    [    8.503611] [drm:amdgpu_get_bios [amdgpu]] *ERROR* Unable to locate a BIOS ROM
    [    8.523669] amdgpu 0000:06:00.0: Fatal error during GPU init
    [    8.543586] [drm] amdgpu: finishing device.
    Looks like the ROM info in the table may not be correct (but that's just a first guess). Same error with both drivers.

    EDIT - sorry, I missed your second post there. I don't *think* we have a file option for VBIOS but will check.

    Leave a comment:


  • netkas
    replied
    you are right,0x12a is primary, 0x12b is secondary (opencl only)
    so vfct only has vbios for secondary card.

    can I specify some external location (a file) for vbios somehow ?

    Leave a comment:


  • agd5f
    replied
    Originally posted by netkas View Post
    logs, subsys 0x012B - primary device, with output, 0x012A - secondary, no outputs (opencl only). hdmi port connected to display. radeon is not boot gpu (it's POSTed but no outputs on it durring boot efi boot, I connect hdmi to nmp when grub shows up, specific config to get these logs)
    4.9.3, amdgpu - http://pastebin.com/7VM8Z1Bn
    4.4, radeon - http://pastebin.com/ZYww8bx1
    According to the log, the driver is not able to find the vbios image for one of the cards (probably the one with the displays attached to it because the one with the driver loaded has no displays detected as attached). There is probably some proprietary, mac-specific magic required to fetch the vbios image on these macs.

    Leave a comment:


  • netkas
    replied
    logs, subsys 0x012B - primary device, with output, 0x012A - secondary, no outputs (opencl only). hdmi port connected to display. radeon is not boot gpu (it's POSTed but no outputs on it durring boot efi boot, I connect hdmi to nmp when grub shows up, specific config to get these logs)
    4.9.3, amdgpu - http://pastebin.com/7VM8Z1Bn
    4.4, radeon - http://pastebin.com/ZYww8bx1
    Last edited by netkas; 23 January 2017, 03:06 PM.

    Leave a comment:


  • netkas
    replied
    Originally posted by bridgman View Post
    Are you running Boot Camp ? If not then IIRC the driver won't be able to find the VBIOS image.

    What do the logs tell you ?
    no bootcamp. efi grub boots kernel.

    driver find vbios just fine via vcft acpi table.

    Will try to get log, not easy in this config

    Leave a comment:


  • Pranos
    replied
    Originally posted by L_A_G View Post
    I'd say the talk about added support for more peculiar Southern Islands cards pretty much fits the bill for just that. AFAIK the D300/500/700 series are Southern Islands cards and they most definitely are pretty odd beasts with all of their Apple specific quirks.
    Do you mean this ?


    commit 12a26bd342b5828b87e098291d17f9a188a0e7e6 Author: Alex Deucher <[email protected]> Date: Thu Jan 5 13:02:37 2017 -0500 drm/amdgpu: drop verde dpm quirks commit 7192c54a68013f6058b1bb505645fcd07015191c upstream. Port of radeon change to amdgpu. Acked-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
    commit 0c37b07002d5f619ec6d691bb6f6c2a2cab78d5b Author: Alex Deucher <[email protected]> Date: Thu Jan 5 12:39:01 2017 -0500 drm/radeon: drop verde dpm quirks commit 8a08403bcb39f5d0e733bcf59a8a74f16b538f6e upstream. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98897 https://bugs.launchpad.net/bugs/1651981 Acked-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: Adrian Fiergolski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>

    Leave a comment:

Working...
X