Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri 2020-08-14 08:38:53, Sasha Levin wrote:
> Add support for a Hyper-V based vGPU implementation that exposes the
> DirectX API to Linux userspace.

NAK.

Kernel APIs should be documented. ... in tree and with suitable license.
	
> +int dxgadapter_init(struct dxgadapter *adapter, struct hv_device *hdev)
> +{
> +	int ret = 0;
> +	char s[80];
> +
> +	UNUSED(s);

What is going on here?

> +{
> +	struct dxgprocess_adapter *adapter_info = dxgmem_alloc(process,
> +							       DXGMEM_PROCESS_ADAPTER,
> +							       sizeof
> +							       (*adapter_info));

We normally use kernel functions in kernel code.

> +	dxgmutex_unlock(&device->adapter_info->device_list_mutex);

And you should not have private locking primitives, either.

> +bool dxghwqueue_acquire_reference(struct dxghwqueue *hwqueue)
> +{
> +	return refcount_inc_not_zero(&hwqueue->refcount);
> +}

Midlayers are evil.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux