Project

General

Profile

Bug #7634

ddi_dma_mem_alloc fails with attributes.low > 0

Added by Gordon Ross almost 3 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
2016-11-30
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Some i915 hardware cannot handle DMA below 0xff000, so the driver would normally use DMA attributes like this:
(Note the dma_attr_lo field)

static ddi_dma_attr_t ppgt_dma_attr = {
    DMA_ATTR_V0,
    0xff000U,             /* dma_attr_addr_lo */
    0xffffffffU,            /* dma_attr_addr_hi */
    0xffffffffU,            /* dma_attr_count_max */
    4096,                /* dma_attr_align */
    0x1fffU,            /* dma_attr_burstsizes */
    1,                /* dma_attr_minxfer */
    0xffffffffU,            /* dma_attr_maxxfer */
    0xffffffffU,            /* dma_attr_seg */
    1,                /* dma_attr_sgllen, variable */
    4,                /* dma_attr_granular */
    DDI_DMA_FLAGERR,        /* dma_attr_flags */
};

Unfortunately, ddi_dma_mem_alloc fails when dma_attr_addr_lo > 0.
Better DRM support on i915 needs that fixed.

When this is fixed, we'll undo the (temporary) fix shown in:
#7626 PPGTT setup problem

History

#1

Updated by Gordon Ross almost 3 years ago

  • Description updated (diff)
#2

Updated by Gordon Ross almost 3 years ago

  • Subject changed from ddi_dma_alloc fails with attributes.low > 0 to ddi_dma_mem_alloc fails with attributes.low > 0
#3

Updated by Gordon Ross almost 3 years ago

  • Description updated (diff)
#4

Updated by Gordon Ross almost 3 years ago

It fails on this check:
http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/i86pc/os/ddi_impl.c#1418

Anyone know why that check is there?

Also available in: Atom PDF