public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Daniel Vetter <daniel.vetter@ffwll•ch>, Dave Airlie <airlied@redhat•com>
Cc: Alex Deucher <alexdeucher@gmail•com>,
	Alex Deucher <alexander.deucher@amd•com>,
	Hamza Mahfooz <hamza.mahfooz@amd•com>,
	Leo Li <sunpeng.li@amd•com>,
	Intel Graphics <intel-gfx@lists•freedesktop.org>,
	DRI <dri-devel@lists•freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	Rodrigo Siqueira <rodrigo.siqueira@amd•com>
Subject: Re: linux-next: manual merge of the amdgpu tree with the drm-misc tree
Date: Wed, 28 Aug 2024 12:11:25 +1000	[thread overview]
Message-ID: <20240828121125.1d698246@canb.auug.org.au> (raw)
In-Reply-To: <20240826111022.41db1e95@canb.auug.org.au>

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

Hi all,

On Mon, 26 Aug 2024 11:10:22 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> Today's linux-next merge of the amdgpu tree got a conflict in:
> 
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> 
> between commits:
> 
>   537ef0f88897 ("drm/amd/display: use new vblank enable policy for DCN35+")
>   e45b6716de4b ("drm/amd/display: use a more lax vblank enable policy for DCN35+")
>   58a261bfc967 ("drm/amd/display: use a more lax vblank enable policy for older ASICs")
> 
> from the drm-misc tree and commit:
> 
>   7fb363c57522 ("drm/amd/display: Let drm_crtc_vblank_on/off manage interrupts")
> 
> from the amdgpu tree.
> 
> I fixed it up (I think - 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 --cc drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 34872eb4fc84,7d999e352df3..000000000000
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@@ -8229,66 -8248,12 +8242,35 @@@ static int amdgpu_dm_encoder_init(struc
>   
>   static void manage_dm_interrupts(struct amdgpu_device *adev,
>   				 struct amdgpu_crtc *acrtc,
>  -				 bool enable)
>  +				 struct dm_crtc_state *acrtc_state)
>   {
> - 	/*
> - 	 * We have no guarantee that the frontend index maps to the same
> - 	 * backend index - some even map to more than one.
> - 	 *
> - 	 * TODO: Use a different interrupt or check DC itself for the mapping.
> - 	 */
> - 	int irq_type =
> - 		amdgpu_display_crtc_idx_to_irq_type(
> - 			adev,
> - 			acrtc->crtc_id);
>  -	if (enable)
>  -		drm_crtc_vblank_on(&acrtc->base);
>  -	else
>  +	struct drm_vblank_crtc_config config = {0};
>  +	struct dc_crtc_timing *timing;
>  +	int offdelay;
>  +
>  +	if (acrtc_state) {
>  +		if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
>  +		    IP_VERSION(3, 5, 0) ||
>  +		    acrtc_state->stream->link->psr_settings.psr_version <
>  +		    DC_PSR_VERSION_UNSUPPORTED) {
>  +			timing = &acrtc_state->stream->timing;
>  +
>  +			/* at least 2 frames */
>  +			offdelay = DIV64_U64_ROUND_UP((u64)20 *
>  +						      timing->v_total *
>  +						      timing->h_total,
>  +						      timing->pix_clk_100hz);
>  +
>  +			config.offdelay_ms = offdelay ?: 30;
>  +		} else {
>  +			config.disable_immediate = true;
>  +		}
>  +
>  +		drm_crtc_vblank_on_config(&acrtc->base,
>  +					  &config);
> - 
> - 		amdgpu_irq_get(
> - 			adev,
> - 			&adev->pageflip_irq,
> - 			irq_type);
> - #if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
> - 		amdgpu_irq_get(
> - 			adev,
> - 			&adev->vline0_irq,
> - 			irq_type);
> - #endif
>  +	} else {
> - #if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
> - 		amdgpu_irq_put(
> - 			adev,
> - 			&adev->vline0_irq,
> - 			irq_type);
> - #endif
> - 		amdgpu_irq_put(
> - 			adev,
> - 			&adev->pageflip_irq,
> - 			irq_type);
>   		drm_crtc_vblank_off(&acrtc->base);
>  +	}
>   }
>   
>   static void dm_update_pflip_irq_state(struct amdgpu_device *adev,

This is now a conflict between the drm-misc tree and the drm tree.

-- 
Cheers,
Stephen Rothwell

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

  reply	other threads:[~2024-08-28  2:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26  1:10 linux-next: manual merge of the amdgpu tree with the drm-misc tree Stephen Rothwell
2024-08-28  2:11 ` Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-07-17  2:46 Stephen Rothwell
2023-05-15  1:18 Stephen Rothwell
2023-01-16  0:48 Stephen Rothwell
2022-11-16  0:09 Stephen Rothwell
2022-04-06  0:34 Stephen Rothwell
2022-04-13  0:10 ` Stephen Rothwell
2022-04-29  1:13   ` Stephen Rothwell
2022-04-29 10:38     ` Christian König
2021-12-13 15:08 broonie
2021-06-03  2:48 Stephen Rothwell
2021-06-03  2:55 ` Stephen Rothwell
2021-06-04  2:33 ` Stephen Rothwell
2021-05-21  1:42 Stephen Rothwell
2021-05-21  1:38 Stephen Rothwell
2021-05-21  1:20 Stephen Rothwell
2021-05-21  1:16 Stephen Rothwell
2021-05-12  0:20 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=20240828121125.1d698246@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=airlied@redhat$(echo .)com \
    --cc=alexander.deucher@amd$(echo .)com \
    --cc=alexdeucher@gmail$(echo .)com \
    --cc=daniel.vetter@ffwll$(echo .)ch \
    --cc=dri-devel@lists$(echo .)freedesktop.org \
    --cc=hamza.mahfooz@amd$(echo .)com \
    --cc=intel-gfx@lists$(echo .)freedesktop.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=rodrigo.siqueira@amd$(echo .)com \
    --cc=sunpeng.li@amd$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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