Linux-Next discussions
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Dave Airlie <airlied@redhat.com>, DRI <dri-devel@lists.freedesktop.org>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Leo Li <sunpeng.li@amd.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Mario Limonciello <mario.limonciello@amd.com>,
	Matthew Schwartz <matthew.schwartz@linux.dev>
Subject: linux-next: manual merge of the drm tree with the drm-fixes tree
Date: Sun, 26 Jul 2026 22:24:59 +0100	[thread overview]
Message-ID: <amZ7K1lh3UDTqlf8@sirena.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 5056 bytes --]

Hi all,

Today's linux-next merge of the drm tree got a conflict in:

  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c

between commits:

  8382cd234981a ("drm/amd/display: consolidate DCN vblank/flip handling onto vupdate_no_lock")
  82730dba0cf9d ("drm/amd/display: Fix flip-done timeouts on mode1 reset")

from the drm-fixes tree and commit:

  c87e6635d2db0 ("drm/amd/display: consolidate DCN vblank/flip handling onto vupdate_no_lock")

from the drm 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/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
index 95d3da3c4199b,d63688b9d93dd..0000000000000
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
@@@ -34,6 -34,7 +34,7 @@@
  #include "amdgpu_dm_plane.h"
  #include "amdgpu_dm_trace.h"
  #include "amdgpu_dm_debugfs.h"
+ #include "amdgpu_dm_kunit_helpers.h"
  #include "modules/inc/mod_power.h"
  
  #define HPD_DETECTION_PERIOD_uS 2000000
@@@ -65,6 -66,7 +66,7 @@@ bool amdgpu_dm_crtc_modeset_required(st
  {
  	return crtc_state->active && drm_atomic_crtc_needs_modeset(crtc_state);
  }
+ EXPORT_IF_KUNIT(amdgpu_dm_crtc_modeset_required);
  
  bool amdgpu_dm_crtc_vrr_active_irq(struct amdgpu_crtc *acrtc)
  
@@@ -74,6 -76,7 +76,7 @@@
  	       acrtc->dm_irq_params.freesync_config.state ==
  		       VRR_STATE_ACTIVE_FIXED;
  }
+ EXPORT_IF_KUNIT(amdgpu_dm_crtc_vrr_active_irq);
  
  int amdgpu_dm_crtc_set_vupdate_irq(struct drm_crtc *crtc, bool enable)
  {
@@@ -93,12 -96,14 +96,14 @@@
  		      acrtc->crtc_id, enable ? "en" : "dis", rc);
  	return rc;
  }
+ EXPORT_IF_KUNIT(amdgpu_dm_crtc_set_vupdate_irq);
  
  bool amdgpu_dm_crtc_vrr_active(const struct dm_crtc_state *dm_state)
  {
  	return dm_state->freesync_config.state == VRR_STATE_ACTIVE_VARIABLE ||
  	       dm_state->freesync_config.state == VRR_STATE_ACTIVE_FIXED;
  }
