• Home
  • Raw
  • Download

Lines Matching full:sink

305 	/* The first DP IN port is sink 0 and second is sink 1 */  in tb_lc_dp_sink_from_port()
314 static int tb_lc_dp_sink_available(struct tb_switch *sw, int sink) in tb_lc_dp_sink_available() argument
325 * Sink is available for CM/SW to use if the allocation valie is in tb_lc_dp_sink_available()
328 if (!sink) { in tb_lc_dp_sink_available()
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; in tb_lc_dp_sink_query() local
355 * For older generations sink is always available as there is no in tb_lc_dp_sink_query()
361 sink = tb_lc_dp_sink_from_port(sw, in); in tb_lc_dp_sink_query()
362 if (sink < 0) in tb_lc_dp_sink_query()
365 return !tb_lc_dp_sink_available(sw, sink); in tb_lc_dp_sink_query()
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; in tb_lc_dp_sink_alloc() local
386 sink = tb_lc_dp_sink_from_port(sw, in); in tb_lc_dp_sink_alloc()
387 if (sink < 0) in tb_lc_dp_sink_alloc()
388 return sink; in tb_lc_dp_sink_alloc()
390 ret = tb_lc_dp_sink_available(sw, sink); in tb_lc_dp_sink_alloc()
399 if (!sink) { in tb_lc_dp_sink_alloc()
414 tb_port_dbg(in, "sink %d allocated\n", sink); in tb_lc_dp_sink_alloc()
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; in tb_lc_dp_sink_dealloc() local
433 sink = tb_lc_dp_sink_from_port(sw, in); in tb_lc_dp_sink_dealloc()
434 if (sink < 0) in tb_lc_dp_sink_dealloc()
435 return sink; in tb_lc_dp_sink_dealloc()
438 ret = tb_lc_dp_sink_available(sw, sink); in tb_lc_dp_sink_dealloc()
447 if (!sink) in tb_lc_dp_sink_dealloc()
457 tb_port_dbg(in, "sink %d de-allocated\n", sink); in tb_lc_dp_sink_dealloc()