linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Wenjing Liu <wenjing.liu@amd.com>
Subject: linux-next: manual merge of the amdgpu tree with Linus' tree
Date: Wed, 12 Jan 2022 10:09:14 +1100	[thread overview]
Message-ID: <20220112100914.4354b1b3@canb.auug.org.au> (raw)

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

Hi all,

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

  drivers/gpu/drm/amd/display/dc/core/dc_resource.c
  drivers/gpu/drm/amd/display/dc/inc/resource.h

between commit:

  75b950ef6166 ("Revert "drm/amd/display: Fix for otg synchronization logic"")

from Linus' tree and commit:

  580013b2cef8 ("drm/amd/display: unhard code link to phy idx mapping in dc link and clean up")

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_resource.c
index de5c7d1e0267,b3912ff9dc91..000000000000
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@@ -3216,3 -3216,90 +3216,36 @@@ struct hpo_dp_link_encoder *resource_ge
  	return hpo_dp_link_enc;
  }
  #endif
+ 
 -void reset_syncd_pipes_from_disabled_pipes(struct dc *dc,
 -		struct dc_state *context)
 -{
 -	int i, j;
 -	struct pipe_ctx *pipe_ctx_old, *pipe_ctx, *pipe_ctx_syncd;
 -
 -	/* If pipe backend is reset, need to reset pipe syncd status */
 -	for (i = 0; i < dc->res_pool->pipe_count; i++) {
 -		pipe_ctx_old =	&dc->current_state->res_ctx.pipe_ctx[i];
 -		pipe_ctx = &context->res_ctx.pipe_ctx[i];
 -
 -		if (!pipe_ctx_old->stream)
 -			continue;
 -
 -		if (pipe_ctx_old->top_pipe || pipe_ctx_old->prev_odm_pipe)
 -			continue;
 -
 -		if (!pipe_ctx->stream ||
 -				pipe_need_reprogram(pipe_ctx_old, pipe_ctx)) {
 -
 -			/* Reset all the syncd pipes from the disabled pipe */
 -			for (j = 0; j < dc->res_pool->pipe_count; j++) {
 -				pipe_ctx_syncd = &context->res_ctx.pipe_ctx[j];
 -				if ((GET_PIPE_SYNCD_FROM_PIPE(pipe_ctx_syncd) == pipe_ctx_old->pipe_idx) ||
 -					!IS_PIPE_SYNCD_VALID(pipe_ctx_syncd))
 -					SET_PIPE_SYNCD_TO_PIPE(pipe_ctx_syncd, j);
 -			}
 -		}
 -	}
 -}
 -
 -void check_syncd_pipes_for_disabled_master_pipe(struct dc *dc,
 -	struct dc_state *context,
 -	uint8_t disabled_master_pipe_idx)
 -{
 -	int i;
 -	struct pipe_ctx *pipe_ctx, *pipe_ctx_check;
 -
 -	pipe_ctx = &context->res_ctx.pipe_ctx[disabled_master_pipe_idx];
 -	if ((GET_PIPE_SYNCD_FROM_PIPE(pipe_ctx) != disabled_master_pipe_idx) ||
 -		!IS_PIPE_SYNCD_VALID(pipe_ctx))
 -		SET_PIPE_SYNCD_TO_PIPE(pipe_ctx, disabled_master_pipe_idx);
 -
 -	/* for the pipe disabled, check if any slave pipe exists and assert */
 -	for (i = 0; i < dc->res_pool->pipe_count; i++) {
 -		pipe_ctx_check = &context->res_ctx.pipe_ctx[i];
 -
 -		if ((GET_PIPE_SYNCD_FROM_PIPE(pipe_ctx_check) == disabled_master_pipe_idx) &&
 -			IS_PIPE_SYNCD_VALID(pipe_ctx_check) && (i != disabled_master_pipe_idx))
 -			DC_ERR("DC: Failure: pipe_idx[%d] syncd with disabled master pipe_idx[%d]\n",
 -				i, disabled_master_pipe_idx);
 -	}
 -}
 -
