[PATCH v2] drm/amdgpu: Change the virtual_display type from int to char*.

Michel Dänzer michel at daenzer.net
Tue Aug 9 08:02:03 UTC 2016


On 09/08/16 04:47 PM, Emily Deng wrote:
> Add PCI domains compare and replace strncmp with strcmp.
> 
> For virtual display feature, as there may be mutiple GPUs,
> for user could choose whiche GPU need to enable this feature, change
> the type of virtual_display from int to char*. The variable will be set
> like this virtual_display="xxxx:xx:xx.x;xxxx:xx:xx.x;".
> 
> Signed-off-by: Emily Deng <Emily.Deng at amd.com>

[...]

> @@ -1182,11 +1183,35 @@ int amdgpu_ip_block_version_cmp(struct amdgpu_device *adev,
>  	return 1;
>  }
>  
> +static void amdgpu_whether_enable_virtual_display(struct amdgpu_device *adev)
> +{
> +	adev->enable_virtual_display = 0;
> +
> +	if (amdgpu_virtual_display) {
> +		struct drm_device *ddev = adev->ddev;
> +		const char *pci_address_name = pci_name(ddev->pdev);

Doesn't the string returned by pci_name include the "pci " prefix? If
so, that would either need to be stripped, or the description of the
virtual_display parameter adapted accordingly.


> +		DRM_INFO("virtual display string:%s, %s:virtual_display:%d\n", amdgpu_virtual_display, pci_address_name, adev->enable_virtual_display);

BTW, this line is too long, please break it up into multiple lines.
Might also be worth checking that checkpatch.pl doesn't complain about
any other style issues.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list