Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Add some extra kernel doc to amdgpu_dm

Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Rodrigo Siqueira and committed by
Alex Deucher
c620e79b fdf17f10

+54 -8
+13 -3
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 9321 9321 9322 9322 /** 9323 9323 * amdgpu_dm_atomic_check() - Atomic check implementation for AMDgpu DM. 9324 + * 9324 9325 * @dev: The DRM device 9325 9326 * @state: The atomic state to commit 9326 9327 * ··· 9936 9935 return valid_vsdb_found ? i : -ENODEV; 9937 9936 } 9938 9937 9938 + /** 9939 + * amdgpu_dm_update_freesync_caps - Update Freesync capabilities 9940 + * 9941 + * @aconnector: Connector to query. 9942 + * 9943 + * Amdgpu supports Freesync in DP and HDMI displays, and it is required to keep 9944 + * track of some of the display information in the internal data struct used by 9945 + * amdgpu_dm. This function checks which type of connector we need to set the 9946 + * FreeSync parameters. 9947 + */ 9939 9948 void amdgpu_dm_update_freesync_caps(struct drm_connector *connector, 9940 - struct edid *edid) 9949 + struct edid *edid) 9941 9950 { 9942 9951 int i = 0; 9943 9952 struct detailed_timing *timing; ··· 9960 9949 9961 9950 struct drm_device *dev = connector->dev; 9962 9951 struct amdgpu_device *adev = drm_to_adev(dev); 9963 - bool freesync_capable = false; 9964 9952 struct amdgpu_hdmi_vsdb_info vsdb_info = {0}; 9953 + bool freesync_capable = false; 9965 9954 9966 9955 if (!connector->state) { 9967 9956 DRM_ERROR("%s - Connector has no state", __func__); ··· 9989 9978 9990 9979 if (!adev->dm.freesync_module) 9991 9980 goto update; 9992 - 9993 9981 9994 9982 if (sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT 9995 9983 || sink->sink_signal == SIGNAL_TYPE_EDP) {
+41 -5
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
··· 598 598 * The 'current' sink is in dc_link->sink. */ 599 599 struct dc_sink *dc_sink; 600 600 struct dc_link *dc_link; 601 + 602 + /** 603 + * @dc_em_sink: Reference to the emulated (virtual) sink. 604 + */ 601 605 struct dc_sink *dc_em_sink; 602 606 603 607 /* DM only */ ··· 614 610 struct amdgpu_i2c_adapter *i2c; 615 611 616 612 /* Monitor range limits */ 617 - int min_vfreq ; 613 + /** 614 + * @min_vfreq: Minimal frequency supported by the display in Hz. This 615 + * value is set to zero when there is no FreeSync support. 616 + */ 617 + int min_vfreq; 618 + 619 + /** 620 + * @max_vfreq: Maximum frequency supported by the display in Hz. This 621 + * value is set to zero when there is no FreeSync support. 622 + */ 618 623 int max_vfreq ; 619 624 int pixel_clock_mhz; 620 625 ··· 718 705 uint64_t pbn; 719 706 }; 720 707 708 + /** 709 + * struct amdgpu_hdmi_vsdb_info - Keep track of the VSDB info 710 + * 711 + * AMDGPU supports FreeSync over HDMI by using the VSDB section, and this 712 + * struct is useful to keep track of the display-specific information about 713 + * FreeSync. 714 + */ 721 715 struct amdgpu_hdmi_vsdb_info { 722 - unsigned int amd_vsdb_version; /* VSDB version, should be used to determine which VSIF to send */ 723 - bool freesync_supported; /* FreeSync Supported */ 724 - unsigned int min_refresh_rate_hz; /* FreeSync Minimum Refresh Rate in Hz */ 725 - unsigned int max_refresh_rate_hz; /* FreeSync Maximum Refresh Rate in Hz */ 716 + /** 717 + * @amd_vsdb_version: Vendor Specific Data Block Version, should be 718 + * used to determine which Vendor Specific InfoFrame (VSIF) to send. 719 + */ 720 + unsigned int amd_vsdb_version; 721 + 722 + /** 723 + * @freesync_supported: FreeSync Supported. 724 + */ 725 + bool freesync_supported; 726 + 727 + /** 728 + * @min_refresh_rate_hz: FreeSync Minimum Refresh Rate in Hz. 729 + */ 730 + unsigned int min_refresh_rate_hz; 731 + 732 + /** 733 + * @max_refresh_rate_hz: FreeSync Maximum Refresh Rate in Hz 734 + */ 735 + unsigned int max_refresh_rate_hz; 726 736 }; 727 737 728 738