From: Mark Brown <broonie@kernel.org>
To: Simona Vetter <simona.vetter@ffwll.ch>,
Intel Graphics <intel-gfx@lists.freedesktop.org>,
DRI <dri-devel@lists.freedesktop.org>
Cc: Dave Airlie <airlied@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Maxime Ripard <mripard@kernel.org>
Subject: linux-next: manual merge of the drm-misc tree with the drm tree
Date: Fri, 3 Apr 2026 14:34:14 +0100 [thread overview]
Message-ID: <ac_B1p2wNP2Nk1RM@sirena.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 3356 bytes --]
Hi all,
Today's linux-next merge of the drm-misc tree got a conflict in:
drivers/gpu/drm/drm_gem_shmem_helper.c
between commits:
d9a4a2021d4a5 ("Merge tag 'drm-misc-next-2026-03-12' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next")
f6225b546dfcc ("BackMerge tag 'v7.0-rc6' into drm-next")
from the drm tree and commit:
6fdfd24017756 ("Merge drm/drm-fixes into drm-misc-next-fixes")
from the drm-misc tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined drivers/gpu/drm/drm_gem_shmem_helper.c
index 2062ca6078330,545933c7f7121..0000000000000
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@@ -554,6 -554,21 +554,21 @@@ int drm_gem_shmem_dumb_create(struct dr
}
EXPORT_SYMBOL_GPL(drm_gem_shmem_dumb_create);
+ static void drm_gem_shmem_record_mkwrite(struct vm_fault *vmf)
+ {
+ struct vm_area_struct *vma = vmf->vma;
+ struct drm_gem_object *obj = vma->vm_private_data;
+ struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
+ loff_t num_pages = obj->size >> PAGE_SHIFT;
+ pgoff_t page_offset = vmf->pgoff - vma->vm_pgoff; /* page offset within VMA */
+
+ if (drm_WARN_ON(obj->dev, !shmem->pages || page_offset >= num_pages))
+ return;
+
+ file_update_time(vma->vm_file);
+ folio_mark_dirty(page_folio(shmem->pages[page_offset]));
+ }
+
static vm_fault_t try_insert_pfn(struct vm_fault *vmf, unsigned int order,
unsigned long pfn)
{
@@@ -566,8 -581,23 +581,23 @@@
if (aligned &&
folio_test_pmd_mappable(page_folio(pfn_to_page(pfn)))) {
+ vm_fault_t ret;
+
pfn &= PMD_MASK >> PAGE_SHIFT;
- return vmf_insert_pfn_pmd(vmf, pfn, false);
+
+ /* Unlike PTEs which are automatically upgraded to
+ * writeable entries, the PMD upgrades go through
+ * .huge_fault(). Make sure we pass the "write" info
+ * along in that case.
+ * This also means we have to record the write fault
+ * here, instead of in .pfn_mkwrite().
+ */
+ ret = vmf_insert_pfn_pmd(vmf, pfn,
+ vmf->flags & FAULT_FLAG_WRITE);
+ if (ret == VM_FAULT_NOPAGE && (vmf->flags & FAULT_FLAG_WRITE))
+ drm_gem_shmem_record_mkwrite(vmf);
+
+ return ret;
}
#endif
}
@@@ -655,19 -685,7 +685,7 @@@ static void drm_gem_shmem_vm_close(stru
static vm_fault_t drm_gem_shmem_pfn_mkwrite(struct vm_fault *vmf)
{
- struct vm_area_struct *vma = vmf->vma;
- struct drm_gem_object *obj = vma->vm_private_data;
- struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
- loff_t num_pages = obj->size >> PAGE_SHIFT;
- pgoff_t page_offset = vmf->pgoff - vma->vm_pgoff; /* page offset within VMA */
-
- if (drm_WARN_ON(obj->dev, !shmem->pages || page_offset >= num_pages))
- return VM_FAULT_SIGBUS;
-
- file_update_time(vma->vm_file);
-
- folio_mark_dirty(page_folio(shmem->pages[page_offset]));
-
+ drm_gem_shmem_record_mkwrite(vmf);
return 0;
}
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2026-04-03 13:34 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 13:34 Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-30 16:02 linux-next: manual merge of the drm-misc tree with the drm tree Mark Brown
2026-03-30 16:02 Mark Brown
2025-07-01 3:07 Stephen Rothwell
2025-07-01 3:21 ` Stephen Rothwell
2022-11-09 23:54 Stephen Rothwell
2019-10-09 0:12 Stephen Rothwell
2019-10-09 0:10 Stephen Rothwell
2019-10-08 23:46 Stephen Rothwell
2019-10-08 23:38 Stephen Rothwell
2019-10-08 23:33 Stephen Rothwell
2019-08-19 3:18 Stephen Rothwell
2019-06-11 3:52 Stephen Rothwell
2019-06-11 3:38 Stephen Rothwell
2019-04-09 1:34 Stephen Rothwell
2019-04-09 7:23 ` Gerd Hoffmann
2019-02-08 1:27 Stephen Rothwell
2019-02-08 8:53 ` Daniel Vetter
2019-02-08 9:25 ` Stephen Rothwell
2019-02-08 9:34 ` Daniel Vetter
2018-11-23 0:13 Stephen Rothwell
2018-09-18 1:31 Stephen Rothwell
2018-09-12 0:39 Stephen Rothwell
2018-03-19 1:29 Stephen Rothwell
2018-03-19 14:14 ` Ville Syrjälä
2017-11-01 3:36 Stephen Rothwell
2017-04-03 3:18 Stephen Rothwell
2016-09-28 2:11 Stephen Rothwell
2014-12-10 1:49 Stephen Rothwell
2014-12-03 2:43 Stephen Rothwell
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=ac_B1p2wNP2Nk1RM@sirena.org.uk \
--to=broonie@kernel.org \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=simona.vetter@ffwll.ch \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox