Lines Matching full:sink

521 	/* The first DP IN port is sink 0 and second is sink 1 */  in tb_lc_dp_sink_from_port()
530 static int tb_lc_dp_sink_available(struct tb_switch *sw, int sink) in tb_lc_dp_sink_available() argument
541 * Sink is available for CM/SW to use if the allocation valie is in tb_lc_dp_sink_available()
544 if (!sink) { in tb_lc_dp_sink_available()
559 * tb_lc_dp_sink_query() - Is DP sink available for DP IN port
560 * @sw: Switch whose DP sink is queried
563 * Queries through LC SNK_ALLOCATION registers whether DP sink is available
568 int sink; in tb_lc_dp_sink_query() local
571 * For older generations sink is always available as there is no in tb_lc_dp_sink_query()
577 sink = tb_lc_dp_sink_from_port(sw, in); in tb_lc_dp_sink_query()
578 if (sink < 0) in tb_lc_dp_sink_query()
581 return !tb_lc_dp_sink_available(sw, sink); in tb_lc_dp_sink_query()
585 * tb_lc_dp_sink_alloc() - Allocate DP sink
586 * @sw: Switch whose DP sink is allocated
587 * @in: DP IN port the DP sink is allocated for
589 * Allocate DP sink for @in via LC SNK_ALLOCATION registers. If the
596 int ret, sink; in tb_lc_dp_sink_alloc() local
602 sink = tb_lc_dp_sink_from_port(sw, in); in tb_lc_dp_sink_alloc()
603 if (sink < 0) in tb_lc_dp_sink_alloc()
604 return sink; in tb_lc_dp_sink_alloc()
606 ret = tb_lc_dp_sink_available(sw, sink); in tb_lc_dp_sink_alloc()
615 if (!sink) { in tb_lc_dp_sink_alloc()
630 tb_port_dbg(in, "sink %d allocated\n", sink); in tb_lc_dp_sink_alloc()
635 * tb_lc_dp_sink_dealloc() - De-allocate DP sink
636 * @sw: Switch whose DP sink is de-allocated
637 * @in: DP IN port whose DP sink is de-allocated
639 * De-allocate DP sink from @in using LC SNK_ALLOCATION registers.
643 int ret, sink; in tb_lc_dp_sink_dealloc() local
649 sink = tb_lc_dp_sink_from_port(sw, in); in tb_lc_dp_sink_dealloc()
650 if (sink < 0) in tb_lc_dp_sink_dealloc()
651 return sink; in tb_lc_dp_sink_dealloc()
654 ret = tb_lc_dp_sink_available(sw, sink); in tb_lc_dp_sink_dealloc()
663 if (!sink) in tb_lc_dp_sink_dealloc()
673 tb_port_dbg(in, "sink %d de-allocated\n", sink); in tb_lc_dp_sink_dealloc()