All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not set
@ 2021-10-27 22:39 Alex Deucher
  2021-10-27 23:27 ` Lyude Paul
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Deucher @ 2021-10-27 22:39 UTC (permalink / raw)
  To: amd-gfx, dri-devel; +Cc: Alex Deucher, Lyude Paul, Dave Airlie

Need to guard some things with CONFIG_DRM_AMD_DC_DCN.

Fixes: 41724ea273cdda ("drm/amd/display: Add DP 2.0 MST DM Support")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Dave Airlie <airlied@gmail.com>
---

Lyude, can you apply this to topic/amdgpu-dp2.0-mst? or Dave, if it's
already pulled can you apply this to drm-next?

Thanks!

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c         | 2 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a02ca525610c..3f36dbb2c663 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -10723,9 +10723,9 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 	struct dm_crtc_state *dm_old_crtc_state;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 	struct dsc_mst_fairness_vars vars[MAX_PIPES];
-#endif
 	struct drm_dp_mst_topology_state *mst_state;
 	struct drm_dp_mst_topology_mgr *mgr;
+#endif
 
 	trace_amdgpu_dm_atomic_check_begin(state);
 
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 719cbec4c45e..c200e07d2fb2 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -219,7 +219,7 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
 	struct drm_dp_mst_topology_mgr *mst_mgr;
 	struct drm_dp_mst_port *mst_port;
 	bool ret;
-	u8 link_encoding_cap;
+	u8 link_encoding_cap = DP_8b_10b_ENCODING;
 
 	aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
 	/* Accessing the connector state is required for vcpi_slots allocation
@@ -239,7 +239,9 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
 
 	mst_port = aconnector->port;
 
+#if defined(CONFIG_DRM_AMD_DC_DCN)
 	link_encoding_cap = dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link);
+#endif
 
 	if (enable) {
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not set
  2021-10-27 22:39 [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not set Alex Deucher
@ 2021-10-27 23:27 ` Lyude Paul
  0 siblings, 0 replies; 8+ messages in thread
From: Lyude Paul @ 2021-10-27 23:27 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx, dri-devel; +Cc: Dave Airlie

Reviewed-by: Lyude Paul <lyude@redhat.com>

Will add to the topic branch right now

