Lines Matching full:sink

476 	/* The first DP IN port is sink 0 and second is sink 1 */  in tb_lc_dp_sink_from_port()
485 static int tb_lc_dp_sink_available(struct tb_switch *sw, int sink) in tb_lc_dp_sink_available() argument
496 * Sink is available for CM/SW to use if the allocation valie is in tb_lc_dp_sink_available()
499 if (!sink) { in tb_lc_dp_sink_available()
514 * tb_lc_dp_sink_query() - Is DP sink available for DP IN port
515 * @sw: Switch whose DP sink is queried
518 * Queries through LC SNK_ALLOCATION registers whether DP sink is available
523 int sink; in tb_lc_dp_sink_query() local
526 * For older generations sink is always available as there is no in tb_lc_dp_sink_query()
532 sink = tb_lc_dp_sink_from_port(sw, in); in tb_lc_dp_sink_query()
533 if (sink < 0) in tb_lc_dp_sink_query()
536 return !tb_lc_dp_sink_available(sw, sink); in tb_lc_dp_sink_query()
540 * tb_lc_dp_sink_alloc() - Allocate DP sink
541 * @sw: Switch whose DP sink is allocated
542 * @in: DP IN port the DP sink is allocated for
544 * Allocate DP sink for @in via LC SNK_ALLOCATION registers. If the
551 int ret, sink; in tb_lc_dp_sink_alloc() local
557 sink = tb_lc_dp_sink_from_port(sw, in); in tb_lc_dp_sink_alloc()
558 if (sink < 0) in tb_lc_dp_sink_alloc()
559 return sink; in tb_lc_dp_sink_alloc()
561 ret = tb_lc_dp_sink_available(sw, sink); in tb_lc_dp_sink_alloc()
570 if (!sink) { in tb_lc_dp_sink_alloc()
585 tb_port_dbg(in, "sink %d allocated\n", sink); in tb_lc_dp_sink_alloc()
590 * tb_lc_dp_sink_dealloc() - De-allocate DP sink
591 * @sw: Switch whose DP sink is de-allocated
592 * @in: DP IN port whose DP sink is de-allocated
594 * De-allocate DP sink from @in using LC SNK_ALLOCATION registers.
598 int ret, sink; in tb_lc_dp_sink_dealloc() local
604 sink = tb_lc_dp_sink_from_port(sw, in); in tb_lc_dp_sink_dealloc()
605 if (sink < 0) in tb_lc_dp_sink_dealloc()
606 return sink; in tb_lc_dp_sink_dealloc()
609 ret = tb_lc_dp_sink_available(sw, sink); in tb_lc_dp_sink_dealloc()
618 if (!sink) in tb_lc_dp_sink_dealloc()
628 tb_port_dbg(in, "sink %d de-allocated\n", sink); in tb_lc_dp_sink_dealloc()