LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alyssa Rosenzweig <alyssa@collabora.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch,
	alyssa.rosenzweig@collabora.com, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/cma-helper: Set VM_DONTEXPAND for mmap
Date: Wed, 25 Aug 2021 21:15:45 -0400	[thread overview]
Message-ID: <YSbrQUNXx8vIugF7@maud> (raw)
In-Reply-To: <1c68be0449aa3217e2bbc898dd8c7426748fc6b8.1629902585.git.robin.murphy@arm.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 1272 bytes --]

> drm_gem_cma_mmap() cannot assume every implementation of dma_mmap_wc()
> will end up calling remap_pfn_range() (which happens to set the relevant
> vma flag, among others), so in order to make sure expectations around
> VM_DONTEXPAND are met, let it explicitly set the flag like most other
> GEM mmap implementations do.
> 
> This avoids repeated warnings on a small minority of systems where the
> display is behind an IOMMU, and has a simple driver which does not
> override drm_gem_cma_default_funcs.

Apple system-on-chips have their display behind an IOMMU. Actually, a
separate IOMMU for each display, and a separate IOMMU for each display
controller -- so there are 4 IOMMUs total for display on the M1.

I've tested this patch against my work-in-progress display driver for
the M1. It indeed fixes the annoying warnings every frame (wayland) and
on mode setting (x11). So this is

	Tested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>

I've cherry-picked the patch into my M1 staging/downstream tree, so I
guess that's an Acked-by. I don't know anything about the vm_* stuff in
the kernel yet, though, since can't give a reviewed-by. Will leave that
one to the pro's.

I know you were trying to fix an HDLCD issue, but I needed this patch
too, so thank you! 😄

      reply	other threads:[~2021-08-26  1:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 14:43 Robin Murphy
2021-08-26  1:15 ` Alyssa Rosenzweig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YSbrQUNXx8vIugF7@maud \
    --to=alyssa@collabora.com \
    --cc=airlied@linux.ie \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=tzimmermann@suse.de \
    --subject='Re: [PATCH] drm/cma-helper: Set VM_DONTEXPAND for mmap' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).