+ uint8_t resource_transmitter_to_phy_idx(const struct dc *dc, enum transmitter transmitter)
+ {
+ 	/* TODO - get transmitter to phy idx mapping from DMUB */
+ 	uint8_t phy_idx = transmitter - TRANSMITTER_UNIPHY_A;
+ 
+ #if defined(CONFIG_DRM_AMD_DC_DCN)
+ 	if (dc->ctx->dce_version == DCN_VERSION_3_1 &&
+ 			dc->ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0) {
+ 		switch (transmitter) {
+ 		case TRANSMITTER_UNIPHY_A:
+ 			phy_idx = 0;
+ 			break;
+ 		case TRANSMITTER_UNIPHY_B:
+ 			phy_idx = 1;
+ 			break;
+ 		case TRANSMITTER_UNIPHY_C:
+ 			phy_idx = 5;
+ 			break;
+ 		case TRANSMITTER_UNIPHY_D:
+ 			phy_idx = 6;
+ 			break;
+ 		case TRANSMITTER_UNIPHY_E:
+ 			phy_idx = 4;
+ 			break;
+ 		default:
+ 			phy_idx = 0;
+ 			break;
+ 		}
+ 	}
+ #endif
+ 	return phy_idx;
+ }
diff --cc drivers/gpu/drm/amd/display/dc/inc/resource.h
index e589cbe67307,028180f58f71..000000000000
--- a/drivers/gpu/drm/amd/display/dc/inc/resource.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/resource.h
@@@ -208,4 -212,12 +208,6 @@@ struct hpo_dp_link_encoder *resource_ge
  		const struct dc_link *link);
  #endif
  
 -void reset_syncd_pipes_from_disabled_pipes(struct dc *dc,
 -	struct dc_state *context);
 -
 -void check_syncd_pipes_for_disabled_master_pipe(struct dc *dc,
 -	struct dc_state *context,
 -	uint8_t disabled_master_pipe_idx);
+ uint8_t resource_transmitter_to_phy_idx(const struct dc *dc, enum transmitter transmitter);
+ 
  #endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */

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

             reply	other threads:[~2022-01-11 23:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 23:09 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-11-05 22:48 linux-next: manual merge of the amdgpu tree with Linus' tree Stephen Rothwell
2023-11-06 23:49 ` Stephen Rothwell
2023-07-24  1:14 Stephen Rothwell
2023-05-12  0:38 Stephen Rothwell
2022-07-19  2:00 Stephen Rothwell
2022-01-26 23:32 Stephen Rothwell
2022-01-26 23:29 Stephen Rothwell
2021-09-02  1:22 Stephen Rothwell
2021-09-10  1:16 ` Stephen Rothwell
2021-08-02 15:10 Mark Brown
2021-08-02 15:48 ` Mark Brown
2021-07-06  0:52 Stephen Rothwell
2021-01-15  0:53 Stephen Rothwell
2021-01-08  1:04 Stephen Rothwell
2020-11-03  3:10 Stephen Rothwell
2020-10-27  0:48 Stephen Rothwell
2020-10-16  1:48 Stephen Rothwell
2020-08-25  1:35 Stephen Rothwell
2020-07-22  4:34 Stephen Rothwell
2020-07-23  8:01 ` Daniel Vetter
2020-07-23 13:34   ` Alex Deucher
2019-12-12  0:03 Stephen Rothwell
2019-12-12  0:11 ` Stephen Rothwell
2019-12-12  0:16 ` Timothy Pearson
2019-12-11 23:37 Stephen Rothwell
2019-12-12  0:10 ` Stephen Rothwell
2019-10-28  1:11 Stephen Rothwell
2019-10-28  1:03 Stephen Rothwell
2019-10-28  0:57 Stephen Rothwell
2019-10-28  1:13 ` Masahiro Yamada
2019-10-03  0:19 Stephen Rothwell
2019-06-17  3:12 Stephen Rothwell
2019-03-18 23:55 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=20220112100914.4354b1b3@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wenjing.liu@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;
as well as URLs for NNTP newsgroup(s).