Lines Matching defs:sink
305 /* The first DP IN port is sink 0 and second is sink 1 */
314 static int tb_lc_dp_sink_available(struct tb_switch *sw, int sink)
328 if (!sink) {
343 * tb_lc_dp_sink_query() - Is DP sink available for DP IN port
344 * @sw: Switch whose DP sink is queried
347 * Queries through LC SNK_ALLOCATION registers whether DP sink is available
352 int sink;
355 * For older generations sink is always available as there is no
361 sink = tb_lc_dp_sink_from_port(sw, in);
362 if (sink < 0)
365 return !tb_lc_dp_sink_available(sw, sink);
369 * tb_lc_dp_sink_alloc() - Allocate DP sink
370 * @sw: Switch whose DP sink is allocated
371 * @in: DP IN port the DP sink is allocated for
373 * Allocate DP sink for @in via LC SNK_ALLOCATION registers. If the
380 int ret, sink;
386 sink = tb_lc_dp_sink_from_port(sw, in);
387 if (sink < 0)
388 return sink;
390 ret = tb_lc_dp_sink_available(sw, sink);
399 if (!sink) {
414 tb_port_dbg(in, "sink %d allocated\n", sink);
419 * tb_lc_dp_sink_dealloc() - De-allocate DP sink
420 * @sw: Switch whose DP sink is de-allocated
421 * @in: DP IN port whose DP sink is de-allocated
423 * De-allocate DP sink from @in using LC SNK_ALLOCATION registers.
427 int ret, sink;
433 sink = tb_lc_dp_sink_from_port(sw, in);
434 if (sink < 0)
435 return sink;
438 ret = tb_lc_dp_sink_available(sw, sink);
447 if (!sink)
457 tb_port_dbg(in, "sink %d de-allocated\n", sink);