* [PATCH 1/2] drm/radeon/mst: fix regression in lane/link handling.
@ 2016-03-21 23:38 Dave Airlie
2016-03-21 23:38 ` [PATCH 2/2] drm/radeon/mst: cleanup code indentation Dave Airlie
0 siblings, 1 reply; 3+ messages in thread
From: Dave Airlie @ 2016-03-21 23:38 UTC (permalink / raw)
To: dri-devel
From: Dave Airlie <airlied@redhat.com>
The function this used changed in
092c96a8ab9d1bd60ada2ed385cc364ce084180e
drm/radeon: fix dp link rate selection (v2)
However for MST we should just always train to the
max link/rate. Though we probably need to limit this
for future hw, in theory radeon won't support it.
This fixes my 30" monitor with MST enabled.
Cc: stable@vger.kernel.org # v4.4
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/radeon/radeon_dp_mst.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
index df7a171..9d210bb 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
@@ -525,17 +525,9 @@ static bool radeon_mst_mode_fixup(struct drm_encoder *encoder,
drm_mode_set_crtcinfo(adjusted_mode, 0);
{
struct radeon_connector_atom_dig *dig_connector;
- int ret;
-
dig_connector = mst_enc->connector->con_priv;
- ret = radeon_dp_get_dp_link_config(&mst_enc->connector->base,
- dig_connector->dpcd, adjusted_mode->clock,
- &dig_connector->dp_lane_count,
- &dig_connector->dp_clock);
- if (ret) {
- dig_connector->dp_lane_count = 0;
- dig_connector->dp_clock = 0;
- }
+ dig_connector->dp_lane_count = drm_dp_max_lane_count(dig_connector->dpcd);
+ dig_connector->dp_clock = drm_dp_max_link_rate(dig_connector->dpcd);
DRM_DEBUG_KMS("dig clock %p %d %d\n", dig_connector,
dig_connector->dp_lane_count, dig_connector->dp_clock);
}
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] drm/radeon/mst: cleanup code indentation
2016-03-21 23:38 [PATCH 1/2] drm/radeon/mst: fix regression in lane/link handling Dave Airlie
@ 2016-03-21 23:38 ` Dave Airlie
2016-03-22 20:06 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Dave Airlie @ 2016-03-21 23:38 UTC (permalink / raw)
To: dri-devel
From: Dave Airlie <airlied@redhat.com>
This was all sorts of ugly from when I hacked it up,
just clean it up now and remove the extra indents.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/radeon/radeon_dp_mst.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
index 9d210bb..43cffb5 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
@@ -510,6 +510,7 @@ static bool radeon_mst_mode_fixup(struct drm_encoder *encoder,
{
struct radeon_encoder_mst *mst_enc;
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
+ struct radeon_connector_atom_dig *dig_connector;
int bpp = 24;
mst_enc = radeon_encoder->enc_priv;
@@ -523,14 +524,11 @@ static bool radeon_mst_mode_fixup(struct drm_encoder *encoder,
drm_mode_set_crtcinfo(adjusted_mode, 0);
- {
- struct radeon_connector_atom_dig *dig_connector;
- dig_connector = mst_enc->connector->con_priv;
- dig_connector->dp_lane_count = drm_dp_max_lane_count(dig_connector->dpcd);
- dig_connector->dp_clock = drm_dp_max_link_rate(dig_connector->dpcd);
- DRM_DEBUG_KMS("dig clock %p %d %d\n", dig_connector,
- dig_connector->dp_lane_count, dig_connector->dp_clock);
- }
+ dig_connector = mst_enc->connector->con_priv;
+ dig_connector->dp_lane_count = drm_dp_max_lane_count(dig_connector->dpcd);
+ dig_connector->dp_clock = drm_dp_max_link_rate(dig_connector->dpcd);
+ DRM_DEBUG_KMS("dig clock %p %d %d\n", dig_connector,
+ dig_connector->dp_lane_count, dig_connector->dp_clock);
return true;
}
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] drm/radeon/mst: cleanup code indentation
2016-03-21 23:38 ` [PATCH 2/2] drm/radeon/mst: cleanup code indentation Dave Airlie
@ 2016-03-22 20:06 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2016-03-22 20:06 UTC (permalink / raw)
To: Dave Airlie; +Cc: Maling list - DRI developers
On Mon, Mar 21, 2016 at 7:38 PM, Dave Airlie <airlied@gmail.com> wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> This was all sorts of ugly from when I hacked it up,
> just clean it up now and remove the extra indents.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
Applied the series to my fixes tree, thanks!
Alex
> ---
> drivers/gpu/drm/radeon/radeon_dp_mst.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> index 9d210bb..43cffb5 100644
> --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
> +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> @@ -510,6 +510,7 @@ static bool radeon_mst_mode_fixup(struct drm_encoder *encoder,
> {
> struct radeon_encoder_mst *mst_enc;
> struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
> + struct radeon_connector_atom_dig *dig_connector;
> int bpp = 24;
>
> mst_enc = radeon_encoder->enc_priv;
> @@ -523,14 +524,11 @@ static bool radeon_mst_mode_fixup(struct drm_encoder *encoder,
>
>
> drm_mode_set_crtcinfo(adjusted_mode, 0);
> - {
> - struct radeon_connector_atom_dig *dig_connector;
> - dig_connector = mst_enc->connector->con_priv;
> - dig_connector->dp_lane_count = drm_dp_max_lane_count(dig_connector->dpcd);
> - dig_connector->dp_clock = drm_dp_max_link_rate(dig_connector->dpcd);
> - DRM_DEBUG_KMS("dig clock %p %d %d\n", dig_connector,
> - dig_connector->dp_lane_count, dig_connector->dp_clock);
> - }
> + dig_connector = mst_enc->connector->con_priv;
> + dig_connector->dp_lane_count = drm_dp_max_lane_count(dig_connector->dpcd);
> + dig_connector->dp_clock = drm_dp_max_link_rate(dig_connector->dpcd);
> + DRM_DEBUG_KMS("dig clock %p %d %d\n", dig_connector,
> + dig_connector->dp_lane_count, dig_connector->dp_clock);
> return true;
> }
>
> --
> 2.5.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-22 20:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21 23:38 [PATCH 1/2] drm/radeon/mst: fix regression in lane/link handling Dave Airlie
2016-03-21 23:38 ` [PATCH 2/2] drm/radeon/mst: cleanup code indentation Dave Airlie
2016-03-22 20:06 ` Alex Deucher
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.