On Wed, 2021-10-27 at 18:39 -0400, Alex Deucher wrote:
> Need to guard some things with CONFIG_DRM_AMD_DC_DCN.
> 
> Fixes: 41724ea273cdda ("drm/amd/display: Add DP 2.0 MST DM Support")
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: Lyude Paul <lyude@redhat.com>
> Cc: Dave Airlie <airlied@gmail.com>
> ---
> 
> Lyude, can you apply this to topic/amdgpu-dp2.0-mst? or Dave, if it's
> already pulled can you apply this to drm-next?
> 
> Thanks!
> 
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c         | 2 +-
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 4 +++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index a02ca525610c..3f36dbb2c663 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -10723,9 +10723,9 @@ static int amdgpu_dm_atomic_check(struct drm_device
> *dev,
>         struct dm_crtc_state *dm_old_crtc_state;
>  #if defined(CONFIG_DRM_AMD_DC_DCN)
>         struct dsc_mst_fairness_vars vars[MAX_PIPES];
> -#endif
>         struct drm_dp_mst_topology_state *mst_state;
>         struct drm_dp_mst_topology_mgr *mgr;
> +#endif
>  
>         trace_amdgpu_dm_atomic_check_begin(state);
>  
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> index 719cbec4c45e..c200e07d2fb2 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
> @@ -219,7 +219,7 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
>         struct drm_dp_mst_topology_mgr *mst_mgr;
>         struct drm_dp_mst_port *mst_port;
>         bool ret;
> -       u8 link_encoding_cap;
> +       u8 link_encoding_cap = DP_8b_10b_ENCODING;
>  
>         aconnector = (struct amdgpu_dm_connector *)stream-
> >dm_stream_context;
>         /* Accessing the connector state is required for vcpi_slots
> allocation
> @@ -239,7 +239,9 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
>  
>         mst_port = aconnector->port;
>  
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
>         link_encoding_cap =
> dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link);
> +#endif
>  
>         if (enable) {
>  

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not set
  2021-10-28 14:46 ` Alex Deucher
@ 2021-10-28 15:08   ` Kazlauskas, Nicholas
  0 siblings, 0 replies; 8+ messages in thread
From: Kazlauskas, Nicholas @ 2021-10-28 15:08 UTC (permalink / raw)
  To: Alex Deucher, Alex Deucher; +Cc: amd-gfx list

On 2021-10-28 10:46 a.m., Alex Deucher wrote:
> Ping
> 
> On Wed, Oct 27, 2021 at 6:40 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>>
>> Need to guard some things with CONFIG_DRM_AMD_DC_DCN.
>>
>> Fixes: 0c865d1d817b77 ("drm/amd/display: fix link training regression for 1 or 2 lane")
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Regards,
Nicholas Kazlauskas

>> ---
>>   drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 11 +++++++----
>>   1 file changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
>> index a9e940bd7e83..49a4d8e85bf8 100644
>> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
>> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
>> @@ -840,9 +840,11 @@ static void override_lane_settings(const struct link_training_settings *lt_setti
>>          uint32_t lane;
>>
>>          if (lt_settings->voltage_swing == NULL &&
>> -                       lt_settings->pre_emphasis == NULL &&
>> -                       lt_settings->ffe_preset == NULL &&
>> -                       lt_settings->post_cursor2 == NULL)
>> +           lt_settings->pre_emphasis == NULL &&
>> +#if defined(CONFIG_DRM_AMD_DC_DCN)
>> +           lt_settings->ffe_preset == NULL &&
>> +#endif
>> +           lt_settings->post_cursor2 == NULL)
>>
>>                  return;
>>
>> @@ -853,9 +855,10 @@ static void override_lane_settings(const struct link_training_settings *lt_setti
>>                          lane_settings[lane].PRE_EMPHASIS = *lt_settings->pre_emphasis;
>>                  if (lt_settings->post_cursor2)
>>                          lane_settings[lane].POST_CURSOR2 = *lt_settings->post_cursor2;
>> -
>> +#if defined(CONFIG_DRM_AMD_DC_DCN)
>>                  if (lt_settings->ffe_preset)
>>                          lane_settings[lane].FFE_PRESET = *lt_settings->ffe_preset;
>> +#endif
>>          }
>>   }
>>
>> --
>> 2.31.1
>>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not set
  2021-10-28 14:46   ` Alex Deucher
@ 2021-10-28 15:07     ` Kazlauskas, Nicholas
  0 siblings, 0 replies; 8+ messages in thread
From: Kazlauskas, Nicholas @ 2021-10-28 15:07 UTC (permalink / raw)
  To: Alex Deucher, Alex Deucher; +Cc: amd-gfx list

On 2021-10-28 10:46 a.m., Alex Deucher wrote:
> ping
> 
> On Wed, Oct 27, 2021 at 6:40 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>>
>> Need to guard some things with CONFIG_DRM_AMD_DC_DCN.
>>
>> Fixes: 707021dc0e16f6 ("drm/amd/display: Enable dpia in dmub only for DCN31 B0")
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Though this whole function could be guarded by DCN, DMUB doesn't exist 
on DCE.

Regards,
Nicholas Kazlauskas

>> ---
>>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> index 3f36dbb2c663..6dd6262f2769 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -1108,7 +1108,9 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
>>          case CHIP_YELLOW_CARP:
>>                  if (dc->ctx->asic_id.hw_internal_rev != YELLOW_CARP_A0) {
>>                          hw_params.dpia_supported = true;
>> +#if defined(CONFIG_DRM_AMD_DC_DCN)
>>                          hw_params.disable_dpia = dc->debug.dpia_debug.bits.disable_dpia;
>> +#endif
>>                  }
>>                  break;
>>          default:
>> --
>> 2.31.1
>>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not set
  2021-10-27 22:39 ` Alex Deucher
@ 2021-10-28 14:46   ` Alex Deucher
  2021-10-28 15:07     ` Kazlauskas, Nicholas
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Deucher @ 2021-10-28 14:46 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx list

ping

On Wed, Oct 27, 2021 at 6:40 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>
> Need to guard some things with CONFIG_DRM_AMD_DC_DCN.
>
> Fixes: 707021dc0e16f6 ("drm/amd/display: Enable dpia in dmub only for DCN31 B0")
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 3f36dbb2c663..6dd6262f2769 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -1108,7 +1108,9 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
>         case CHIP_YELLOW_CARP:
>                 if (dc->ctx->asic_id.hw_internal_rev != YELLOW_CARP_A0) {
>                         hw_params.dpia_supported = true;
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
>                         hw_params.disable_dpia = dc->debug.dpia_debug.bits.disable_dpia;
> +#endif
>                 }
>                 break;
>         default:
> --
> 2.31.1
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not set
  2021-10-27 22:39 Alex Deucher
  2021-10-27 22:39 ` Alex Deucher
@ 2021-10-28 14:46 ` Alex Deucher
  2021-10-28 15:08   ` Kazlauskas, Nicholas
  1 sibling, 1 reply; 8+ messages in thread
From: Alex Deucher @ 2021-10-28 14:46 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx list

Ping

On Wed, Oct 27, 2021 at 6:40 PM Alex Deucher <alexander.deucher@amd.com> wrote:
>
> Need to guard some things with CONFIG_DRM_AMD_DC_DCN.
>
> Fixes: 0c865d1d817b77 ("drm/amd/display: fix link training regression for 1 or 2 lane")
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> index a9e940bd7e83..49a4d8e85bf8 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> @@ -840,9 +840,11 @@ static void override_lane_settings(const struct link_training_settings *lt_setti
>         uint32_t lane;
>
>         if (lt_settings->voltage_swing == NULL &&
> -                       lt_settings->pre_emphasis == NULL &&
> -                       lt_settings->ffe_preset == NULL &&
> -                       lt_settings->post_cursor2 == NULL)
> +           lt_settings->pre_emphasis == NULL &&
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
> +           lt_settings->ffe_preset == NULL &&
> +#endif
> +           lt_settings->post_cursor2 == NULL)
>
>                 return;
>
> @@ -853,9 +855,10 @@ static void override_lane_settings(const struct link_training_settings *lt_setti
>                         lane_settings[lane].PRE_EMPHASIS = *lt_settings->pre_emphasis;
>                 if (lt_settings->post_cursor2)
>                         lane_settings[lane].POST_CURSOR2 = *lt_settings->post_cursor2;
> -
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
>                 if (lt_settings->ffe_preset)
>                         lane_settings[lane].FFE_PRESET = *lt_settings->ffe_preset;
> +#endif
>         }
>  }
>
> --
> 2.31.1
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not set
  2021-10-27 22:39 Alex Deucher
@ 2021-10-27 22:39 ` Alex Deucher
  2021-10-28 14:46   ` Alex Deucher
  2021-10-28 14:46 ` Alex Deucher
  1 sibling, 1 reply; 8+ messages in thread
From: Alex Deucher @ 2021-10-27 22:39 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

Need to guard some things with CONFIG_DRM_AMD_DC_DCN.

Fixes: 707021dc0e16f6 ("drm/amd/display: Enable dpia in dmub only for DCN31 B0")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 3f36dbb2c663..6dd6262f2769 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1108,7 +1108,9 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
 	case CHIP_YELLOW_CARP:
 		if (dc->ctx->asic_id.hw_internal_rev != YELLOW_CARP_A0) {
 			hw_params.dpia_supported = true;
+#if defined(CONFIG_DRM_AMD_DC_DCN)
 			hw_params.disable_dpia = dc->debug.dpia_debug.bits.disable_dpia;
+#endif
 		}
 		break;
 	default:
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not set
@ 2021-10-27 22:39 Alex Deucher
  2021-10-27 22:39 ` Alex Deucher
  2021-10-28 14:46 ` Alex Deucher
  0 siblings, 2 replies; 8+ messages in thread
From: Alex Deucher @ 2021-10-27 22:39 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

Need to guard some things with CONFIG_DRM_AMD_DC_DCN.

Fixes: 0c865d1d817b77 ("drm/amd/display: fix link training regression for 1 or 2 lane")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index a9e940bd7e83..49a4d8e85bf8 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -840,9 +840,11 @@ static void override_lane_settings(const struct link_training_settings *lt_setti
 	uint32_t lane;
 
 	if (lt_settings->voltage_swing == NULL &&
-			lt_settings->pre_emphasis == NULL &&
-			lt_settings->ffe_preset == NULL &&
-			lt_settings->post_cursor2 == NULL)
+	    lt_settings->pre_emphasis == NULL &&
+#if defined(CONFIG_DRM_AMD_DC_DCN)
+	    lt_settings->ffe_preset == NULL &&
+#endif
+	    lt_settings->post_cursor2 == NULL)
 
 		return;
 
@@ -853,9 +855,10 @@ static void override_lane_settings(const struct link_training_settings *lt_setti
 			lane_settings[lane].PRE_EMPHASIS = *lt_settings->pre_emphasis;
 		if (lt_settings->post_cursor2)
 			lane_settings[lane].POST_CURSOR2 = *lt_settings->post_cursor2;
-
+#if defined(CONFIG_DRM_AMD_DC_DCN)
 		if (lt_settings->ffe_preset)
 			lane_settings[lane].FFE_PRESET = *lt_settings->ffe_preset;
+#endif
 	}
 }
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-28 15:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 22:39 [PATCH] drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DCN is not set Alex Deucher
2021-10-27 23:27 ` Lyude Paul
2021-10-27 22:39 Alex Deucher
2021-10-27 22:39 ` Alex Deucher
2021-10-28 14:46   ` Alex Deucher
2021-10-28 15:07     ` Kazlauskas, Nicholas
2021-10-28 14:46 ` Alex Deucher
2021-10-28 15:08   ` Kazlauskas, Nicholas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.