+ EXPORT_IF_KUNIT(amdgpu_dm_crtc_vrr_active);
  
  /**
   * amdgpu_dm_crtc_set_static_screen_optimze() - Toggle static screen optimizations.
@@@ -156,6 -161,7 +161,7 @@@ bool amdgpu_dm_is_headless(struct amdgp
  	drm_connector_list_iter_end(&iter);
  	return is_headless;
  }
+ EXPORT_IF_KUNIT(amdgpu_dm_is_headless);
  
  static void amdgpu_dm_idle_worker(struct work_struct *work)
  {
@@@ -207,6 -213,7 +213,7 @@@ struct idle_workqueue *idle_create_work
  
  	return idle_work;
  }
+ EXPORT_IF_KUNIT(idle_create_workqueue);
  
  static void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work)
  {
@@@ -280,19 -287,10 +287,21 @@@ static inline int amdgpu_dm_crtc_set_vb
  	 * is enabled. On DCE, vupdate is only needed in VRR mode.
  	 */
  	if (amdgpu_ip_version(adev, DCE_HWIP, 0) != 0) {
+ 		rc = amdgpu_dm_crtc_set_vupdate_irq(crtc, enable);
+ 	} else if (dc_supports_vrr(dm->dc->ctx->dce_version)) {
  		if (enable) {
 -			/* vblank irq on -> Only need vupdate irq in vrr mode */
 +			rc = amdgpu_irq_get(adev, &adev->vupdate_irq, irq_type);
 +			drm_dbg_vbl(crtc->dev, "Get vupdate_irq ret=%d\n", rc);
 +		} else {
 +			rc = amdgpu_irq_put(adev, &adev->vupdate_irq, irq_type);
 +			drm_dbg_vbl(crtc->dev, "Put vupdate_irq ret=%d\n", rc);
 +		}
 +	} else if (dc_supports_vrr(dm->dc->ctx->dce_version)) {
 +		if (enable) {
 +			/* vblank irq on -> Only need vupdate irq in vrr mode
 +			 * Not ref-counted since we need explicit enable/disable
 +			 * for DCE VRR handling
 +			 */
  			if (amdgpu_dm_crtc_vrr_active(acrtc_state))
  				rc = amdgpu_dm_crtc_set_vupdate_irq(crtc, true);
  		} else {
@@@ -460,13 -458,13 +469,13 @@@ static void amdgpu_dm_crtc_reset_state(
  {
  	struct dm_crtc_state *state;
  
+ 	state = kzalloc_obj(*state);
+ 	if (!state)
+ 		return;
+ 
  	if (crtc->state)
  		amdgpu_dm_crtc_destroy_state(crtc, crtc->state);
  
- 	state = kzalloc_obj(*state);
- 	if (WARN_ON(!state))
- 		return;
- 
  	__drm_atomic_helper_crtc_reset(crtc, &state->base);
  }
  
@@@ -618,12 -616,13 +627,13 @@@ static void amdgpu_dm_crtc_update_crtc_
  		amdgpu_dm_crtc_count_crtc_active_planes(new_crtc_state);
  }
  
- static bool amdgpu_dm_crtc_helper_mode_fixup(struct drm_crtc *crtc,
- 				      const struct drm_display_mode *mode,
- 				      struct drm_display_mode *adjusted_mode)
+ STATIC_IFN_KUNIT bool amdgpu_dm_crtc_helper_mode_fixup(struct drm_crtc *crtc,
+ 					       const struct drm_display_mode *mode,
+ 					       struct drm_display_mode *adjusted_mode)
  {
  	return true;
  }
+ EXPORT_IF_KUNIT(amdgpu_dm_crtc_helper_mode_fixup);
  
  static int amdgpu_dm_crtc_helper_atomic_check(struct drm_crtc *crtc,
  					      struct drm_atomic_commit *state)

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

             reply	other threads:[~2026-07-26 21:25 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-26 21:24 Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-07-17 14:41 linux-next: manual merge of the drm tree with the drm-fixes tree Mark Brown
2026-07-17 14:40 Mark Brown
2026-07-17 14:40 Mark Brown
2026-07-17 14:40 Mark Brown
2026-07-17 14:40 Mark Brown
2026-07-17 14:40 Mark Brown
2026-07-17 15:12 ` Mark Brown
2026-07-10 12:11 Mark Brown
2026-05-29 22:00 Mark Brown
2026-04-03 13:33 Mark Brown
2026-03-27 20:52 Mark Brown
2026-03-27 20:46 Mark Brown
2026-03-09 14:35 Mark Brown
2026-03-06 13:47 Mark Brown
2026-03-06 13:47 Mark Brown
2026-01-30 15:37 Mark Brown
2026-01-30 15:28 Mark Brown
2026-01-23 17:45 Mark Brown
2025-06-27  2:58 Stephen Rothwell
2024-10-18  1:56 Stephen Rothwell
2024-06-27 15:08 Mark Brown
2024-06-27 15:00 Mark Brown
2024-06-21 13:21 Mark Brown
2023-08-18  1:53 Stephen Rothwell
2023-02-13  0:23 Stephen Rothwell
2022-09-26 17:49 broonie
2022-02-25 16:37 broonie
2022-02-24 16:33 broonie
2021-08-06 12:04 Mark Brown
2021-08-10 11:56 ` Geert Uytterhoeven
2021-08-10 12:53   ` Stephen Rothwell
2020-07-10  2:28 Stephen Rothwell
2019-08-23  3:20 Stephen Rothwell
2019-07-05  2:50 Stephen Rothwell
2019-03-01  2:23 Stephen Rothwell
2019-03-01 23:29 ` Alex Deucher
2019-03-04  0:54   ` Stephen Rothwell
2019-03-11 12:36     ` Daniel Vetter
2018-12-14  1:51 Stephen Rothwell
2018-12-07  2:38 Stephen Rothwell
2018-12-07  2:31 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=amZ7K1lh3UDTqlf8@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=airlied@redhat.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=matthew.schwartz@linux.dev \
    --cc=sunpeng.li@amd.com \
    /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