summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_lspcon.c
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2021-04-23 14:43:00 -0400
committerLyude Paul <lyude@redhat.com>2021-04-27 18:43:43 -0400
commit92ea222015f17203b43dd59b9541dcd26811bf4c (patch)
tree9b316037b6018bd0038118652e48e17586b083d5 /drivers/gpu/drm/i915/display/intel_lspcon.c
parent427e59d3b5d3cbfe75034002ae4580bf51a003c3 (diff)
drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect()
Since we're about to be using drm_dbg_*() throughout the DP helpers, we'll need to be able to access the DRM device in the dual mode DP helpers as well. Note however that since drm_dp_dual_mode_detect() can be called with DDC adapters that aren't part of a drm_dp_aux struct, we need to pass down the drm_device to these functions instead of using drm_dp_aux. Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210423184309.207645-9-lyude@redhat.com Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_lspcon.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_lspcon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
index e4ff533e3a69..ca25044e7d1b 100644
--- a/drivers/gpu/drm/i915/display/intel_lspcon.c
+++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
@@ -221,7 +221,8 @@ static bool lspcon_probe(struct intel_lspcon *lspcon)
{
int retry;
enum drm_dp_dual_mode_type adaptor_type;
- struct i2c_adapter *adapter = &lspcon_to_intel_dp(lspcon)->aux.ddc;
+ struct intel_dp *intel_dp = lspcon_to_intel_dp(lspcon);
+ struct i2c_adapter *adapter = &intel_dp->aux.ddc;
enum drm_lspcon_mode expected_mode;
expected_mode = lspcon_wake_native_aux_ch(lspcon) ?
@@ -232,7 +233,7 @@ static bool lspcon_probe(struct intel_lspcon *lspcon)
if (retry)
usleep_range(500, 1000);
- adaptor_type = drm_dp_dual_mode_detect(adapter);
+ adaptor_type = drm_dp_dual_mode_detect(intel_dp->aux.drm_dev, adapter);
if (adaptor_type == DRM_DP_DUAL_MODE_LSPCON)
break;
}