lkml.org 
[lkml]   [2020]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] drivers: hv: dxgkrnl: core code
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

\
 
 \ /
  Last update: 2020-08-21 15:55    [W:0.480 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site