[PATCH 01/10] drm/dp_mst: add a function to retrieve vcpi slots

Daniel Vetter daniel at ffwll.ch
Tue Feb 24 02:08:30 PST 2015


On Tue, Feb 24, 2015 at 09:23:55AM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> radeon requires this to get the slots for later filling
> out a table on every transition.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  drivers/gpu/drm/drm_dp_mst_topology.c | 13 +++++++++++++
>  include/drm/drm_dp_mst_helper.h       |  2 ++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index 9a5b687..0d15e6e 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -2319,6 +2319,19 @@ out:
>  }
>  EXPORT_SYMBOL(drm_dp_mst_allocate_vcpi);
>  

kerneldoc would be great here ;-)
-Daniel

> +int drm_dp_mst_get_vcpi_slots(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port)
> +{
> +	int slots = 0;
> +	port = drm_dp_get_validated_port_ref(mgr, port);
> +	if (!port)
> +		return slots;
> +
> +	slots = port->vcpi.num_slots;
> +	drm_dp_put_port(port);
> +	return slots;
> +}
> +EXPORT_SYMBOL(drm_dp_mst_get_vcpi_slots);
> +
>  /**
>   * drm_dp_mst_reset_vcpi_slots() - Reset number of slots to 0 for VCPI
>   * @mgr: manager for this port
> diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
> index 00c1da9..a250781 100644
> --- a/include/drm/drm_dp_mst_helper.h
> +++ b/include/drm/drm_dp_mst_helper.h
> @@ -486,6 +486,8 @@ int drm_dp_calc_pbn_mode(int clock, int bpp);
>  
>  bool drm_dp_mst_allocate_vcpi(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port, int pbn, int *slots);
>  
> +int drm_dp_mst_get_vcpi_slots(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port);
> +
>  
>  void drm_dp_mst_reset_vcpi_slots(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port);
>  
> -- 
> 2.1.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list