Subject: linux-next: manual merge of the amdgpu tree with the drm-fixes tree

From: Stephen Rothwell <[email-masked]>
Date: Fri, 23 Jul 2021 12:58:07 +1000

Hi all,

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

  drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

between commit:

  6be50f5d83ad ("drm/amd/display: Fix ASSR regression on embedded panels")

from the drm-fixes tree and commit:

  fb85f280bf40 ("drm/amd/display: Re-enable "Guard ASSR with internal display flag"")

from the amdgpu 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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 9fb8c46dc606,036a87af6c5b..000000000000
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@@ -1761,6 -1752,38 +1752,36 @@@ enum link_training_result dc_link_dp_pe
  	return status;
  }
  
+ static enum dp_panel_mode try_enable_assr(struct dc_stream_state *stream)
+ {
+ 	struct dc_link *link = stream->link;
+ 	enum dp_panel_mode panel_mode = dp_get_panel_mode(link);
+ #ifdef CONFIG_DRM_AMD_DC_HDCP
+ 	struct cp_psp *cp_psp = &stream->ctx->cp_psp;
+ #endif
+ 
+ 	/* ASSR must be supported on the panel */
+ 	if (panel_mode == DP_PANEL_MODE_DEFAULT)
+ 		return panel_mode;
+ 
+ 	/* eDP or internal DP only */
+ 	if (link->connector_signal != SIGNAL_TYPE_EDP &&
+ 		!(link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT &&
+ 		 link->is_internal_display))
+ 		return DP_PANEL_MODE_DEFAULT;
+ 
+ #ifdef CONFIG_DRM_AMD_DC_HDCP
+ 	if (cp_psp && cp_psp->funcs.enable_assr) {
+ 		if (!cp_psp->funcs.enable_assr(cp_psp->handle, link)) {
+ 			/* since eDP implies ASSR on, change panel
+ 			 * mode to disable ASSR
+ 			 */
+ 			panel_mode = DP_PANEL_MODE_DEFAULT;
+ 		}
 -	} else
 -		panel_mode = DP_PANEL_MODE_DEFAULT;
+ #endif
+ 	return panel_mode;
+ }
+ 
  bool perform_link_training_with_retries(
  	const struct dc_link_settings *link_setting,
  	bool skip_video_pattern,