public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
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: Mon, 30 Mar 2026 17:02:03 +0100	[thread overview]
Message-ID: <acqee1y4jIIuFlJe@sirena.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 2859 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")

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 044f0d4ebf555,2062ca6078330..0000000000000
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@@ -554,20 -554,24 +554,20 @@@ int drm_gem_shmem_dumb_create(struct dr
  }
  EXPORT_SYMBOL_GPL(drm_gem_shmem_dumb_create);
  
 -static vm_fault_t try_insert_pfn(struct vm_fault *vmf, unsigned int order,
 -				 unsigned long pfn)
 +static vm_fault_t drm_gem_shmem_try_insert_pfn_pmd(struct vm_fault *vmf, unsigned long pfn)
  {
 -	if (!order) {
 -		return vmf_insert_pfn(vmf->vma, vmf->address, pfn);
  #ifdef CONFIG_ARCH_SUPPORTS_PMD_PFNMAP
 -	} else if (order == PMD_ORDER) {
 -		unsigned long paddr = pfn << PAGE_SHIFT;
 -		bool aligned = (vmf->address & ~PMD_MASK) == (paddr & ~PMD_MASK);
 +	unsigned long paddr = pfn << PAGE_SHIFT;
 +	bool aligned = (vmf->address & ~PMD_MASK) == (paddr & ~PMD_MASK);
  
 -		if (aligned &&
 -		    folio_test_pmd_mappable(page_folio(pfn_to_page(pfn)))) {
 -			pfn &= PMD_MASK >> PAGE_SHIFT;
 -			return vmf_insert_pfn_pmd(vmf, pfn, false);
 -		}
 -#endif
 +	if (aligned && pmd_none(*vmf->pmd)) {
 +		/* Read-only mapping; split upon write fault */
 +		pfn &= PMD_MASK >> PAGE_SHIFT;
 +		return vmf_insert_pfn_pmd(vmf, pfn, false);
  	}
 -	return VM_FAULT_FALLBACK;
 +#endif
 +
 +	return 0;
  }
  
  static vm_fault_t drm_gem_shmem_any_fault(struct vm_fault *vmf, unsigned int order)
@@@ -584,6 -588,9 +584,9 @@@
  	struct folio *folio;
  	unsigned long pfn;
  
+ 	if (order && order != PMD_ORDER)
+ 		return VM_FAULT_FALLBACK;
+ 
  	dma_resv_lock(obj->resv, NULL);
  
  	if (page_offset >= num_pages || drm_WARN_ON_ONCE(dev, !shmem->pages) ||
@@@ -597,11 -604,7 +600,11 @@@
  
  	pfn = page_to_pfn(page);
  
 -	ret = try_insert_pfn(vmf, order, pfn);
 +	if (folio_test_pmd_mappable(folio))
 +		ret = drm_gem_shmem_try_insert_pfn_pmd(vmf, pfn);
 +	if (ret != VM_FAULT_NOPAGE)
 +		ret = vmf_insert_pfn(vma, vmf->address, pfn);
 +
  	if (ret == VM_FAULT_NOPAGE)
  		folio_mark_accessed(folio);
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-03-30 16:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 16:02 Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-04-03 13:34 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=acqee1y4jIIuFlJe@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