* [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled()
2024-11-18 15:14 [PATCH 0/3] drm/dp: extract payload helpers Jani Nikula
@ 2024-11-18 15:14 ` Jani Nikula
2024-11-20 14:59 ` Imre Deak
2024-11-18 15:14 ` [PATCH 2/3] drm/dp: extract drm_dp_dpcd_write_payload() Jani Nikula
` (4 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Jani Nikula @ 2024-11-18 15:14 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula, imre.deak
SST with 128b/132b channel coding needs this too. Extract to a separate
helper, independent of MST.
Pass timeout in as a parameter, anticipating that we can reduce the
timeout for SST.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/display/drm_dp_helper.c | 54 ++++++++++++++++++-
drivers/gpu/drm/display/drm_dp_mst_topology.c | 36 +------------
include/drm/display/drm_dp_helper.h | 2 +
3 files changed, 57 insertions(+), 35 deletions(-)
diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
index 6ee51003de3c..b7e03bf02cd8 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -22,15 +22,16 @@
#include <linux/backlight.h>
#include <linux/delay.h>
+#include <linux/dynamic_debug.h>
#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/init.h>
+#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
#include <linux/string_helpers.h>
-#include <linux/dynamic_debug.h>
#include <drm/display/drm_dp_helper.h>
#include <drm/display/drm_dp_mst_helper.h>
@@ -779,6 +780,57 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
}
EXPORT_SYMBOL(drm_dp_dpcd_read_phy_link_status);
+static int read_payload_update_status(struct drm_dp_aux *aux)
+{
+ int ret;
+ u8 status;
+
+ ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
+ if (ret < 0)
+ return ret;
+
+ return status;
+}
+
+/**
+ * drm_dp_dpcd_poll_act_handled() - Polls for ACT handled status.
+ * @aux: DisplayPort AUX channel
+ * @timeout_ms: Timeout in ms
+ *
+ * Tries waiting for the sink to finish updating its payload table by polling
+ * for the ACT handled bit for up to @timeout_ms milliseconds, defaulting to
+ * 3000 ms if 0.
+ *
+ * Returns:
+ * 0 if the ACT was handled in time, negative error code on failure.
+ */
+int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms)
+{
+ int ret, status;
+
+ /* default to 3 seconds, this is arbitrary */
+ timeout_ms = timeout_ms ?: 3000;
+
+ ret = readx_poll_timeout(read_payload_update_status, aux, status,
+ status & DP_PAYLOAD_ACT_HANDLED || status < 0,
+ 200, timeout_ms * USEC_PER_MSEC);
+ if (ret < 0 && status >= 0) {
+ drm_err(aux->drm_dev, "Failed to get ACT after %d ms, last status: %02x\n",
+ timeout_ms, status);
+ return -EINVAL;
+ } else if (status < 0) {
+ /*
+ * Failure here isn't unexpected - the hub may have
+ * just been unplugged
+ */
+ drm_dbg_kms(aux->drm_dev, "Failed to read payload table status: %d\n", status);
+ return status;
+ }
+
+ return 0;
+}
+EXPORT_SYMBOL(drm_dp_dpcd_poll_act_handled);
+
static bool is_edid_digital_input_dp(const struct drm_edid *drm_edid)
{
/* FIXME: get rid of drm_edid_raw() */
diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
index ac90118b9e7a..2bdbc1eb282b 100644
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -29,7 +29,6 @@
#include <linux/random.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
-#include <linux/iopoll.h>
#if IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS)
#include <linux/stacktrace.h>
@@ -4723,18 +4722,6 @@ static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
return ret;
}
-static int do_get_act_status(struct drm_dp_aux *aux)
-{
- int ret;
- u8 status;
-
- ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
- if (ret < 0)
- return ret;
-
- return status;
-}
-
/**
* drm_dp_check_act_status() - Polls for ACT handled status.
* @mgr: manager to use
@@ -4752,28 +4739,9 @@ int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr)
* There doesn't seem to be any recommended retry count or timeout in
* the MST specification. Since some hubs have been observed to take
* over 1 second to update their payload allocations under certain
- * conditions, we use a rather large timeout value.
+ * conditions, we use a rather large timeout value of 3 seconds.
*/
- const int timeout_ms = 3000;
- int ret, status;
-
- ret = readx_poll_timeout(do_get_act_status, mgr->aux, status,
- status & DP_PAYLOAD_ACT_HANDLED || status < 0,
- 200, timeout_ms * USEC_PER_MSEC);
- if (ret < 0 && status >= 0) {
- drm_err(mgr->dev, "Failed to get ACT after %dms, last status: %02x\n",
- timeout_ms, status);
- return -EINVAL;
- } else if (status < 0) {
- /*
- * Failure here isn't unexpected - the hub may have
- * just been unplugged
- */
- drm_dbg_kms(mgr->dev, "Failed to read payload table status: %d\n", status);
- return status;
- }
-
- return 0;
+ return drm_dp_dpcd_poll_act_handled(mgr->aux, 3000);
}
EXPORT_SYMBOL(drm_dp_check_act_status);
diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
index 279624833ea9..38eea21d1082 100644
--- a/include/drm/display/drm_dp_helper.h
+++ b/include/drm/display/drm_dp_helper.h
@@ -567,6 +567,8 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
enum drm_dp_phy dp_phy,
u8 link_status[DP_LINK_STATUS_SIZE]);
+int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
+
bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
u8 real_edid_checksum);
--
2.39.5
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled()
2024-11-18 15:14 ` [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled() Jani Nikula
@ 2024-11-20 14:59 ` Imre Deak
2024-11-20 15:18 ` Imre Deak
2024-11-22 12:22 ` Jani Nikula
0 siblings, 2 replies; 13+ messages in thread
From: Imre Deak @ 2024-11-20 14:59 UTC (permalink / raw)
To: Jani Nikula; +Cc: Lyude Paul, dri-devel, intel-gfx, intel-xe
On Mon, Nov 18, 2024 at 05:14:52PM +0200, Jani Nikula wrote:
> SST with 128b/132b channel coding needs this too. Extract to a separate
> helper, independent of MST.
>
> Pass timeout in as a parameter, anticipating that we can reduce the
> timeout for SST.
I wish there was a DP Standard section making the above clear,
but I suppose we just deduct that except of the side-band messaging,
every other payload programming and ACT signaling is required for
128b/132b SST.
>
Cc: Lyude Paul <lyude@redhat.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/display/drm_dp_helper.c | 54 ++++++++++++++++++-
> drivers/gpu/drm/display/drm_dp_mst_topology.c | 36 +------------
> include/drm/display/drm_dp_helper.h | 2 +
> 3 files changed, 57 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
> index 6ee51003de3c..b7e03bf02cd8 100644
> --- a/drivers/gpu/drm/display/drm_dp_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_helper.c
> @@ -22,15 +22,16 @@
>
> #include <linux/backlight.h>
> #include <linux/delay.h>
> +#include <linux/dynamic_debug.h>
> #include <linux/errno.h>
> #include <linux/i2c.h>
> #include <linux/init.h>
> +#include <linux/iopoll.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/sched.h>
> #include <linux/seq_file.h>
> #include <linux/string_helpers.h>
> -#include <linux/dynamic_debug.h>
>
> #include <drm/display/drm_dp_helper.h>
> #include <drm/display/drm_dp_mst_helper.h>
> @@ -779,6 +780,57 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
> }
> EXPORT_SYMBOL(drm_dp_dpcd_read_phy_link_status);
>
> +static int read_payload_update_status(struct drm_dp_aux *aux)
> +{
> + int ret;
> + u8 status;
> +
> + ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
> + if (ret < 0)
> + return ret;
> +
> + return status;
> +}
> +
> +/**
> + * drm_dp_dpcd_poll_act_handled() - Polls for ACT handled status.
> + * @aux: DisplayPort AUX channel
> + * @timeout_ms: Timeout in ms
> + *
> + * Tries waiting for the sink to finish updating its payload table by polling
> + * for the ACT handled bit for up to @timeout_ms milliseconds, defaulting to
> + * 3000 ms if 0.
> + *
> + * Returns:
> + * 0 if the ACT was handled in time, negative error code on failure.
> + */
> +int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms)
I wonder if it'd make sense to namespace these helpers using ll_mtp or mtp.
> +{
> + int ret, status;
> +
Extra w/s.
Regardless of the namespace comment:
Reviewed-by: Imre Deak <imre.deak@intel.com>
> + /* default to 3 seconds, this is arbitrary */
> + timeout_ms = timeout_ms ?: 3000;
> +
> + ret = readx_poll_timeout(read_payload_update_status, aux, status,
> + status & DP_PAYLOAD_ACT_HANDLED || status < 0,
> + 200, timeout_ms * USEC_PER_MSEC);
> + if (ret < 0 && status >= 0) {
> + drm_err(aux->drm_dev, "Failed to get ACT after %d ms, last status: %02x\n",
> + timeout_ms, status);
> + return -EINVAL;
> + } else if (status < 0) {
> + /*
> + * Failure here isn't unexpected - the hub may have
> + * just been unplugged
> + */
> + drm_dbg_kms(aux->drm_dev, "Failed to read payload table status: %d\n", status);
> + return status;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL(drm_dp_dpcd_poll_act_handled);
> +
> static bool is_edid_digital_input_dp(const struct drm_edid *drm_edid)
> {
> /* FIXME: get rid of drm_edid_raw() */
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index ac90118b9e7a..2bdbc1eb282b 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -29,7 +29,6 @@
> #include <linux/random.h>
> #include <linux/sched.h>
> #include <linux/seq_file.h>
> -#include <linux/iopoll.h>
>
> #if IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS)
> #include <linux/stacktrace.h>
> @@ -4723,18 +4722,6 @@ static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
> return ret;
> }
>
> -static int do_get_act_status(struct drm_dp_aux *aux)
> -{
> - int ret;
> - u8 status;
> -
> - ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
> - if (ret < 0)
> - return ret;
> -
> - return status;
> -}
> -
> /**
> * drm_dp_check_act_status() - Polls for ACT handled status.
> * @mgr: manager to use
> @@ -4752,28 +4739,9 @@ int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr)
> * There doesn't seem to be any recommended retry count or timeout in
> * the MST specification. Since some hubs have been observed to take
> * over 1 second to update their payload allocations under certain
> - * conditions, we use a rather large timeout value.
> + * conditions, we use a rather large timeout value of 3 seconds.
> */
> - const int timeout_ms = 3000;
> - int ret, status;
> -
> - ret = readx_poll_timeout(do_get_act_status, mgr->aux, status,
> - status & DP_PAYLOAD_ACT_HANDLED || status < 0,
> - 200, timeout_ms * USEC_PER_MSEC);
> - if (ret < 0 && status >= 0) {
> - drm_err(mgr->dev, "Failed to get ACT after %dms, last status: %02x\n",
> - timeout_ms, status);
> - return -EINVAL;
> - } else if (status < 0) {
> - /*
> - * Failure here isn't unexpected - the hub may have
> - * just been unplugged
> - */
> - drm_dbg_kms(mgr->dev, "Failed to read payload table status: %d\n", status);
> - return status;
> - }
> -
> - return 0;
> + return drm_dp_dpcd_poll_act_handled(mgr->aux, 3000);
> }
> EXPORT_SYMBOL(drm_dp_check_act_status);
>
> diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
> index 279624833ea9..38eea21d1082 100644
> --- a/include/drm/display/drm_dp_helper.h
> +++ b/include/drm/display/drm_dp_helper.h
> @@ -567,6 +567,8 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
> enum drm_dp_phy dp_phy,
> u8 link_status[DP_LINK_STATUS_SIZE]);
>
> +int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
> +
> bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
> u8 real_edid_checksum);
>
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled()
2024-11-20 14:59 ` Imre Deak
@ 2024-11-20 15:18 ` Imre Deak
2024-11-22 12:22 ` Jani Nikula
1 sibling, 0 replies; 13+ messages in thread
From: Imre Deak @ 2024-11-20 15:18 UTC (permalink / raw)
To: Jani Nikula, Lyude Paul, dri-devel, intel-gfx, intel-xe
On Wed, Nov 20, 2024 at 04:59:43PM +0200, Imre Deak wrote:
> On Mon, Nov 18, 2024 at 05:14:52PM +0200, Jani Nikula wrote:
> > SST with 128b/132b channel coding needs this too. Extract to a separate
> > helper, independent of MST.
> >
> > Pass timeout in as a parameter, anticipating that we can reduce the
> > timeout for SST.
>
> I wish there was a DP Standard section making the above clear,
> but I suppose we just deduct that except of the side-band messaging,
> every other payload programming and ACT signaling is required for
> 128b/132b SST.
>
> >
>
> Cc: Lyude Paul <lyude@redhat.com>
>
> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> > ---
> > drivers/gpu/drm/display/drm_dp_helper.c | 54 ++++++++++++++++++-
> > drivers/gpu/drm/display/drm_dp_mst_topology.c | 36 +------------
> > include/drm/display/drm_dp_helper.h | 2 +
> > 3 files changed, 57 insertions(+), 35 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
> > index 6ee51003de3c..b7e03bf02cd8 100644
> > --- a/drivers/gpu/drm/display/drm_dp_helper.c
> > +++ b/drivers/gpu/drm/display/drm_dp_helper.c
> > @@ -22,15 +22,16 @@
> >
> > #include <linux/backlight.h>
> > #include <linux/delay.h>
> > +#include <linux/dynamic_debug.h>
> > #include <linux/errno.h>
> > #include <linux/i2c.h>
> > #include <linux/init.h>
> > +#include <linux/iopoll.h>
> > #include <linux/kernel.h>
> > #include <linux/module.h>
> > #include <linux/sched.h>
> > #include <linux/seq_file.h>
> > #include <linux/string_helpers.h>
> > -#include <linux/dynamic_debug.h>
> >
> > #include <drm/display/drm_dp_helper.h>
> > #include <drm/display/drm_dp_mst_helper.h>
> > @@ -779,6 +780,57 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
> > }
> > EXPORT_SYMBOL(drm_dp_dpcd_read_phy_link_status);
> >
> > +static int read_payload_update_status(struct drm_dp_aux *aux)
> > +{
> > + int ret;
> > + u8 status;
> > +
> > + ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
> > + if (ret < 0)
> > + return ret;
> > +
> > + return status;
> > +}
> > +
> > +/**
> > + * drm_dp_dpcd_poll_act_handled() - Polls for ACT handled status.
> > + * @aux: DisplayPort AUX channel
> > + * @timeout_ms: Timeout in ms
> > + *
> > + * Tries waiting for the sink to finish updating its payload table by polling
> > + * for the ACT handled bit for up to @timeout_ms milliseconds, defaulting to
> > + * 3000 ms if 0.
> > + *
> > + * Returns:
> > + * 0 if the ACT was handled in time, negative error code on failure.
> > + */
> > +int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms)
>
> I wonder if it'd make sense to namespace these helpers using ll_mtp or mtp.
>
> > +{
> > + int ret, status;
> > +
>
> Extra w/s.
Ah nvm, timeout_ms is a function param so new is needed.
>
> Regardless of the namespace comment:
>
> Reviewed-by: Imre Deak <imre.deak@intel.com>
>
> > + /* default to 3 seconds, this is arbitrary */
> > + timeout_ms = timeout_ms ?: 3000;
> > +
> > + ret = readx_poll_timeout(read_payload_update_status, aux, status,
> > + status & DP_PAYLOAD_ACT_HANDLED || status < 0,
> > + 200, timeout_ms * USEC_PER_MSEC);
> > + if (ret < 0 && status >= 0) {
> > + drm_err(aux->drm_dev, "Failed to get ACT after %d ms, last status: %02x\n",
> > + timeout_ms, status);
> > + return -EINVAL;
> > + } else if (status < 0) {
> > + /*
> > + * Failure here isn't unexpected - the hub may have
> > + * just been unplugged
> > + */
> > + drm_dbg_kms(aux->drm_dev, "Failed to read payload table status: %d\n", status);
> > + return status;
> > + }
> > +
> > + return 0;
> > +}
> > +EXPORT_SYMBOL(drm_dp_dpcd_poll_act_handled);
> > +
> > static bool is_edid_digital_input_dp(const struct drm_edid *drm_edid)
> > {
> > /* FIXME: get rid of drm_edid_raw() */
> > diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> > index ac90118b9e7a..2bdbc1eb282b 100644
> > --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> > +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> > @@ -29,7 +29,6 @@
> > #include <linux/random.h>
> > #include <linux/sched.h>
> > #include <linux/seq_file.h>
> > -#include <linux/iopoll.h>
> >
> > #if IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS)
> > #include <linux/stacktrace.h>
> > @@ -4723,18 +4722,6 @@ static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
> > return ret;
> > }
> >
> > -static int do_get_act_status(struct drm_dp_aux *aux)
> > -{
> > - int ret;
> > - u8 status;
> > -
> > - ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
> > - if (ret < 0)
> > - return ret;
> > -
> > - return status;
> > -}
> > -
> > /**
> > * drm_dp_check_act_status() - Polls for ACT handled status.
> > * @mgr: manager to use
> > @@ -4752,28 +4739,9 @@ int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr)
> > * There doesn't seem to be any recommended retry count or timeout in
> > * the MST specification. Since some hubs have been observed to take
> > * over 1 second to update their payload allocations under certain
> > - * conditions, we use a rather large timeout value.
> > + * conditions, we use a rather large timeout value of 3 seconds.
> > */
> > - const int timeout_ms = 3000;
> > - int ret, status;
> > -
> > - ret = readx_poll_timeout(do_get_act_status, mgr->aux, status,
> > - status & DP_PAYLOAD_ACT_HANDLED || status < 0,
> > - 200, timeout_ms * USEC_PER_MSEC);
> > - if (ret < 0 && status >= 0) {
> > - drm_err(mgr->dev, "Failed to get ACT after %dms, last status: %02x\n",
> > - timeout_ms, status);
> > - return -EINVAL;
> > - } else if (status < 0) {
> > - /*
> > - * Failure here isn't unexpected - the hub may have
> > - * just been unplugged
> > - */
> > - drm_dbg_kms(mgr->dev, "Failed to read payload table status: %d\n", status);
> > - return status;
> > - }
> > -
> > - return 0;
> > + return drm_dp_dpcd_poll_act_handled(mgr->aux, 3000);
> > }
> > EXPORT_SYMBOL(drm_dp_check_act_status);
> >
> > diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
> > index 279624833ea9..38eea21d1082 100644
> > --- a/include/drm/display/drm_dp_helper.h
> > +++ b/include/drm/display/drm_dp_helper.h
> > @@ -567,6 +567,8 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
> > enum drm_dp_phy dp_phy,
> > u8 link_status[DP_LINK_STATUS_SIZE]);
> >
> > +int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
> > +
> > bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
> > u8 real_edid_checksum);
> >
> > --
> > 2.39.5
> >
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled()
2024-11-20 14:59 ` Imre Deak
2024-11-20 15:18 ` Imre Deak
@ 2024-11-22 12:22 ` Jani Nikula
2024-11-22 14:07 ` Imre Deak
1 sibling, 1 reply; 13+ messages in thread
From: Jani Nikula @ 2024-11-22 12:22 UTC (permalink / raw)
To: imre.deak; +Cc: Lyude Paul, dri-devel, intel-gfx, intel-xe
On Wed, 20 Nov 2024, Imre Deak <imre.deak@intel.com> wrote:
> On Mon, Nov 18, 2024 at 05:14:52PM +0200, Jani Nikula wrote:
>> SST with 128b/132b channel coding needs this too. Extract to a separate
>> helper, independent of MST.
>>
>> Pass timeout in as a parameter, anticipating that we can reduce the
>> timeout for SST.
>
> I wish there was a DP Standard section making the above clear,
> but I suppose we just deduct that except of the side-band messaging,
> every other payload programming and ACT signaling is required for
> 128b/132b SST.
Ping. Okay to merge, or do we want to mull over the the timeout?
I'm primarily trying to do a non-functional change. I could omit the
timeout parameter, but for non-hubs three seconds seems excessive, and
reducing it for hubs too is a can of worms I prefer keeping the lid on
top.
> Cc: Lyude Paul <lyude@redhat.com>
>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>> drivers/gpu/drm/display/drm_dp_helper.c | 54 ++++++++++++++++++-
>> drivers/gpu/drm/display/drm_dp_mst_topology.c | 36 +------------
>> include/drm/display/drm_dp_helper.h | 2 +
>> 3 files changed, 57 insertions(+), 35 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
>> index 6ee51003de3c..b7e03bf02cd8 100644
>> --- a/drivers/gpu/drm/display/drm_dp_helper.c
>> +++ b/drivers/gpu/drm/display/drm_dp_helper.c
>> @@ -22,15 +22,16 @@
>>
>> #include <linux/backlight.h>
>> #include <linux/delay.h>
>> +#include <linux/dynamic_debug.h>
>> #include <linux/errno.h>
>> #include <linux/i2c.h>
>> #include <linux/init.h>
>> +#include <linux/iopoll.h>
>> #include <linux/kernel.h>
>> #include <linux/module.h>
>> #include <linux/sched.h>
>> #include <linux/seq_file.h>
>> #include <linux/string_helpers.h>
>> -#include <linux/dynamic_debug.h>
>>
>> #include <drm/display/drm_dp_helper.h>
>> #include <drm/display/drm_dp_mst_helper.h>
>> @@ -779,6 +780,57 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
>> }
>> EXPORT_SYMBOL(drm_dp_dpcd_read_phy_link_status);
>>
>> +static int read_payload_update_status(struct drm_dp_aux *aux)
>> +{
>> + int ret;
>> + u8 status;
>> +
>> + ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
>> + if (ret < 0)
>> + return ret;
>> +
>> + return status;
>> +}
>> +
>> +/**
>> + * drm_dp_dpcd_poll_act_handled() - Polls for ACT handled status.
>> + * @aux: DisplayPort AUX channel
>> + * @timeout_ms: Timeout in ms
>> + *
>> + * Tries waiting for the sink to finish updating its payload table by polling
>> + * for the ACT handled bit for up to @timeout_ms milliseconds, defaulting to
>> + * 3000 ms if 0.
>> + *
>> + * Returns:
>> + * 0 if the ACT was handled in time, negative error code on failure.
>> + */
>> +int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms)
>
> I wonder if it'd make sense to namespace these helpers using ll_mtp or mtp.
Honestly I think there's already enough of an acronym jumble in the
name. At least "drm_dp_dpcd" is common for most functions around here.
BR,
Jani.
>
>> +{
>> + int ret, status;
>> +
>
> Extra w/s.
>
> Regardless of the namespace comment:
>
> Reviewed-by: Imre Deak <imre.deak@intel.com>
>
>> + /* default to 3 seconds, this is arbitrary */
>> + timeout_ms = timeout_ms ?: 3000;
>> +
>> + ret = readx_poll_timeout(read_payload_update_status, aux, status,
>> + status & DP_PAYLOAD_ACT_HANDLED || status < 0,
>> + 200, timeout_ms * USEC_PER_MSEC);
>> + if (ret < 0 && status >= 0) {
>> + drm_err(aux->drm_dev, "Failed to get ACT after %d ms, last status: %02x\n",
>> + timeout_ms, status);
>> + return -EINVAL;
>> + } else if (status < 0) {
>> + /*
>> + * Failure here isn't unexpected - the hub may have
>> + * just been unplugged
>> + */
>> + drm_dbg_kms(aux->drm_dev, "Failed to read payload table status: %d\n", status);
>> + return status;
>> + }
>> +
>> + return 0;
>> +}
>> +EXPORT_SYMBOL(drm_dp_dpcd_poll_act_handled);
>> +
>> static bool is_edid_digital_input_dp(const struct drm_edid *drm_edid)
>> {
>> /* FIXME: get rid of drm_edid_raw() */
>> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
>> index ac90118b9e7a..2bdbc1eb282b 100644
>> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
>> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
>> @@ -29,7 +29,6 @@
>> #include <linux/random.h>
>> #include <linux/sched.h>
>> #include <linux/seq_file.h>
>> -#include <linux/iopoll.h>
>>
>> #if IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS)
>> #include <linux/stacktrace.h>
>> @@ -4723,18 +4722,6 @@ static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
>> return ret;
>> }
>>
>> -static int do_get_act_status(struct drm_dp_aux *aux)
>> -{
>> - int ret;
>> - u8 status;
>> -
>> - ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
>> - if (ret < 0)
>> - return ret;
>> -
>> - return status;
>> -}
>> -
>> /**
>> * drm_dp_check_act_status() - Polls for ACT handled status.
>> * @mgr: manager to use
>> @@ -4752,28 +4739,9 @@ int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr)
>> * There doesn't seem to be any recommended retry count or timeout in
>> * the MST specification. Since some hubs have been observed to take
>> * over 1 second to update their payload allocations under certain
>> - * conditions, we use a rather large timeout value.
>> + * conditions, we use a rather large timeout value of 3 seconds.
>> */
>> - const int timeout_ms = 3000;
>> - int ret, status;
>> -
>> - ret = readx_poll_timeout(do_get_act_status, mgr->aux, status,
>> - status & DP_PAYLOAD_ACT_HANDLED || status < 0,
>> - 200, timeout_ms * USEC_PER_MSEC);
>> - if (ret < 0 && status >= 0) {
>> - drm_err(mgr->dev, "Failed to get ACT after %dms, last status: %02x\n",
>> - timeout_ms, status);
>> - return -EINVAL;
>> - } else if (status < 0) {
>> - /*
>> - * Failure here isn't unexpected - the hub may have
>> - * just been unplugged
>> - */
>> - drm_dbg_kms(mgr->dev, "Failed to read payload table status: %d\n", status);
>> - return status;
>> - }
>> -
>> - return 0;
>> + return drm_dp_dpcd_poll_act_handled(mgr->aux, 3000);
>> }
>> EXPORT_SYMBOL(drm_dp_check_act_status);
>>
>> diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
>> index 279624833ea9..38eea21d1082 100644
>> --- a/include/drm/display/drm_dp_helper.h
>> +++ b/include/drm/display/drm_dp_helper.h
>> @@ -567,6 +567,8 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
>> enum drm_dp_phy dp_phy,
>> u8 link_status[DP_LINK_STATUS_SIZE]);
>>
>> +int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
>> +
>> bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
>> u8 real_edid_checksum);
>>
>> --
>> 2.39.5
>>
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled()
2024-11-22 12:22 ` Jani Nikula
@ 2024-11-22 14:07 ` Imre Deak
0 siblings, 0 replies; 13+ messages in thread
From: Imre Deak @ 2024-11-22 14:07 UTC (permalink / raw)
To: Jani Nikula; +Cc: Lyude Paul, dri-devel, intel-gfx, intel-xe
On Fri, Nov 22, 2024 at 02:22:44PM +0200, Jani Nikula wrote:
> On Wed, 20 Nov 2024, Imre Deak <imre.deak@intel.com> wrote:
> > On Mon, Nov 18, 2024 at 05:14:52PM +0200, Jani Nikula wrote:
> >> SST with 128b/132b channel coding needs this too. Extract to a separate
> >> helper, independent of MST.
> >>
> >> Pass timeout in as a parameter, anticipating that we can reduce the
> >> timeout for SST.
> >
> > I wish there was a DP Standard section making the above clear,
> > but I suppose we just deduct that except of the side-band messaging,
> > every other payload programming and ACT signaling is required for
> > 128b/132b SST.
The closest I found explaing the above is 5.7.5. Allocation Change
Trigger in DP Standard v2.1, maybe worth mentioning it in the commit
log.
> Ping. Okay to merge, or do we want to mull over the the timeout?
My R-b still applies, if that's enough for merging.
> I'm primarily trying to do a non-functional change. I could omit the
> timeout parameter, but for non-hubs three seconds seems excessive, and
> reducing it for hubs too is a can of worms I prefer keeping the lid on
> top.
>
> > Cc: Lyude Paul <lyude@redhat.com>
> >
> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >> ---
> >> drivers/gpu/drm/display/drm_dp_helper.c | 54 ++++++++++++++++++-
> >> drivers/gpu/drm/display/drm_dp_mst_topology.c | 36 +------------
> >> include/drm/display/drm_dp_helper.h | 2 +
> >> 3 files changed, 57 insertions(+), 35 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
> >> index 6ee51003de3c..b7e03bf02cd8 100644
> >> --- a/drivers/gpu/drm/display/drm_dp_helper.c
> >> +++ b/drivers/gpu/drm/display/drm_dp_helper.c
> >> @@ -22,15 +22,16 @@
> >>
> >> #include <linux/backlight.h>
> >> #include <linux/delay.h>
> >> +#include <linux/dynamic_debug.h>
> >> #include <linux/errno.h>
> >> #include <linux/i2c.h>
> >> #include <linux/init.h>
> >> +#include <linux/iopoll.h>
> >> #include <linux/kernel.h>
> >> #include <linux/module.h>
> >> #include <linux/sched.h>
> >> #include <linux/seq_file.h>
> >> #include <linux/string_helpers.h>
> >> -#include <linux/dynamic_debug.h>
> >>
> >> #include <drm/display/drm_dp_helper.h>
> >> #include <drm/display/drm_dp_mst_helper.h>
> >> @@ -779,6 +780,57 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
> >> }
> >> EXPORT_SYMBOL(drm_dp_dpcd_read_phy_link_status);
> >>
> >> +static int read_payload_update_status(struct drm_dp_aux *aux)
> >> +{
> >> + int ret;
> >> + u8 status;
> >> +
> >> + ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
> >> + if (ret < 0)
> >> + return ret;
> >> +
> >> + return status;
> >> +}
> >> +
> >> +/**
> >> + * drm_dp_dpcd_poll_act_handled() - Polls for ACT handled status.
> >> + * @aux: DisplayPort AUX channel
> >> + * @timeout_ms: Timeout in ms
> >> + *
> >> + * Tries waiting for the sink to finish updating its payload table by polling
> >> + * for the ACT handled bit for up to @timeout_ms milliseconds, defaulting to
> >> + * 3000 ms if 0.
> >> + *
> >> + * Returns:
> >> + * 0 if the ACT was handled in time, negative error code on failure.
> >> + */
> >> +int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms)
> >
> > I wonder if it'd make sense to namespace these helpers using ll_mtp or mtp.
>
> Honestly I think there's already enough of an acronym jumble in the
> name. At least "drm_dp_dpcd" is common for most functions around here.
>
>
> BR,
> Jani.
>
> >
> >> +{
> >> + int ret, status;
> >> +
> >
> > Extra w/s.
> >
> > Regardless of the namespace comment:
> >
> > Reviewed-by: Imre Deak <imre.deak@intel.com>
> >
> >> + /* default to 3 seconds, this is arbitrary */
> >> + timeout_ms = timeout_ms ?: 3000;
> >> +
> >> + ret = readx_poll_timeout(read_payload_update_status, aux, status,
> >> + status & DP_PAYLOAD_ACT_HANDLED || status < 0,
> >> + 200, timeout_ms * USEC_PER_MSEC);
> >> + if (ret < 0 && status >= 0) {
> >> + drm_err(aux->drm_dev, "Failed to get ACT after %d ms, last status: %02x\n",
> >> + timeout_ms, status);
> >> + return -EINVAL;
> >> + } else if (status < 0) {
> >> + /*
> >> + * Failure here isn't unexpected - the hub may have
> >> + * just been unplugged
> >> + */
> >> + drm_dbg_kms(aux->drm_dev, "Failed to read payload table status: %d\n", status);
> >> + return status;
> >> + }
> >> +
> >> + return 0;
> >> +}
> >> +EXPORT_SYMBOL(drm_dp_dpcd_poll_act_handled);
> >> +
> >> static bool is_edid_digital_input_dp(const struct drm_edid *drm_edid)
> >> {
> >> /* FIXME: get rid of drm_edid_raw() */
> >> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> >> index ac90118b9e7a..2bdbc1eb282b 100644
> >> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> >> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> >> @@ -29,7 +29,6 @@
> >> #include <linux/random.h>
> >> #include <linux/sched.h>
> >> #include <linux/seq_file.h>
> >> -#include <linux/iopoll.h>
> >>
> >> #if IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS)
> >> #include <linux/stacktrace.h>
> >> @@ -4723,18 +4722,6 @@ static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
> >> return ret;
> >> }
> >>
> >> -static int do_get_act_status(struct drm_dp_aux *aux)
> >> -{
> >> - int ret;
> >> - u8 status;
> >> -
> >> - ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
> >> - if (ret < 0)
> >> - return ret;
> >> -
> >> - return status;
> >> -}
> >> -
> >> /**
> >> * drm_dp_check_act_status() - Polls for ACT handled status.
> >> * @mgr: manager to use
> >> @@ -4752,28 +4739,9 @@ int drm_dp_check_act_status(struct drm_dp_mst_topology_mgr *mgr)
> >> * There doesn't seem to be any recommended retry count or timeout in
> >> * the MST specification. Since some hubs have been observed to take
> >> * over 1 second to update their payload allocations under certain
> >> - * conditions, we use a rather large timeout value.
> >> + * conditions, we use a rather large timeout value of 3 seconds.
> >> */
> >> - const int timeout_ms = 3000;
> >> - int ret, status;
> >> -
> >> - ret = readx_poll_timeout(do_get_act_status, mgr->aux, status,
> >> - status & DP_PAYLOAD_ACT_HANDLED || status < 0,
> >> - 200, timeout_ms * USEC_PER_MSEC);
> >> - if (ret < 0 && status >= 0) {
> >> - drm_err(mgr->dev, "Failed to get ACT after %dms, last status: %02x\n",
> >> - timeout_ms, status);
> >> - return -EINVAL;
> >> - } else if (status < 0) {
> >> - /*
> >> - * Failure here isn't unexpected - the hub may have
> >> - * just been unplugged
> >> - */
> >> - drm_dbg_kms(mgr->dev, "Failed to read payload table status: %d\n", status);
> >> - return status;
> >> - }
> >> -
> >> - return 0;
> >> + return drm_dp_dpcd_poll_act_handled(mgr->aux, 3000);
> >> }
> >> EXPORT_SYMBOL(drm_dp_check_act_status);
> >>
> >> diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
> >> index 279624833ea9..38eea21d1082 100644
> >> --- a/include/drm/display/drm_dp_helper.h
> >> +++ b/include/drm/display/drm_dp_helper.h
> >> @@ -567,6 +567,8 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
> >> enum drm_dp_phy dp_phy,
> >> u8 link_status[DP_LINK_STATUS_SIZE]);
> >>
> >> +int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
> >> +
> >> bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
> >> u8 real_edid_checksum);
> >>
> >> --
> >> 2.39.5
> >>
>
> --
> Jani Nikula, Intel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3] drm/dp: extract drm_dp_dpcd_write_payload()
2024-11-18 15:14 [PATCH 0/3] drm/dp: extract payload helpers Jani Nikula
2024-11-18 15:14 ` [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled() Jani Nikula
@ 2024-11-18 15:14 ` Jani Nikula
2024-11-20 15:07 ` Imre Deak
2024-11-18 15:14 ` [PATCH 3/3] drm/dp: extract drm_dp_dpcd_clear_payload() Jani Nikula
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Jani Nikula @ 2024-11-18 15:14 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula, imre.deak
SST with 128b/132b channel coding needs this too. Extract to a separate
helper, independent of MST.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/display/drm_dp_helper.c | 56 +++++++++++++++++++
drivers/gpu/drm/display/drm_dp_mst_topology.c | 52 +----------------
include/drm/display/drm_dp_helper.h | 2 +
3 files changed, 61 insertions(+), 49 deletions(-)
diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
index b7e03bf02cd8..0c9230f3f994 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -792,6 +792,62 @@ static int read_payload_update_status(struct drm_dp_aux *aux)
return status;
}
+/**
+ * drm_dp_dpcd_write_payload() - Write payload
+ * @aux: DisplayPort AUX channel
+ * @vcpid: Virtual Channel Payload ID
+ * @start_time_slot: Starting time slot
+ * @time_slot_count: Time slot count
+ *
+ * Write payload table, poll status.
+ *
+ * Returns:
+ * 0 on success, negative error otherwise
+ */
+int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
+ int vcpid, u8 start_time_slot, u8 time_slot_count)
+{
+ u8 payload_alloc[3], status;
+ int ret;
+ int retries = 0;
+
+ drm_dp_dpcd_writeb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS,
+ DP_PAYLOAD_TABLE_UPDATED);
+
+ payload_alloc[0] = vcpid;
+ payload_alloc[1] = start_time_slot;
+ payload_alloc[2] = time_slot_count;
+
+ ret = drm_dp_dpcd_write(aux, DP_PAYLOAD_ALLOCATE_SET, payload_alloc, 3);
+ if (ret != 3) {
+ drm_dbg_kms(aux->drm_dev, "failed to write payload allocation %d\n", ret);
+ goto fail;
+ }
+
+retry:
+ ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
+ if (ret < 0) {
+ drm_dbg_kms(aux->drm_dev, "failed to read payload table status %d\n", ret);
+ goto fail;
+ }
+
+ if (!(status & DP_PAYLOAD_TABLE_UPDATED)) {
+ retries++;
+ if (retries < 20) {
+ usleep_range(10000, 20000);
+ goto retry;
+ }
+ drm_dbg_kms(aux->drm_dev, "status not set after read payload table status %d\n",
+ status);
+ ret = -EINVAL;
+ goto fail;
+ }
+ ret = 0;
+fail:
+ return ret;
+}
+EXPORT_SYMBOL(drm_dp_dpcd_write_payload);
+
/**
* drm_dp_dpcd_poll_act_handled() - Polls for ACT handled status.
* @aux: DisplayPort AUX channel
diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
index 2bdbc1eb282b..a426d13a7a36 100644
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -67,9 +67,6 @@ static bool dump_dp_payload_table(struct drm_dp_mst_topology_mgr *mgr,
static void drm_dp_mst_topology_put_port(struct drm_dp_mst_port *port);
-static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
- int id, u8 start_slot, u8 num_slots);
-
static int drm_dp_send_dpcd_read(struct drm_dp_mst_topology_mgr *mgr,
struct drm_dp_mst_port *port,
int offset, int size, u8 *bytes);
@@ -3263,7 +3260,7 @@ EXPORT_SYMBOL(drm_dp_send_query_stream_enc_status);
static int drm_dp_create_payload_at_dfp(struct drm_dp_mst_topology_mgr *mgr,
struct drm_dp_mst_atomic_payload *payload)
{
- return drm_dp_dpcd_write_payload(mgr, payload->vcpi, payload->vc_start_slot,
+ return drm_dp_dpcd_write_payload(mgr->aux, payload->vcpi, payload->vc_start_slot,
payload->time_slots);
}
@@ -3294,7 +3291,7 @@ static void drm_dp_destroy_payload_at_remote_and_dfp(struct drm_dp_mst_topology_
}
if (payload->payload_allocation_status == DRM_DP_MST_PAYLOAD_ALLOCATION_DFP)
- drm_dp_dpcd_write_payload(mgr, payload->vcpi, payload->vc_start_slot, 0);
+ drm_dp_dpcd_write_payload(mgr->aux, payload->vcpi, payload->vc_start_slot, 0);
}
/**
@@ -3682,7 +3679,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
goto out_unlock;
/* Write reset payload */
- drm_dp_dpcd_write_payload(mgr, 0, 0, 0x3f);
+ drm_dp_dpcd_write_payload(mgr->aux, 0, 0, 0x3f);
drm_dp_mst_queue_probe_work(mgr);
@@ -4679,49 +4676,6 @@ void drm_dp_mst_update_slots(struct drm_dp_mst_topology_state *mst_state, uint8_
}
EXPORT_SYMBOL(drm_dp_mst_update_slots);
-static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
- int id, u8 start_slot, u8 num_slots)
-{
- u8 payload_alloc[3], status;
- int ret;
- int retries = 0;
-
- drm_dp_dpcd_writeb(mgr->aux, DP_PAYLOAD_TABLE_UPDATE_STATUS,
- DP_PAYLOAD_TABLE_UPDATED);
-
- payload_alloc[0] = id;
- payload_alloc[1] = start_slot;
- payload_alloc[2] = num_slots;
-
- ret = drm_dp_dpcd_write(mgr->aux, DP_PAYLOAD_ALLOCATE_SET, payload_alloc, 3);
- if (ret != 3) {
- drm_dbg_kms(mgr->dev, "failed to write payload allocation %d\n", ret);
- goto fail;
- }
-
-retry:
- ret = drm_dp_dpcd_readb(mgr->aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
- if (ret < 0) {
- drm_dbg_kms(mgr->dev, "failed to read payload table status %d\n", ret);
- goto fail;
- }
-
- if (!(status & DP_PAYLOAD_TABLE_UPDATED)) {
- retries++;
- if (retries < 20) {
- usleep_range(10000, 20000);
- goto retry;
- }
- drm_dbg_kms(mgr->dev, "status not set after read payload table status %d\n",
- status);
- ret = -EINVAL;
- goto fail;
- }
- ret = 0;
-fail:
- return ret;
-}
-
/**
* drm_dp_check_act_status() - Polls for ACT handled status.
* @mgr: manager to use
diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
index 38eea21d1082..69793815aa82 100644
--- a/include/drm/display/drm_dp_helper.h
+++ b/include/drm/display/drm_dp_helper.h
@@ -567,6 +567,8 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
enum drm_dp_phy dp_phy,
u8 link_status[DP_LINK_STATUS_SIZE]);
+int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
+ int vcpid, u8 start_time_slot, u8 time_slot_count);
int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
--
2.39.5
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 2/3] drm/dp: extract drm_dp_dpcd_write_payload()
2024-11-18 15:14 ` [PATCH 2/3] drm/dp: extract drm_dp_dpcd_write_payload() Jani Nikula
@ 2024-11-20 15:07 ` Imre Deak
0 siblings, 0 replies; 13+ messages in thread
From: Imre Deak @ 2024-11-20 15:07 UTC (permalink / raw)
To: Jani Nikula; +Cc: Lyude Paul, dri-devel, intel-gfx, intel-xe
On Mon, Nov 18, 2024 at 05:14:53PM +0200, Jani Nikula wrote:
> SST with 128b/132b channel coding needs this too. Extract to a separate
> helper, independent of MST.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/display/drm_dp_helper.c | 56 +++++++++++++++++++
> drivers/gpu/drm/display/drm_dp_mst_topology.c | 52 +----------------
> include/drm/display/drm_dp_helper.h | 2 +
> 3 files changed, 61 insertions(+), 49 deletions(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
> index b7e03bf02cd8..0c9230f3f994 100644
> --- a/drivers/gpu/drm/display/drm_dp_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_helper.c
> @@ -792,6 +792,62 @@ static int read_payload_update_status(struct drm_dp_aux *aux)
> return status;
> }
>
> +/**
> + * drm_dp_dpcd_write_payload() - Write payload
Stg like "Write Virtual Channel Payload information to payload table"
instead?
Regardless of the above or the earlier mtp namespacing comment, patch
looks ok:
Reviewed-by: Imre Deak <imre.deak@intel.com>
> + * @aux: DisplayPort AUX channel
> + * @vcpid: Virtual Channel Payload ID
> + * @start_time_slot: Starting time slot
> + * @time_slot_count: Time slot count
> + *
> + * Write payload table, poll status.
> + *
> + * Returns:
> + * 0 on success, negative error otherwise
> + */
> +int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
> + int vcpid, u8 start_time_slot, u8 time_slot_count)
> +{
> + u8 payload_alloc[3], status;
> + int ret;
> + int retries = 0;
> +
> + drm_dp_dpcd_writeb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS,
> + DP_PAYLOAD_TABLE_UPDATED);
> +
> + payload_alloc[0] = vcpid;
> + payload_alloc[1] = start_time_slot;
> + payload_alloc[2] = time_slot_count;
> +
> + ret = drm_dp_dpcd_write(aux, DP_PAYLOAD_ALLOCATE_SET, payload_alloc, 3);
> + if (ret != 3) {
> + drm_dbg_kms(aux->drm_dev, "failed to write payload allocation %d\n", ret);
> + goto fail;
> + }
> +
> +retry:
> + ret = drm_dp_dpcd_readb(aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
> + if (ret < 0) {
> + drm_dbg_kms(aux->drm_dev, "failed to read payload table status %d\n", ret);
> + goto fail;
> + }
> +
> + if (!(status & DP_PAYLOAD_TABLE_UPDATED)) {
> + retries++;
> + if (retries < 20) {
> + usleep_range(10000, 20000);
> + goto retry;
> + }
> + drm_dbg_kms(aux->drm_dev, "status not set after read payload table status %d\n",
> + status);
> + ret = -EINVAL;
> + goto fail;
> + }
> + ret = 0;
> +fail:
> + return ret;
> +}
> +EXPORT_SYMBOL(drm_dp_dpcd_write_payload);
> +
> /**
> * drm_dp_dpcd_poll_act_handled() - Polls for ACT handled status.
> * @aux: DisplayPort AUX channel
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index 2bdbc1eb282b..a426d13a7a36 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -67,9 +67,6 @@ static bool dump_dp_payload_table(struct drm_dp_mst_topology_mgr *mgr,
>
> static void drm_dp_mst_topology_put_port(struct drm_dp_mst_port *port);
>
> -static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
> - int id, u8 start_slot, u8 num_slots);
> -
> static int drm_dp_send_dpcd_read(struct drm_dp_mst_topology_mgr *mgr,
> struct drm_dp_mst_port *port,
> int offset, int size, u8 *bytes);
> @@ -3263,7 +3260,7 @@ EXPORT_SYMBOL(drm_dp_send_query_stream_enc_status);
> static int drm_dp_create_payload_at_dfp(struct drm_dp_mst_topology_mgr *mgr,
> struct drm_dp_mst_atomic_payload *payload)
> {
> - return drm_dp_dpcd_write_payload(mgr, payload->vcpi, payload->vc_start_slot,
> + return drm_dp_dpcd_write_payload(mgr->aux, payload->vcpi, payload->vc_start_slot,
> payload->time_slots);
> }
>
> @@ -3294,7 +3291,7 @@ static void drm_dp_destroy_payload_at_remote_and_dfp(struct drm_dp_mst_topology_
> }
>
> if (payload->payload_allocation_status == DRM_DP_MST_PAYLOAD_ALLOCATION_DFP)
> - drm_dp_dpcd_write_payload(mgr, payload->vcpi, payload->vc_start_slot, 0);
> + drm_dp_dpcd_write_payload(mgr->aux, payload->vcpi, payload->vc_start_slot, 0);
> }
>
> /**
> @@ -3682,7 +3679,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
> goto out_unlock;
>
> /* Write reset payload */
> - drm_dp_dpcd_write_payload(mgr, 0, 0, 0x3f);
> + drm_dp_dpcd_write_payload(mgr->aux, 0, 0, 0x3f);
>
> drm_dp_mst_queue_probe_work(mgr);
>
> @@ -4679,49 +4676,6 @@ void drm_dp_mst_update_slots(struct drm_dp_mst_topology_state *mst_state, uint8_
> }
> EXPORT_SYMBOL(drm_dp_mst_update_slots);
>
> -static int drm_dp_dpcd_write_payload(struct drm_dp_mst_topology_mgr *mgr,
> - int id, u8 start_slot, u8 num_slots)
> -{
> - u8 payload_alloc[3], status;
> - int ret;
> - int retries = 0;
> -
> - drm_dp_dpcd_writeb(mgr->aux, DP_PAYLOAD_TABLE_UPDATE_STATUS,
> - DP_PAYLOAD_TABLE_UPDATED);
> -
> - payload_alloc[0] = id;
> - payload_alloc[1] = start_slot;
> - payload_alloc[2] = num_slots;
> -
> - ret = drm_dp_dpcd_write(mgr->aux, DP_PAYLOAD_ALLOCATE_SET, payload_alloc, 3);
> - if (ret != 3) {
> - drm_dbg_kms(mgr->dev, "failed to write payload allocation %d\n", ret);
> - goto fail;
> - }
> -
> -retry:
> - ret = drm_dp_dpcd_readb(mgr->aux, DP_PAYLOAD_TABLE_UPDATE_STATUS, &status);
> - if (ret < 0) {
> - drm_dbg_kms(mgr->dev, "failed to read payload table status %d\n", ret);
> - goto fail;
> - }
> -
> - if (!(status & DP_PAYLOAD_TABLE_UPDATED)) {
> - retries++;
> - if (retries < 20) {
> - usleep_range(10000, 20000);
> - goto retry;
> - }
> - drm_dbg_kms(mgr->dev, "status not set after read payload table status %d\n",
> - status);
> - ret = -EINVAL;
> - goto fail;
> - }
> - ret = 0;
> -fail:
> - return ret;
> -}
> -
> /**
> * drm_dp_check_act_status() - Polls for ACT handled status.
> * @mgr: manager to use
> diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
> index 38eea21d1082..69793815aa82 100644
> --- a/include/drm/display/drm_dp_helper.h
> +++ b/include/drm/display/drm_dp_helper.h
> @@ -567,6 +567,8 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
> enum drm_dp_phy dp_phy,
> u8 link_status[DP_LINK_STATUS_SIZE]);
>
> +int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
> + int vcpid, u8 start_time_slot, u8 time_slot_count);
> int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
>
> bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 3/3] drm/dp: extract drm_dp_dpcd_clear_payload()
2024-11-18 15:14 [PATCH 0/3] drm/dp: extract payload helpers Jani Nikula
2024-11-18 15:14 ` [PATCH 1/3] drm/dp: extract drm_dp_dpcd_poll_act_handled() Jani Nikula
2024-11-18 15:14 ` [PATCH 2/3] drm/dp: extract drm_dp_dpcd_write_payload() Jani Nikula
@ 2024-11-18 15:14 ` Jani Nikula
2024-11-20 15:09 ` Imre Deak
2024-11-18 17:20 ` ✗ Fi.CI.SPARSE: warning for drm/dp: extract payload helpers Patchwork
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Jani Nikula @ 2024-11-18 15:14 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, intel-xe, jani.nikula, imre.deak
SST with 128b/132b channel coding needs this too. Extract to a separate
helper, independent of MST.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/display/drm_dp_helper.c | 14 ++++++++++++++
drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +-
include/drm/display/drm_dp_helper.h | 1 +
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
index 0c9230f3f994..9b7f8393440d 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -848,6 +848,20 @@ int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
}
EXPORT_SYMBOL(drm_dp_dpcd_write_payload);
+/**
+ * drm_dp_dpcd_clear_payload() - Clear the entire VC Payload ID table
+ * @aux: DisplayPort AUX channel
+ *
+ * Clear the entire VC Payload ID table.
+ *
+ * Returns: 0 on success, negative error code on errors.
+ */
+int drm_dp_dpcd_clear_payload(struct drm_dp_aux *aux)
+{
+ return drm_dp_dpcd_write_payload(aux, 0, 0, 0x3f);
+}
+EXPORT_SYMBOL(drm_dp_dpcd_clear_payload);
+
/**
* drm_dp_dpcd_poll_act_handled() - Polls for ACT handled status.
* @aux: DisplayPort AUX channel
diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
index a426d13a7a36..307ce0981e2c 100644
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -3679,7 +3679,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
goto out_unlock;
/* Write reset payload */
- drm_dp_dpcd_write_payload(mgr->aux, 0, 0, 0x3f);
+ drm_dp_dpcd_clear_payload(mgr->aux);
drm_dp_mst_queue_probe_work(mgr);
diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
index 69793815aa82..8f4054a56039 100644
--- a/include/drm/display/drm_dp_helper.h
+++ b/include/drm/display/drm_dp_helper.h
@@ -569,6 +569,7 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
int vcpid, u8 start_time_slot, u8 time_slot_count);
+int drm_dp_dpcd_clear_payload(struct drm_dp_aux *aux);
int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
--
2.39.5
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 3/3] drm/dp: extract drm_dp_dpcd_clear_payload()
2024-11-18 15:14 ` [PATCH 3/3] drm/dp: extract drm_dp_dpcd_clear_payload() Jani Nikula
@ 2024-11-20 15:09 ` Imre Deak
0 siblings, 0 replies; 13+ messages in thread
From: Imre Deak @ 2024-11-20 15:09 UTC (permalink / raw)
To: Jani Nikula; +Cc: Lyude Paul, dri-devel, intel-gfx, intel-xe
On Mon, Nov 18, 2024 at 05:14:54PM +0200, Jani Nikula wrote:
> SST with 128b/132b channel coding needs this too. Extract to a separate
> helper, independent of MST.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/display/drm_dp_helper.c | 14 ++++++++++++++
> drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +-
> include/drm/display/drm_dp_helper.h | 1 +
> 3 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
> index 0c9230f3f994..9b7f8393440d 100644
> --- a/drivers/gpu/drm/display/drm_dp_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_helper.c
> @@ -848,6 +848,20 @@ int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
> }
> EXPORT_SYMBOL(drm_dp_dpcd_write_payload);
>
> +/**
> + * drm_dp_dpcd_clear_payload() - Clear the entire VC Payload ID table
> + * @aux: DisplayPort AUX channel
> + *
> + * Clear the entire VC Payload ID table.
> + *
> + * Returns: 0 on success, negative error code on errors.
> + */
> +int drm_dp_dpcd_clear_payload(struct drm_dp_aux *aux)
> +{
> + return drm_dp_dpcd_write_payload(aux, 0, 0, 0x3f);
> +}
> +EXPORT_SYMBOL(drm_dp_dpcd_clear_payload);
> +
> /**
> * drm_dp_dpcd_poll_act_handled() - Polls for ACT handled status.
> * @aux: DisplayPort AUX channel
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index a426d13a7a36..307ce0981e2c 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -3679,7 +3679,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
> goto out_unlock;
>
> /* Write reset payload */
> - drm_dp_dpcd_write_payload(mgr->aux, 0, 0, 0x3f);
> + drm_dp_dpcd_clear_payload(mgr->aux);
>
> drm_dp_mst_queue_probe_work(mgr);
>
> diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
> index 69793815aa82..8f4054a56039 100644
> --- a/include/drm/display/drm_dp_helper.h
> +++ b/include/drm/display/drm_dp_helper.h
> @@ -569,6 +569,7 @@ int drm_dp_dpcd_read_phy_link_status(struct drm_dp_aux *aux,
>
> int drm_dp_dpcd_write_payload(struct drm_dp_aux *aux,
> int vcpid, u8 start_time_slot, u8 time_slot_count);
> +int drm_dp_dpcd_clear_payload(struct drm_dp_aux *aux);
> int drm_dp_dpcd_poll_act_handled(struct drm_dp_aux *aux, int timeout_ms);
>
> bool drm_dp_send_real_edid_checksum(struct drm_dp_aux *aux,
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* ✗ Fi.CI.SPARSE: warning for drm/dp: extract payload helpers
2024-11-18 15:14 [PATCH 0/3] drm/dp: extract payload helpers Jani Nikula
` (2 preceding siblings ...)
2024-11-18 15:14 ` [PATCH 3/3] drm/dp: extract drm_dp_dpcd_clear_payload() Jani Nikula
@ 2024-11-18 17:20 ` Patchwork
2024-11-18 17:36 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-11-27 13:13 ` [PATCH 0/3] " Jani Nikula
5 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2024-11-18 17:20 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
== Series Details ==
Series: drm/dp: extract payload helpers
URL : https://patchwork.freedesktop.org/series/141504/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
^ permalink raw reply [flat|nested] 13+ messages in thread* ✗ Fi.CI.BAT: failure for drm/dp: extract payload helpers
2024-11-18 15:14 [PATCH 0/3] drm/dp: extract payload helpers Jani Nikula
` (3 preceding siblings ...)
2024-11-18 17:20 ` ✗ Fi.CI.SPARSE: warning for drm/dp: extract payload helpers Patchwork
@ 2024-11-18 17:36 ` Patchwork
2024-11-27 13:13 ` [PATCH 0/3] " Jani Nikula
5 siblings, 0 replies; 13+ messages in thread
From: Patchwork @ 2024-11-18 17:36 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 9204 bytes --]
== Series Details ==
Series: drm/dp: extract payload helpers
URL : https://patchwork.freedesktop.org/series/141504/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_15715 -> Patchwork_141504v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_141504v1 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_141504v1, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/index.html
Participating hosts (46 -> 45)
------------------------------
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_141504v1:
### IGT changes ###
#### Possible regressions ####
* igt@i915_pm_rpm@module-reload:
- bat-adls-6: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15715/bat-adls-6/igt@i915_pm_rpm@module-reload.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-adls-6/igt@i915_pm_rpm@module-reload.html
* igt@i915_selftest@live@workarounds:
- bat-mtlp-6: [PASS][3] -> [ABORT][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15715/bat-mtlp-6/igt@i915_selftest@live@workarounds.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-mtlp-6/igt@i915_selftest@live@workarounds.html
Known issues
------------
Here are the changes found in Patchwork_141504v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@core_auth@basic-auth:
- bat-twl-1: [PASS][5] -> [DMESG-WARN][6] ([i915#1982]) +1 other test dmesg-warn
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15715/bat-twl-1/igt@core_auth@basic-auth.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-twl-1/igt@core_auth@basic-auth.html
* igt@gem_mmap@basic:
- bat-dg2-14: NOTRUN -> [SKIP][7] ([i915#4083])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@gem_mmap@basic.html
* igt@gem_render_tiled_blits@basic:
- bat-dg2-14: NOTRUN -> [SKIP][8] ([i915#4079]) +1 other test skip
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@gem_render_tiled_blits@basic.html
* igt@gem_tiled_fence_blits@basic:
- bat-dg2-14: NOTRUN -> [SKIP][9] ([i915#4077]) +2 other tests skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@gem_tiled_fence_blits@basic.html
* igt@i915_pm_rps@basic-api:
- bat-dg2-14: NOTRUN -> [SKIP][10] ([i915#11681] / [i915#6621])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@i915_pm_rps@basic-api.html
* igt@i915_selftest@live:
- bat-mtlp-6: [PASS][11] -> [ABORT][12] ([i915#12829])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15715/bat-mtlp-6/igt@i915_selftest@live.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-mtlp-6/igt@i915_selftest@live.html
* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-dg2-14: NOTRUN -> [SKIP][13] ([i915#4212] / [i915#5190])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg2-14: NOTRUN -> [SKIP][14] ([i915#4212] / [i915#4215] / [i915#5190])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@kms_addfb_basic@basic-y-tiled-legacy.html
* igt@kms_addfb_basic@tile-pitch-mismatch:
- bat-dg2-14: NOTRUN -> [SKIP][15] ([i915#4212]) +7 other tests skip
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@kms_addfb_basic@tile-pitch-mismatch.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-dg2-14: NOTRUN -> [SKIP][16] ([i915#4103] / [i915#4213]) +1 other test skip
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
* igt@kms_dsc@dsc-basic:
- bat-dg2-14: NOTRUN -> [SKIP][17] ([i915#3555] / [i915#3840])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@kms_dsc@dsc-basic.html
* igt@kms_force_connector_basic@force-load-detect:
- bat-dg2-14: NOTRUN -> [SKIP][18]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@kms_force_connector_basic@force-load-detect.html
* igt@kms_force_connector_basic@prune-stale-modes:
- bat-dg2-14: NOTRUN -> [SKIP][19] ([i915#5274])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@kms_force_connector_basic@prune-stale-modes.html
* igt@kms_pm_backlight@basic-brightness:
- bat-dg2-14: NOTRUN -> [SKIP][20] ([i915#5354])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@kms_pm_backlight@basic-brightness.html
* igt@kms_psr@psr-sprite-plane-onoff:
- bat-dg2-14: NOTRUN -> [SKIP][21] ([i915#1072] / [i915#9732]) +3 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@kms_psr@psr-sprite-plane-onoff.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg2-14: NOTRUN -> [SKIP][22] ([i915#3555])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@kms_setmode@basic-clone-single-crtc.html
* igt@prime_vgem@basic-fence-flip:
- bat-dg2-14: NOTRUN -> [SKIP][23] ([i915#3708])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@prime_vgem@basic-fence-flip.html
* igt@prime_vgem@basic-gtt:
- bat-dg2-14: NOTRUN -> [SKIP][24] ([i915#3708] / [i915#4077]) +1 other test skip
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@prime_vgem@basic-gtt.html
* igt@prime_vgem@basic-write:
- bat-dg2-14: NOTRUN -> [SKIP][25] ([i915#3291] / [i915#3708]) +2 other tests skip
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-dg2-14/igt@prime_vgem@basic-write.html
#### Possible fixes ####
* igt@i915_pm_rpm@module-reload:
- bat-rpls-4: [FAIL][26] -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15715/bat-rpls-4/igt@i915_pm_rpm@module-reload.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/bat-rpls-4/igt@i915_pm_rpm@module-reload.html
* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- fi-kbl-7567u: [DMESG-WARN][28] -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15715/fi-kbl-7567u/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/fi-kbl-7567u/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html
[i915#1072]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1072
[i915#11681]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11681
[i915#12829]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12829
[i915#1982]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1982
[i915#3291]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708
[i915#3840]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3840
[i915#4077]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4215
[i915#5190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5274
[i915#5354]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5354
[i915#6621]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6621
[i915#9732]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732
Build changes
-------------
* Linux: CI_DRM_15715 -> Patchwork_141504v1
CI-20190529: 20190529
CI_DRM_15715: 4f08eb8dc2721d6ab0d1df079c2b2ef34f322fed @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8114: 8114
Patchwork_141504v1: 4f08eb8dc2721d6ab0d1df079c2b2ef34f322fed @ git://anongit.freedesktop.org/gfx-ci/linux
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_141504v1/index.html
[-- Attachment #2: Type: text/html, Size: 10922 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 0/3] drm/dp: extract payload helpers
2024-11-18 15:14 [PATCH 0/3] drm/dp: extract payload helpers Jani Nikula
` (4 preceding siblings ...)
2024-11-18 17:36 ` ✗ Fi.CI.BAT: failure " Patchwork
@ 2024-11-27 13:13 ` Jani Nikula
5 siblings, 0 replies; 13+ messages in thread
From: Jani Nikula @ 2024-11-27 13:13 UTC (permalink / raw)
To: dri-devel
Cc: intel-gfx, intel-xe, imre.deak, Maxime Ripard, Thomas Zimmermann,
Maarten Lankhorst, Lyude Paul
On Mon, 18 Nov 2024, Jani Nikula <jani.nikula@intel.com> wrote:
> Add some mst topology manager independent payload helpers.
Cc: maintainers, Lyude, are we good to go with this?
BR,
Jani.
>
> Jani Nikula (3):
> drm/dp: extract drm_dp_dpcd_poll_act_handled()
> drm/dp: extract drm_dp_dpcd_write_payload()
> drm/dp: extract drm_dp_dpcd_clear_payload()
>
> drivers/gpu/drm/display/drm_dp_helper.c | 124 +++++++++++++++++-
> drivers/gpu/drm/display/drm_dp_mst_topology.c | 88 +------------
> include/drm/display/drm_dp_helper.h | 5 +
> 3 files changed, 133 insertions(+), 84 deletions(-)
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 13+ messages in thread