search for: downstream_port

Displaying 20 results from an estimated 21 matches for "downstream_port".

Did you mean: downstream_ports
2020 Aug 19
3
[RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...d_checksum(struct drm_dp_aux *aux, > } > EXPORT_SYMBOL(drm_dp_send_real_edid_checksum); > > +/** > + * drm_dp_downstream_read_info() - read DPCD downstream port info if available > + * @aux: DisplayPort AUX channel > + * @dpcd: A cached copy of the port's DPCD > + * @downstream_ports: buffer to store the downstream port info in > + * > + * Returns: 0 if either the downstream port info was read successfully or > + * there was no downstream info to read, or a negative error code otherwise. > + */ > +int drm_dp_downstream_read_info(struct drm_dp_aux *aux, > +...
2020 Aug 11
0
[RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...3,6 +423,38 @@ bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux, } EXPORT_SYMBOL(drm_dp_send_real_edid_checksum); +/** + * drm_dp_downstream_read_info() - read DPCD downstream port info if available + * @aux: DisplayPort AUX channel + * @dpcd: A cached copy of the port's DPCD + * @downstream_ports: buffer to store the downstream port info in + * + * Returns: 0 if either the downstream port info was read successfully or + * there was no downstream info to read, or a negative error code otherwise. + */ +int drm_dp_downstream_read_info(struct drm_dp_aux *aux, + const u8 dpcd[DP_RECEIVER_CAP...
2020 Aug 20
0
[RFC v2 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...ivers/gpu/drm/drm_dp_helper.c index 4c21cf69dad5a..4f845995f1f66 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -423,6 +423,52 @@ bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux, } EXPORT_SYMBOL(drm_dp_send_real_edid_checksum); +static u8 drm_dp_downstream_port_count(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) +{ + u8 port_count = dpcd[DP_DOWN_STREAM_PORT_COUNT] & DP_PORT_COUNT_MASK; + + if (dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DETAILED_CAP_INFO_AVAILABLE && port_count > 4) + port_count = 4; + + return port_count; +} + +/** + * drm_dp_downstr...
2020 Aug 20
2
[RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...real_edid_checksum); > > > > > > +/** > > > + * drm_dp_downstream_read_info() - read DPCD downstream port info if > > > available > > > + * @aux: DisplayPort AUX channel > > > + * @dpcd: A cached copy of the port's DPCD > > > + * @downstream_ports: buffer to store the downstream port info in > > > + * > > > + * Returns: 0 if either the downstream port info was read successfully or > > > + * there was no downstream info to read, or a negative error code > > > otherwise. > > > + */ > > > +...
2020 Aug 26
0
[PATCH v5 13/20] drm/i915/dp: Extract drm_dp_read_downstream_info()
...ivers/gpu/drm/drm_dp_helper.c index 4c21cf69dad5a..f3643894ad951 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -423,6 +423,56 @@ bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux, } EXPORT_SYMBOL(drm_dp_send_real_edid_checksum); +static u8 drm_dp_downstream_port_count(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) +{ + u8 port_count = dpcd[DP_DOWN_STREAM_PORT_COUNT] & DP_PORT_COUNT_MASK; + + if (dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DETAILED_CAP_INFO_AVAILABLE && port_count > 4) + port_count = 4; + + return port_count; +} + +/** + * drm_dp_read_do...
2020 Aug 19
0
[RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...t; > EXPORT_SYMBOL(drm_dp_send_real_edid_checksum); > > > > +/** > > + * drm_dp_downstream_read_info() - read DPCD downstream port info if > > available > > + * @aux: DisplayPort AUX channel > > + * @dpcd: A cached copy of the port's DPCD > > + * @downstream_ports: buffer to store the downstream port info in > > + * > > + * Returns: 0 if either the downstream port info was read successfully or > > + * there was no downstream info to read, or a negative error code > > otherwise. > > + */ > > +int drm_dp_downstream_read_inf...
2020 Aug 21
0
[RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...> > > > > +/** > > > > + * drm_dp_downstream_read_info() - read DPCD downstream port info if > > > > available > > > > + * @aux: DisplayPort AUX channel > > > > + * @dpcd: A cached copy of the port's DPCD > > > > + * @downstream_ports: buffer to store the downstream port info in > > > > + * > > > > + * Returns: 0 if either the downstream port info was read successfully > > > > or > > > > + * there was no downstream info to read, or a negative error code > > > > otherwi...
2020 Sep 22
4
[PATCH] drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid()
...bpc */ enum drm_mode_status ret; if (mode->flags & DRM_MODE_FLAG_INTERLACE && !outp->caps.dp_interlace) return MODE_NO_INTERLACE; max_clock = outp->dp.link_nr * outp->dp.link_bw; - ds_clock = drm_dp_downstream_max_dotclock(outp->dp.dpcd, - outp->dp.downstream_ports); - if (ds_clock) - max_clock = min(max_clock, ds_clock); - - clock = mode->clock * (connector->display_info.bpc * 3) / 10; - ret = nouveau_conn_mode_clock_valid(mode, min_clock, max_clock, - &clock); + clock = mode->clock * bpp / 8; + if (clock > max_clock) + return MODE...
2020 Sep 29
2
[PATCH] drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid()
...gt;flags & DRM_MODE_FLAG_INTERLACE && !outp->caps.dp_interlace) > > return MODE_NO_INTERLACE; > > > > max_clock = outp->dp.link_nr * outp->dp.link_bw; > > - ds_clock = drm_dp_downstream_max_dotclock(outp->dp.dpcd, > > - outp->dp.downstream_ports); > > - if (ds_clock) > > - max_clock = min(max_clock, ds_clock); > > - > > - clock = mode->clock * (connector->display_info.bpc * 3) / 10; > > - ret = nouveau_conn_mode_clock_valid(mode, min_clock, max_clock, > > - &clock); > > + clock...
2020 Aug 26
0
[PATCH v5 14/20] drm/nouveau/kms/nv50-: Use downstream DP clock limits for mode validation
...0644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c @@ -61,6 +61,11 @@ nouveau_dp_probe_dpcd(struct nouveau_connector *nv_connector, mstm->can_mst = drm_dp_read_mst_cap(aux, dpcd); } + ret = drm_dp_read_downstream_info(aux, dpcd, + outp->dp.downstream_ports); + if (ret < 0) + return connector_status_disconnected; + return connector_status_connected; } @@ -176,8 +181,6 @@ void nouveau_dp_irq(struct nouveau_drm *drm, /* TODO: * - Use the minimum possible BPC here, once we add support for the max bpc * property. - * - Validate the mode a...
2020 Sep 29
1
[PATCH v2 1/2] drm/nouveau/kms/nv50-: Get rid of bogus nouveau_conn_mode_valid()
...tp->caps.dp_interlace) return MODE_NO_INTERLACE; + if ((mode->flags & DRM_MODE_FLAG_3D_MASK) == DRM_MODE_FLAG_3D_FRAME_PACKING) + clock *= 2; + max_clock = outp->dp.link_nr * outp->dp.link_bw; ds_clock = drm_dp_downstream_max_dotclock(outp->dp.dpcd, outp->dp.downstream_ports); @@ -245,9 +247,13 @@ nv50_dp_mode_valid(struct drm_connector *connector, max_clock = min(max_clock, ds_clock); clock = mode->clock * (connector->display_info.bpc * 3) / 10; - ret = nouveau_conn_mode_clock_valid(mode, min_clock, max_clock, - &clock); + if (clock < min_...
2020 Sep 22
0
[PATCH] drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid()
...&& !outp->caps.dp_interlace) > return MODE_NO_INTERLACE; > > max_clock = outp->dp.link_nr * outp->dp.link_bw; > - ds_clock = drm_dp_downstream_max_dotclock(outp->dp.dpcd, > - outp->dp.downstream_ports); > - if (ds_clock) > - max_clock = min(max_clock, ds_clock); > - > - clock = mode->clock * (connector->display_info.bpc * 3) / 10; > - ret = nouveau_conn_mode_clock_valid(mode, min_clock, max_clock, > -...
2020 Sep 28
0
[PATCH] drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid()
...> > if (mode->flags & DRM_MODE_FLAG_INTERLACE && !outp->caps.dp_interlace) > return MODE_NO_INTERLACE; > > max_clock = outp->dp.link_nr * outp->dp.link_bw; > - ds_clock = drm_dp_downstream_max_dotclock(outp->dp.dpcd, > - outp->dp.downstream_ports); > - if (ds_clock) > - max_clock = min(max_clock, ds_clock); > - > - clock = mode->clock * (connector->display_info.bpc * 3) / 10; > - ret = nouveau_conn_mode_clock_valid(mode, min_clock, max_clock, > - &clock); > + clock = mode->clock * bpp / 8; > +...
2020 Sep 29
0
[PATCH] drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid()
...LAG_INTERLACE && !outp->caps.dp_interlace) > > > return MODE_NO_INTERLACE; > > > > > > max_clock = outp->dp.link_nr * outp->dp.link_bw; > > > - ds_clock = drm_dp_downstream_max_dotclock(outp->dp.dpcd, > > > - outp->dp.downstream_ports); > > > - if (ds_clock) > > > - max_clock = min(max_clock, ds_clock); > > > - > > > - clock = mode->clock * (connector->display_info.bpc * 3) / 10; > > > - ret = nouveau_conn_mode_clock_valid(mode, min_clock, max_clock, > > > - &...
2020 Aug 26
23
[PATCH v5 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
Most of the reason I'm asking for an RFC here is because this code pulls a lot of code out of i915 and into shared DP helpers. Anyway-nouveau's HPD related code has been collecting dust for a while. Other then the occasional runtime PM related and MST related fixes, we're missing a lot of nice things that have been added to DRM since this was originally written. Additionally, the code
2020 Aug 11
0
[RFC 17/20] drm/nouveau/kms/nv50-: Add support for DP_SINK_COUNT
...goto out; + + outp->dp.sink_count = ret; + + /* + * Dongle connected, but no display. Don't bother reading + * downstream port info + */ + if (!outp->dp.sink_count) + return connector_status_disconnected; + } + ret = drm_dp_downstream_read_info(aux, dpcd, outp->dp.downstream_ports); if (ret < 0) - return connector_status_disconnected; + goto out; - return connector_status_connected; + status = connector_status_connected; +out: + if (status != connector_status_connected) { + /* Clear any cached info */ + outp->dp.sink_count = 0; + } + return status; } int @...
2020 Aug 11
29
[RFC 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
To start off: this patch series is less work to review then it looks - most (but not all) of the nouveau related work has already been reviewed elsewhere. Most of the reason I'm asking for an RFC here is because this code pulls a lot of code out of i915 and into shared DP helpers. Anyway-nouveau's HPD related code has been collecting dust for a while. Other then the occasional runtime PM
2020 Aug 20
22
[RFC v2 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
To start off: this patch series is less work to review then it looks - most (but not all) of the nouveau related work has already been reviewed elsewhere. Most of the reason I'm asking for an RFC here is because this code pulls a lot of code out of i915 and into shared DP helpers. Anyway-nouveau's HPD related code has been collecting dust for a while. Other then the occasional runtime PM
2020 Sep 22
2
[PATCH] drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid()
...e) > > return MODE_NO_INTERLACE; > > > > max_clock = outp->dp.link_nr * outp->dp.link_bw; > > - ds_clock = drm_dp_downstream_max_dotclock(outp->dp.dpcd, > > - outp- > > >dp.downstream_ports); > > - if (ds_clock) > > - max_clock = min(max_clock, ds_clock); > > - > > - clock = mode->clock * (connector->display_info.bpc * 3) / 10; > > - ret = nouveau_conn_mode_clock_valid(mode, min_clock, max_clock, > > -...
2020 Aug 25
22
[RFC v4 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
Most of the reason I'm asking for an RFC here is because this code pulls a lot of code out of i915 and into shared DP helpers. Anyway-nouveau's HPD related code has been collecting dust for a while. Other then the occasional runtime PM related and MST related fixes, we're missing a lot of nice things that have been added to DRM since this was originally written. Additionally, the code