drm/dp_mst: Use the correct max source link rate for i915
Subsystems (3)
cover drm/dp_mst: Use the correct max source link rate for i915
This is a follow-up change to fix incorrectly used max link rate source capability at MST init time.
Change history:
v1:
- Initial
Nikola Cornij (1):
drm/dp_mst: Use the correct max source link rate for i915
drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/1 drm/dp_mst: Use the correct max source link rate for i915
[why]
Previously used value was not safe to provide the correct value, i.e. it could be 0 if not not configured, leading to no MST on this platform.
[how]
Do not use the value from BIOS, but from the structure populated at encoder initialization time.
--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +2 -3
@@ -942,7 +942,6 @@ intel_dp_mst_encoder_init(struct intel_digital_port *dig_port, int conn_base_id)struct intel_dp *intel_dp = &dig_port->dp;enum port port = dig_port->base.port;int ret; -int bios_max_link_rate;if (!HAS_DP_MST (i915) ||intel_dp_is_edp (intel_dp))return 0 ;
@@ -957,11 +956,11 @@ intel_dp_mst_encoder_init(struct intel_digital_port *dig_port, int conn_base_id)/* create encoders */ intel_dp_create_fake_mst_encoders (dig_port); - bios_max_link_rate =intel_bios_dp_max_link_rate (&dig_port->base); ret =drm_dp_mst_topology_mgr_init (&intel_dp->mst_mgr, &i915->drm, &intel_dp->aux,16 ,3 , (u8 )dig_port->max_lanes, - (u8)(bios_max_link_rate /27000 ), conn_base_id); + (u8)(intel_dp->source_rates[intel_dp->num_source_rates -1 ] /27000 ), + conn_base_id);if (ret)return ret;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 41 lines · Nikola Cornij
[why]
Previously used value was not safe to provide the correct value, i.e. it could be 0 if not not configured, leading to no MST on this platform.[how]
Do not use the value from BIOS, but from the structure populated at encoder initialization time.Fixes 98025a62cb00 ("drm/dp_mst: Use Extended Base Receiver Capability DPCDspace")
Signed-off-by Nikola Cornij <[email protected]>---
drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++---1 file changed, 2 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-1@@ -942,7 +942,6 @@ intel_dp_mst_encoder_init(struct intel_digital_port *dig_port, int conn_base_id) struct intel_dp *intel_dp = &dig_port->dp; enum port port = dig_port->base.port; int ret; - int bios_max_link_rate;
if (!HAS_DP_MST(i915) ||intel_dp_is_edp(intel_dp)) return 0;drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-0@@ -957,11 +956,11 @@ intel_dp_mst_encoder_init(struct intel_digital_port *dig_port, int conn_base_id)
/* create encoders */intel_dp_create_fake_mst_encoders(dig_port);
- bios_max_link_rate =intel_bios_dp_max_link_rate(&dig_port->base); ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr,&i915->drm,&intel_dp->aux, 16, 3, (u8)dig_port->max_lanes, - (u8)(bios_max_link_rate / 27000),conn_base_id);
+ (u8)(intel_dp-
Quoted 2 lines
Quoted 1 line
source_rates[intel_dp->num_source_rates - 1] / 27000),
+
conn_base_id);
This line is kind of long, I'd say we should just store the max link rate in a local variable like max_link_rate, then just pass that to drm_dp_mst_topology_mgr_init()
Also, the commit message should probably be:
drm/i915: Use the correct max source link rate for MST
With those two things fixed:
Quoted 3 lines
if (ret)
return ret;
Signature · 13 lines
Sincerely, Lyude Paul (she/her) Software Engineer at Red Hat Note: I deal with a lot of emails and have a lot of bugs on my plate. If you've asked me a question, are waiting for a review/merge on a patch, etc. and I haven't responded in a while, please feel free to send me another email to check on my status. I don't bite! _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/dp_mst: Use the correct max source link rate for i915
In reply to Nikola Cornij== Series Details ==
== Series Details ==
Series: drm/dp_mst: Use the correct max source link rate for i915
URL : https://patchwork.freedesktop.org/series/89712/
State : failure
== Summary ==
Applying: drm/dp_mst: Use the correct max source link rate for i915 Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_dp_mst.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_dp_mst.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_dp_mst.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 drm/dp_mst: Use the correct max source link rate for i915 When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx