diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-07-15 15:48:04 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-07-19 04:31:53 -0400 |
commit | 132d49d728f3af67378ebb01b98cd513f4a2ab1b (patch) | |
tree | 95b9c552a11c3c431ab4721db1b7abb674050204 | |
parent | cb021a3eb6e9870d2f3539e37d8b6de4c9d919f6 (diff) |
drm/dp-mst: Missing kernel doc
Cc: Dave Airlie <airlied@redhat.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1468612088-9721-7-git-send-email-daniel.vetter@ffwll.ch
-rw-r--r-- | drivers/gpu/drm/drm_dp_mst_topology.c | 1 | ||||
-rw-r--r-- | include/drm/drm_dp_mst_helper.h | 140 |
2 files changed, 117 insertions, 24 deletions
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 5020a2aaffeb..04e457117980 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c | |||
@@ -2365,6 +2365,7 @@ EXPORT_SYMBOL(drm_dp_mst_hpd_irq); | |||
2365 | 2365 | ||
2366 | /** | 2366 | /** |
2367 | * drm_dp_mst_detect_port() - get connection status for an MST port | 2367 | * drm_dp_mst_detect_port() - get connection status for an MST port |
2368 | * @connector: DRM connector for this port | ||
2368 | * @mgr: manager for this port | 2369 | * @mgr: manager for this port |
2369 | * @port: unverified pointer to a port | 2370 | * @port: unverified pointer to a port |
2370 | * | 2371 | * |
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index c49bbfaf3cbb..003207670597 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h | |||
@@ -87,7 +87,15 @@ struct drm_dp_mst_port { | |||
87 | struct drm_connector *connector; | 87 | struct drm_connector *connector; |
88 | struct drm_dp_mst_topology_mgr *mgr; | 88 | struct drm_dp_mst_topology_mgr *mgr; |
89 | 89 | ||
90 | struct edid *cached_edid; /* for DP logical ports - make tiling work */ | 90 | /** |
91 | * @cached_edid: for DP logical ports - make tiling work by ensuring | ||
92 | * that the EDID for all connectors is read immediately. | ||
93 | */ | ||
94 | struct edid *cached_edid; | ||
95 | /** | ||
96 | * @has_audio: Tracks whether the sink connector to this port is | ||
97 | * audio-capable. | ||
98 | */ | ||
91 | bool has_audio; | 99 | bool has_audio; |
92 | }; | 100 | }; |
93 | 101 | ||
@@ -397,70 +405,154 @@ struct drm_dp_payload { | |||
397 | 405 | ||
398 | /** | 406 | /** |
399 | * struct drm_dp_mst_topology_mgr - DisplayPort MST manager | 407 | * struct drm_dp_mst_topology_mgr - DisplayPort MST manager |
400 | * @dev: device pointer for adding i2c devices etc. | ||
401 | * @cbs: callbacks for connector addition and destruction. | ||
402 | * @max_dpcd_transaction_bytes - maximum number of bytes to read/write in one go. | ||
403 | * @aux: aux channel for the DP connector. | ||
404 | * @max_payloads: maximum number of payloads the GPU can generate. | ||
405 | * @conn_base_id: DRM connector ID this mgr is connected to. | ||
406 | * @down_rep_recv: msg receiver state for down replies. | ||
407 | * @up_req_recv: msg receiver state for up requests. | ||
408 | * @lock: protects mst state, primary, dpcd. | ||
409 | * @mst_state: if this manager is enabled for an MST capable port. | ||
410 | * @mst_primary: pointer to the primary branch device. | ||
411 | * @dpcd: cache of DPCD for primary port. | ||
412 | * @pbn_div: PBN to slots divisor. | ||
413 | * | 408 | * |
414 | * This struct represents the toplevel displayport MST topology manager. | 409 | * This struct represents the toplevel displayport MST topology manager. |
415 | * There should be one instance of this for every MST capable DP connector | 410 | * There should be one instance of this for every MST capable DP connector |
416 | * on the GPU. | 411 | * on the GPU. |
417 | */ | 412 | */ |
418 | struct drm_dp_mst_topology_mgr { | 413 | struct drm_dp_mst_topology_mgr { |
419 | 414 | /** | |
415 | * @dev: device pointer for adding i2c devices etc. | ||
416 | */ | ||
420 | struct device *dev; | 417 | struct device *dev; |
418 | /** | ||
419 | * @cbs: callbacks for connector addition and destruction. | ||
420 | */ | ||
421 | const struct drm_dp_mst_topology_cbs *cbs; | 421 | const struct drm_dp_mst_topology_cbs *cbs; |
422 | /** | ||
423 | * @max_dpcd_transaction_bytes: maximum number of bytes to read/write | ||
424 | * in one go. | ||
425 | */ | ||
422 | int max_dpcd_transaction_bytes; | 426 | int max_dpcd_transaction_bytes; |
423 | struct drm_dp_aux *aux; /* auxch for this topology mgr to use */ | 427 | /** |
428 | * @aux: AUX channel for the DP MST connector this topolgy mgr is | ||
429 | * controlling. | ||
430 | */ | ||
431 | struct drm_dp_aux *aux; | ||
432 | /** | ||
433 | * @max_payloads: maximum number of payloads the GPU can generate. | ||
434 | */ | ||
424 | int max_payloads; | 435 | int max_payloads; |
436 | /** | ||
437 | * @conn_base_id: DRM connector ID this mgr is connected to. Only used | ||
438 | * to build the MST connector path value. | ||
439 | */ | ||
425 | int conn_base_id; | 440 | int conn_base_id; |
426 | 441 | ||
427 | /* only ever accessed from the workqueue - which should be serialised */ | 442 | /** |
443 | * @down_rep_recv: Message receiver state for down replies. This and | ||
444 | * @up_req_recv are only ever access from the work item, which is | ||
445 | * serialised. | ||
446 | */ | ||
428 | struct drm_dp_sideband_msg_rx down_rep_recv; | 447 | struct drm_dp_sideband_msg_rx down_rep_recv; |
448 | /** | ||
449 | * @up_req_recv: Message receiver state for up requests. This and | ||
450 | * @down_rep_recv are only ever access from the work item, which is | ||
451 | * serialised. | ||
452 | */ | ||
429 | struct drm_dp_sideband_msg_rx up_req_recv; | 453 | struct drm_dp_sideband_msg_rx up_req_recv; |
430 | 454 | ||
431 | /* pointer to info about the initial MST device */ | 455 | /** |
432 | struct mutex lock; /* protects mst_state + primary + dpcd */ | 456 | * @lock: protects mst state, primary, dpcd. |
457 | */ | ||
458 | struct mutex lock; | ||
433 | 459 | ||
460 | /** | ||
461 | * @mst_state: If this manager is enabled for an MST capable port. False | ||
462 | * if no MST sink/branch devices is connected. | ||
463 | */ | ||
434 | bool mst_state; | 464 | bool mst_state; |
465 | /** | ||
466 | * @mst_primary: Pointer to the primary/first branch device. | ||
467 | */ | ||
435 | struct drm_dp_mst_branch *mst_primary; | 468 | struct drm_dp_mst_branch *mst_primary; |
436 | 469 | ||
470 | /** | ||
471 | * @dpcd: Cache of DPCD for primary port. | ||
472 | */ | ||
437 | u8 dpcd[DP_RECEIVER_CAP_SIZE]; | 473 | u8 dpcd[DP_RECEIVER_CAP_SIZE]; |
474 | /** | ||
475 | * @sink_count: Sink count from DEVICE_SERVICE_IRQ_VECTOR_ESI0. | ||
476 | */ | ||
438 | u8 sink_count; | 477 | u8 sink_count; |
478 | /** | ||
479 | * @pbn_div: PBN to slots divisor. | ||
480 | */ | ||
439 | int pbn_div; | 481 | int pbn_div; |
482 | /** | ||
483 | * @total_slots: Total slots that can be allocated. | ||
484 | */ | ||
440 | int total_slots; | 485 | int total_slots; |
486 | /** | ||
487 | * @avail_slots: Still available slots that can be allocated. | ||
488 | */ | ||
441 | int avail_slots; | 489 | int avail_slots; |
490 | /** | ||
491 | * @total_pbn: Total PBN count. | ||
492 | */ | ||
442 | int total_pbn; | 493 | int total_pbn; |
443 | 494 | ||
444 | /* messages to be transmitted */ | 495 | /** |
445 | /* qlock protects the upq/downq and in_progress, | 496 | * @qlock: protects @tx_msg_downq, the tx_slots in struct |
446 | the mstb tx_slots and txmsg->state once they are queued */ | 497 | * &drm_dp_mst_branch and txmsg->state once they are queued |
498 | */ | ||
447 | struct mutex qlock; | 499 | struct mutex qlock; |
500 | /** | ||
501 | * @tx_msg_downq: List of pending down replies. | ||
502 | */ | ||
448 | struct list_head tx_msg_downq; | 503 | struct list_head tx_msg_downq; |
449 | 504 | ||
450 | /* payload info + lock for it */ | 505 | /** |
506 | * @payload_lock: Protect payload information. | ||
507 | */ | ||
451 | struct mutex payload_lock; | 508 | struct mutex payload_lock; |
509 | /** | ||
510 | * @proposed_vcpis: Array of pointers for the new VCPI allocation. The | ||
511 | * VCPI structure itself is embedded into the corresponding | ||
512 | * &drm_dp_mst_port structure. | ||
513 | */ | ||
452 | struct drm_dp_vcpi **proposed_vcpis; | 514 | struct drm_dp_vcpi **proposed_vcpis; |
515 | /** | ||
516 | * @payloads: Array of payloads. | ||
517 | */ | ||
453 | struct drm_dp_payload *payloads; | 518 | struct drm_dp_payload *payloads; |
519 | /** | ||
520 | * @payload_mask: Elements of @payloads actually in use. Since | ||
521 | * reallocation of active outputs isn't possible gaps can be created by | ||
522 | * disabling outputs out of order compared to how they've been enabled. | ||
523 | */ | ||
454 | unsigned long payload_mask; | 524 | unsigned long payload_mask; |
525 | /** | ||
526 | * @vcpi_mask: Similar to @payload_mask, but for @proposed_vcpis. | ||
527 | */ | ||
455 | unsigned long vcpi_mask; | 528 | unsigned long vcpi_mask; |
456 | 529 | ||
530 | /** | ||
531 | * @tx_waitq: Wait to queue stall for the tx worker. | ||
532 | */ | ||
457 | wait_queue_head_t tx_waitq; | 533 | wait_queue_head_t tx_waitq; |
534 | /** | ||
535 | * @work: Probe work. | ||
536 | */ | ||
458 | struct work_struct work; | 537 | struct work_struct work; |
459 | 538 | /** | |
539 | * @tx_work: Sideband transmit worker. This can nest within the main | ||
540 | * @work worker for each transaction @work launches. | ||
541 | */ | ||
460 | struct work_struct tx_work; | 542 | struct work_struct tx_work; |
461 | 543 | ||
544 | /** | ||
545 | * @destroy_connector_list: List of to be destroyed connectors. | ||
546 | */ | ||
462 | struct list_head destroy_connector_list; | 547 | struct list_head destroy_connector_list; |
548 | /** | ||
549 | * @destroy_connector_lock: Protects @connector_list. | ||
550 | */ | ||
463 | struct mutex destroy_connector_lock; | 551 | struct mutex destroy_connector_lock; |
552 | /** | ||
553 | * @destroy_connector_work: Work item to destroy connectors. Needed to | ||
554 | * avoid locking inversion. | ||
555 | */ | ||
464 | struct work_struct destroy_connector_work; | 556 | struct work_struct destroy_connector_work; |
465 | }; | 557 | }; |
466 | 558 | ||