Commit Graph

3 Commits

Author SHA1 Message Date
Dave Airlie
1e6e87a3c9 crocus: Make iris_bo_import_dmabuf take a modifier
Port 493298528a from iris

    Replace the tiling parameter with a modifier parameter. I find it more
    straightforward to have this function figure out the tiling from the
    modifier than to have its caller do it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11352>
2021-06-15 00:02:06 +00:00
Dave Airlie
4cd0f8535c crocus: Don't call SET_TILING for dmabuf imports
This is a port of c111e9099c from iris to
crocus.

    Calling SET_TILING on a DMA buffer with the gen12 CCS modifier can fail
    unnecessarily. The main surface in the BO is Y-tiled, but the CCS portion is
    linear and can have a stride that's not a multiple of 128B. Because SET_TILING
    is called on the CCS plane with I915_TILING_Y, the ioctl will sometimes reject
    the stride.

    SET_TILING was originally used in b6d45e7f74 to
    fix an assertion failure in iris_resource_from_handle. Assigning the BO's
    tiling_mode field is sufficient to avoid the failure.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11352>
2021-06-15 00:02:06 +00:00
Dave Airlie
f3630548f1 crocus: initial gallium driver for Intel gfx 4-7
This is a gallium driver for the Intel gfx 4-7 GPUs.

It was initially cloned from the iris driver by Ilia Mirkin,
then I ported over large reams of code from i965 until it worked.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11146>
2021-06-14 06:34:05 +10:00