Displaying 16 results from an estimated 16 matches for "drm_dp_dpcd_readb".
Did you mean:
drm_dp_dpcd_read
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 ++++++++++++++++++++++
&g...
2020 Aug 26
0
[RFC v4 16/20] drm/i915/dp: Extract drm_dp_get_sink_count()
...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...
2020 Aug 25
0
[RFC v4 16/20] drm/i915/dp: Extract drm_dp_get_sink_count()
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 ++++++++++++++++++++++
drivers/gpu/drm/i915/display/i...
2018 Aug 09
2
[PATCH 0/2] Fix display detection issues with P50-P52 docks
This fixes some annoying issues on the P50-P52 with displays not being
detected if they aren't plugged in at boot, and sometimes even when they
are plugged in at boot.
See: https://bugzilla.redhat.com/show_bug.cgi?id=1477182
Lyude Paul (2):
drm/nouveau: Only write DP_MSTM_CTRL when needed
drm/nouveau: Reset MST branching unit before enabling
drivers/gpu/drm/nouveau/dispnv50/disp.c | 65
2020 Aug 11
0
[RFC 09/20] drm/i915/dp: Extract drm_dp_has_mst()
...ntel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4699,20 +4699,6 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
return true;
}
-static bool
-intel_dp_sink_can_mst(struct intel_dp *intel_dp)
-{
- u8 mstm_cap;
-
- if (intel_dp->dpcd[DP_DPCD_REV] < 0x12)
- return false;
-
- if (drm_dp_dpcd_readb(&intel_dp->aux, DP_MSTM_CAP, &mstm_cap) != 1)
- return false;
-
- return mstm_cap & DP_MST_CAP;
-}
-
static bool
intel_dp_can_mst(struct intel_dp *intel_dp)
{
@@ -4720,7 +4706,7 @@ intel_dp_can_mst(struct intel_dp *intel_dp)
return i915->params.enable_dp_mst &&...
2020 Aug 25
0
[RFC v4 09/20] drm/i915/dp: Extract drm_dp_has_mst()
...ntel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4699,20 +4699,6 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
return true;
}
-static bool
-intel_dp_sink_can_mst(struct intel_dp *intel_dp)
-{
- u8 mstm_cap;
-
- if (intel_dp->dpcd[DP_DPCD_REV] < 0x12)
- return false;
-
- if (drm_dp_dpcd_readb(&intel_dp->aux, DP_MSTM_CAP, &mstm_cap) != 1)
- return false;
-
- return mstm_cap & DP_MST_CAP;
-}
-
static bool
intel_dp_can_mst(struct intel_dp *intel_dp)
{
@@ -4720,7 +4706,7 @@ intel_dp_can_mst(struct intel_dp *intel_dp)
return i915->params.enable_dp_mst &&...
2020 Aug 11
0
[RFC 16/20] drm/i915/dp: Extract drm_dp_get_sink_count()
...**
+ * drm_dp_get_sink_count() - Retrieve the sink count for a given sink
+ * @aux: The DP AUX channel to use
+ *
+ * Returns: The current sink count reported by @aux, or a negative error code
+ * otherwise.
+ */
+int drm_dp_get_sink_count(struct drm_dp_aux *aux)
+{
+ u8 count;
+ int ret;
+
+ ret = drm_dp_dpcd_readb(aux, DP_SINK_COUNT, &count);
+ if (ret < 1)
+ return -EIO;
+
+ return DP_GET_SINK_COUNT(count);
+}
+EXPORT_SYMBOL(drm_dp_get_sink_count);
+
/*
* I2C-over-AUX implementation
*/
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 35a4779a4...
2020 Nov 14
0
[PATCH 2/8] drm/nouveau/kms/nv50-: Remove (nv_encoder->crtc) checks in ->disable callbacks
...nv50_outp_get_old_connector(nv_encoder, state);
+ struct drm_dp_aux *aux = &nv_connector->aux;
+ u8 pwr;
nv_encoder->crtc = NULL;
- if (nv_crtc) {
- struct drm_dp_aux *aux = &nv_connector->aux;
- u8 pwr;
+ if (nv_encoder->dcb->type == DCB_OUTPUT_DP) {
+ int ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &pwr);
- if (nv_encoder->dcb->type == DCB_OUTPUT_DP) {
- int ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &pwr);
-
- if (ret == 0) {
- pwr &= ~DP_SET_POWER_MASK;
- pwr |= DP_SET_POWER_D3;
- drm_dp_dpcd_writeb(aux, DP_SET_POWER, pwr);
- }
+ if (...
2020 Aug 26
0
[PATCH v5 09/20] drm/i915/dp: Extract drm_dp_read_mst_cap()
...ed copy of the DPCD capabilities for this sink
+ *
+ * Returns: %True if the sink supports MST, %false otherwise
+ */
+bool drm_dp_read_mst_cap(struct drm_dp_aux *aux,
+ const u8 dpcd[DP_RECEIVER_CAP_SIZE])
+{
+ u8 mstm_cap;
+
+ if (dpcd[DP_DPCD_REV] < DP_DPCD_REV_12)
+ return false;
+
+ if (drm_dp_dpcd_readb(aux, DP_MSTM_CAP, &mstm_cap) != 1)
+ return false;
+
+ return mstm_cap & DP_MST_CAP;
+}
+EXPORT_SYMBOL(drm_dp_read_mst_cap);
+
/**
* drm_dp_mst_topology_mgr_set_mst() - Set the MST state for a topology manager
* @mgr: manager to set state for
diff --git a/drivers/gpu/drm/i915/display/...
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
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 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 10/20] drm/nouveau/kms: Use new drm_dp_has_mst() helper for checking MST caps
...;& dpcd[DP_DPCD_REV]) {
@@ -56,19 +55,10 @@ nouveau_dp_probe_dpcd(struct nouveau_connector *nv_connector,
return connector_status_disconnected;
}
- if (nouveau_mst)
+ if (nouveau_mst) {
mstm = outp->dp.mstm;
-
- if (mstm) {
- if (dpcd[DP_DPCD_REV] >= DP_DPCD_REV_12) {
- ret = drm_dp_dpcd_readb(aux, DP_MSTM_CAP, &tmp);
- if (ret < 0)
- return connector_status_disconnected;
-
- mstm->can_mst = !!(tmp & DP_MST_CAP);
- } else {
- mstm->can_mst = false;
- }
+ if (mstm)
+ mstm->can_mst = drm_dp_has_mst(aux, dpcd);
}
return connector_status_connected;
--...
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
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 ++-
2020 Nov 14
0
[PATCH 8/8] drm/nouveau/kms/nv50-: Fix locking for audio callbacks
...t;or,
nv_crtc->index);
@@ -1633,8 +1640,6 @@ nv50_sor_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_state *st
struct drm_dp_aux *aux = &nv_connector->aux;
u8 pwr;
- nv_encoder->crtc = NULL;
-
if (nv_encoder->dcb->type == DCB_OUTPUT_DP) {
int ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &pwr);
@@ -1649,6 +1654,7 @@ nv50_sor_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_state *st
nv50_audio_disable(encoder, nv_crtc);
nv50_hdmi_disable(&nv_encoder->base.base, nv_crtc);
nv50_outp_release(nv_encoder);
+ nv_encoder->crtc = NULL;...