Displaying 20 results from an estimated 25 matches for "drm_dp_dpcd_read".
2019 Oct 22
0
[PATCH v5 08/14] drm/dp_mst: Lessen indenting in drm_dp_mst_topology_mgr_resume()
...p_mst_topology_mgr_suspend);
*/
int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr)
{
- int ret = 0;
+ int ret;
+ u8 guid[16];
mutex_lock(&mgr->lock);
+ if (!mgr->mst_primary)
+ goto out_fail;
- if (mgr->mst_primary) {
- int sret;
- u8 guid[16];
+ ret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, mgr->dpcd,
+ DP_RECEIVER_CAP_SIZE);
+ if (ret != DP_RECEIVER_CAP_SIZE) {
+ DRM_DEBUG_KMS("dpcd read failed - undocked during suspend?\n");
+ goto out_fail;
+ }
- sret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, mgr->dpcd, DP_RECEIVER_CAP_SIZE...
2020 Aug 19
2
[RFC 19/20] drm/i915/dp: Extract drm_dp_read_dpcd_caps()
...h could be at a value less than
> + * the true capability of the panel. The only way to check is to
> + * then compare 0000h and 2200h.
> + */
> + if (!(dpcd[DP_TRAINING_AUX_RD_INTERVAL] &
> + DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT))
> + return 0;
> +
> + ret = drm_dp_dpcd_read(aux, DP_DP13_DPCD_REV, &dpcd_ext,
> + sizeof(dpcd_ext));
> + if (ret != sizeof(dpcd_ext))
> + return -EIO;
> +
> + if (dpcd[DP_DPCD_REV] > dpcd_ext[DP_DPCD_REV]) {
> + DRM_DEBUG_KMS("%s: Extended DPCD rev less than base DPCD rev (%d > %d)\n",
> +...
2020 Aug 11
0
[RFC 19/20] drm/i915/dp: Extract drm_dp_read_dpcd_caps()
...d.
+ * If it is set DP_DPCD_REV at 0000h could be at a value less than
+ * the true capability of the panel. The only way to check is to
+ * then compare 0000h and 2200h.
+ */
+ if (!(dpcd[DP_TRAINING_AUX_RD_INTERVAL] &
+ DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT))
+ return 0;
+
+ ret = drm_dp_dpcd_read(aux, DP_DP13_DPCD_REV, &dpcd_ext,
+ sizeof(dpcd_ext));
+ if (ret != sizeof(dpcd_ext))
+ return -EIO;
+
+ if (dpcd[DP_DPCD_REV] > dpcd_ext[DP_DPCD_REV]) {
+ DRM_DEBUG_KMS("%s: Extended DPCD rev less than base DPCD rev (%d > %d)\n",
+ aux->name, dpcd[DP_DPCD_...
2020 Aug 20
0
[RFC v2 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...ixup logic for calculating the downstream port length to account for
the fact that downstream port caps can be either 1 byte or 4 bytes
long. We can actually skip fixing the max_clock/max_bpc helpers here
since they all check for DP_DETAILED_CAP_INFO_AVAILABLE anyway.
* Fix ret code check for drm_dp_dpcd_read
Signed-off-by: Lyude Paul <lyude at redhat.com>
---
drivers/gpu/drm/drm_dp_helper.c | 46 +++++++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_dp.c | 14 ++------
include/drm/drm_dp_helper.h | 3 ++
3 files changed, 51 insertions(+), 12 deletions(-)
diff --git...
2020 Aug 19
3
[RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
..._COUNT] & DP_PORT_COUNT_MASK) * 4;
I'm having a hard time rationalizing DP_MAX_DOWNSTREAM_PORTS being 16, but only
having 4 ports worth of data in the DP_DOWNSTREAM_PORT_* registers. Do you know
what's supposed to happen if dpcd[DP_DOWN_STREAM_PORT_COUNT] is > 4?
Sean
> + ret = drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, downstream_ports,
> + len);
> +
> + return ret == len ? 0 : -EIO;
> +}
> +EXPORT_SYMBOL(drm_dp_downstream_read_info);
> +
> /**
> * drm_dp_downstream_max_clock() - extract branch device max
> * pixel...
2019 Sep 27
1
[PATCH v2 25/27] drm/dp_mst: Add basic topology reprobing when resuming
...opology_mgr *mgr,
> + bool sync)
> {
> - int ret = 0;
> + int ret;
> + u8 guid[16];
>
> mutex_lock(&mgr->lock);
> + if (!mgr->mst_primary)
> + goto out_fail;
>
> - if (mgr->mst_primary) {
> - int sret;
> - u8 guid[16];
> + ret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, mgr->dpcd,
> + DP_RECEIVER_CAP_SIZE);
> + if (ret != DP_RECEIVER_CAP_SIZE) {
> + DRM_DEBUG_KMS("dpcd read failed - undocked during suspend?\n");
> + goto out_fail;
> + }
>
> - sret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV,...
2020 Aug 26
0
[PATCH v5 13/20] drm/i915/dp: Extract drm_dp_read_downstream_info()
...ixup logic for calculating the downstream port length to account for
the fact that downstream port caps can be either 1 byte or 4 bytes
long. We can actually skip fixing the max_clock/max_bpc helpers here
since they all check for DP_DETAILED_CAP_INFO_AVAILABLE anyway.
* Fix ret code check for drm_dp_dpcd_read
v5:
* Change name from drm_dp_downstream_read_info() to
drm_dp_read_downstream_info()
* Also, add "See Also" sections for the various downstream info
functions (drm_dp_read_downstream_info(), drm_dp_downstream_max_clock(),
drm_dp_downstream_max_bpc())
Reviewed-by: Sean Paul <sea...
2019 Sep 03
0
[PATCH v2 25/27] drm/dp_mst: Add basic topology reprobing when resuming
...logy_mgr *mgr)
+int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr,
+ bool sync)
{
- int ret = 0;
+ int ret;
+ u8 guid[16];
mutex_lock(&mgr->lock);
+ if (!mgr->mst_primary)
+ goto out_fail;
- if (mgr->mst_primary) {
- int sret;
- u8 guid[16];
+ ret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, mgr->dpcd,
+ DP_RECEIVER_CAP_SIZE);
+ if (ret != DP_RECEIVER_CAP_SIZE) {
+ DRM_DEBUG_KMS("dpcd read failed - undocked during suspend?\n");
+ goto out_fail;
+ }
- sret = drm_dp_dpcd_read(mgr->aux, DP_DPCD_REV, mgr->dpcd, DP_RECEIVER_CAP_SIZE...
2020 Aug 11
0
[RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...STREAM_PORTS);
+
+ /* No downstream info to read */
+ if (!drm_dp_is_branch(dpcd) ||
+ dpcd[DP_DPCD_REV] < DP_DPCD_REV_10 ||
+ !(dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT))
+ return 0;
+
+ len = (dpcd[DP_DOWN_STREAM_PORT_COUNT] & DP_PORT_COUNT_MASK) * 4;
+ ret = drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, downstream_ports,
+ len);
+
+ return ret == len ? 0 : -EIO;
+}
+EXPORT_SYMBOL(drm_dp_downstream_read_info);
+
/**
* drm_dp_downstream_max_clock() - extract branch device max
* pixel rate for legacy VGA
diff --git a/drivers/gpu...
2020 Aug 20
2
[RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...but if there's interest upstream in properly reporting the
> downstream port types of DP ports in userspace someone might want to consider
> coming up with another prop that accounts for multiple different downstream port
> types.
>
> > Sean
> >
> > > + ret = drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, downstream_ports,
> > > + len);
> > > +
> > > + return ret == len ? 0 : -EIO;
> > > +}
> > > +EXPORT_SYMBOL(drm_dp_downstream_read_info);
> > > +
> > > /**
> > > * drm_dp_downstream_max_cl...
2020 Aug 11
29
[RFC 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
...e an easier time with merging if they pull the pending patches for
nouveau from Ben's tree before merging drm-misc-next.
Lyude Paul (20):
drm/nouveau/kms: Fix some indenting in nouveau_dp_detect()
drm/nouveau/kms/nv50-: Remove open-coded drm_dp_read_desc()
drm/nouveau/kms/nv50-: Just use drm_dp_dpcd_read() in nouveau_dp.c
drm/nouveau/kms/nv50-: Use macros for DP registers in nouveau_dp.c
drm/nouveau/kms: Don't clear DP_MST_CTRL DPCD in nv50_mstm_new()
drm/nouveau/kms: Search for encoders' connectors properly
drm/nouveau/kms/nv50-: Use drm_dp_dpcd_(readb|writeb)() in
nv50_sor_dis...
2020 Aug 26
2
[RFC v4 16/20] drm/i915/dp: Extract drm_dp_get_sink_count()
...Aug 2020, Lyude Paul <lyude at redhat.com> wrote:
> And of course, we'll also need to read the sink count from other drivers
> as well if we're checking whether or not it's supported. So, let's
> extract the code for this into another helper.
>
> v2:
> * Fix drm_dp_dpcd_readb() ret check
> * Add back comment and move back sink_count assignment in intel_dp_get_dpcd()
>
> Signed-off-by: Lyude Paul <lyude at redhat.com>
> Reviewed-by: Sean Paul <sean at poorly.run>
> ---
> drivers/gpu/drm/drm_dp_helper.c | 22 ++++++++++++++++++++++
&...
2020 Aug 20
22
[RFC v2 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
...e an easier time with merging if they pull the pending patches for
nouveau from Ben's tree before merging drm-misc-next.
Lyude Paul (20):
drm/nouveau/kms: Fix some indenting in nouveau_dp_detect()
drm/nouveau/kms/nv50-: Remove open-coded drm_dp_read_desc()
drm/nouveau/kms/nv50-: Just use drm_dp_dpcd_read() in nouveau_dp.c
drm/nouveau/kms/nv50-: Use macros for DP registers in nouveau_dp.c
drm/nouveau/kms: Don't clear DP_MST_CTRL DPCD in nv50_mstm_new()
drm/nouveau/kms: Search for encoders' connectors properly
drm/nouveau/kms/nv50-: Use drm_dp_dpcd_(readb|writeb)() in
nv50_sor_dis...
2020 Aug 26
23
[PATCH v5 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
...might as
clean this code up and implement missing DP features like the ones
mentioned here before moving on to those tasks.
Lyude Paul (20):
drm/nouveau/kms: Fix some indenting in nouveau_dp_detect()
drm/nouveau/kms/nv50-: Remove open-coded drm_dp_read_desc()
drm/nouveau/kms/nv50-: Just use drm_dp_dpcd_read() in nouveau_dp.c
drm/nouveau/kms/nv50-: Use macros for DP registers in nouveau_dp.c
drm/nouveau/kms: Don't clear DP_MST_CTRL DPCD in nv50_mstm_new()
drm/nouveau/kms: Search for encoders' connectors properly
drm/nouveau/kms/nv50-: Use drm_dp_dpcd_(readb|writeb)() in
nv50_sor_dis...
2020 Aug 25
22
[RFC v4 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915
...might as
clean this code up and implement missing DP features like the ones
mentioned here before moving on to those tasks.
Lyude Paul (20):
drm/nouveau/kms: Fix some indenting in nouveau_dp_detect()
drm/nouveau/kms/nv50-: Remove open-coded drm_dp_read_desc()
drm/nouveau/kms/nv50-: Just use drm_dp_dpcd_read() in nouveau_dp.c
drm/nouveau/kms/nv50-: Use macros for DP registers in nouveau_dp.c
drm/nouveau/kms: Don't clear DP_MST_CTRL DPCD in nv50_mstm_new()
drm/nouveau/kms: Search for encoders' connectors properly
drm/nouveau/kms/nv50-: Use drm_dp_dpcd_(readb|writeb)() in
nv50_sor_dis...
2020 Aug 19
0
[RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...currently have the
time to do this, but if there's interest upstream in properly reporting the
downstream port types of DP ports in userspace someone might want to consider
coming up with another prop that accounts for multiple different downstream port
types.
> Sean
>
> > + ret = drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, downstream_ports,
> > + len);
> > +
> > + return ret == len ? 0 : -EIO;
> > +}
> > +EXPORT_SYMBOL(drm_dp_downstream_read_info);
> > +
> > /**
> > * drm_dp_downstream_max_clock() - extract branch device max
> &...
2019 Jul 18
2
[PATCH 00/26] DP MST Refactors + debugging tools + suspend/resume reprobing
This is the large series for adding MST suspend/resume reprobing that
I've been working on for quite a while now. In addition, I:
- Refactored and cleaned up any code I ended up digging through in the
process of understanding how some parts of these helpers worked.
- Added some debugging tools along the way that I ended up needing to
figure out some issues in my own code
Note that
2020 Aug 21
0
[RFC 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()
...ting the
> > downstream port types of DP ports in userspace someone might want to
> > consider
> > coming up with another prop that accounts for multiple different downstream
> > port
> > types.
> >
> > > Sean
> > >
> > > > + ret = drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0,
> > > > downstream_ports,
> > > > + len);
> > > > +
> > > > + return ret == len ? 0 : -EIO;
> > > > +}
> > > > +EXPORT_SYMBOL(drm_dp_downstream_read_info);
> > > > +
> > >...
2018 Nov 17
3
[PATCH 0/2] drm/nouveau: Fix DP AUX RPM issues
Here's some fixes for the less important DP AUX issues I mentioned a
while back.
Lyude Paul (2):
drm/dp: Add ->pre/post_transfer() hooks for drm_dp_aux
drm/nouveau: Grab an rpm reference before/after DP AUX transactions
drivers/gpu/drm/drm_dp_helper.c | 5 ++
drivers/gpu/drm/nouveau/nouveau_connector.c | 36 ++++++++
drivers/gpu/drm/nouveau/nouveau_drm.c | 12 ++-
2018 Aug 23
3
[PATCH 0/3] drm/nouveau: Fixup module probe to add ->shutdown()
This series is intended to add support for shutting down the GPU on
kernel shutdown/reboot using the ->shutdown() hook, similar to what
amdgpu does. This is mainly intended to workaround a bios issue on the
P50 that was preventing nouveau from initializing the dedicated GM107
GPU on that system properly. You can find more details on this issue in
the patch labeled "Shut down GPU on kernel