Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1207224

Re: [PATCH 3/7] drm/vc4: Add KMS support for Raspberry Pi.

From Eric Anholt <eric@anholt.net>
Newsgroups linux.kernel
Subject Re: [PATCH 3/7] drm/vc4: Add KMS support for Raspberry Pi.
Date 2015-08-14 01:10 +0200
Message-ID <pX9Nf-QH-9@gated-at.bofh.it> (permalink)
References <pWP2a-4fa-3@gated-at.bofh.it> <pWP2b-4fa-31@gated-at.bofh.it> <pWVAC-5qg-3@gated-at.bofh.it> <pX7BL-62s-17@gated-at.bofh.it> <pX8et-6ZO-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

> On Thu, Aug 13, 2015 at 01:44:03PM -0700, Eric Anholt wrote:
>> Struct mutex is here because this code is from the V3D series, with the
>> in-kernel BO cache ripped out (it turns out that the CMA allocator is
>> slow, and you can't just userspace cache since we have to do allocations
>> within the kernel to the tune of a couple per draw and that's too much).
>
> The CMA allocator is fast until you have pinned pages in its region,
> where it becomes _very_ slow to do allocations, sometimes getting up
> to the order of seconds.
>
> The main culpret of this are GFP_HIGHUSER_MOVABLE allocations which
> then pin the page.  It doesn't take many of those to make CMA really
> inefficient.
>
> The problem is that CMA doesn't get any information back from the
> internal page migration about which pages couldn't be moved, so it
> dumbly just tries incrementing the allocation by one page (subject
> to alignment constraints) and retrying again - repeating over the
> entire CMA region.  The bigger the region, the more time this takes.

Ouch.

Since I can workaround the allocation cost, the main problem I have
right now is that I've got a set of small allocations for 3D that all
need to have the same high 4 bits of paddr, because someone cleverly
packed some address bits in a GPU-managed structure.  Any
recommendations for ways to handle this with CMA?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Raspberry Pi KMS-only driver Eric Anholt <eric@anholt.net> - 2015-08-13 03:00 +0200
  Re: [PATCH 3/7] drm/vc4: Add KMS support for Raspberry Pi. Emil Velikov <emil.l.velikov@gmail.com> - 2015-08-13 13:50 +0200
  Re: [PATCH 3/7] drm/vc4: Add KMS support for Raspberry Pi. Eric Anholt <eric@anholt.net> - 2015-08-13 22:50 +0200
    Re: [PATCH 3/7] drm/vc4: Add KMS support for Raspberry Pi. Daniel Vetter <daniel@ffwll.ch> - 2015-08-13 23:20 +0200
      Re: [PATCH 3/7] drm/vc4: Add KMS support for Raspberry Pi. Eric Anholt <eric@anholt.net> - 2015-08-18 23:00 +0200
    Re: [PATCH 3/7] drm/vc4: Add KMS support for Raspberry Pi. Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-08-13 23:30 +0200
      Re: [PATCH 3/7] drm/vc4: Add KMS support for Raspberry Pi. Eric Anholt <eric@anholt.net> - 2015-08-14 01:10 +0200
  Re: [PATCH 3/7] drm/vc4: Add KMS support for Raspberry Pi. Stephen Warren <swarren@wwwdotorg.org> - 2015-08-15 06:50 +0200
    Re: [PATCH 3/7] drm/vc4: Add KMS support for Raspberry Pi. Eric Anholt <eric@anholt.net> - 2015-08-17 20:00 +0200

csiph-web