[Intel-gfx] [PATCH 5/9] drm/display/dp_mst: Fix the payload VCPI check in drm_dp_mst_dump_topology()
Imre Deak
imre.deak at intel.com
Fri Jan 27 19:55:32 UTC 2023
On Fri, Jan 27, 2023 at 09:42:39PM +0200, Ville Syrjälä wrote:
> On Wed, Jan 25, 2023 at 01:48:48PM +0200, Imre Deak wrote:
> > Fix an off-by-one error in the VCPI check in drm_dp_mst_dump_topology().
> >
> > Cc: Lyude Paul <lyude at redhat.com>
> > Cc: dri-devel at lists.freedesktop.org
> > Signed-off-by: Imre Deak <imre.deak at intel.com>
> > ---
> > drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> > index 81cc0c3b1e000..619f616d69e20 100644
> > --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> > +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> > @@ -4770,7 +4770,7 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
> > list_for_each_entry(payload, &state->payloads, next) {
> > char name[14];
> >
> > - if (payload->vcpi != i || payload->delete)
> > + if (payload->vcpi != i + 1 || payload->delete)
>
> Why does this code even do that funny nested double loop?
The payload list is not ordered by VCPIs I think, but the printout wants
to list them in VCPI order.
>
> > continue;
> >
> > fetch_monitor_name(mgr, payload->port, name, sizeof(name));
> > --
> > 2.37.1
>
> --
> Ville Syrjälä
> Intel
More information about the Intel-gfx
mailing list