All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Nikhil Mahale <nmahale@nvidia.com>
Cc: dri-devel@lists.freedesktop.org
Subject: nvidia vgaarb bug (was: Re: Static inline DRM functions calling into GPL-only code)
Date: Tue, 11 Apr 2017 09:24:33 +0200	[thread overview]
Message-ID: <20170411072433.GA31809@h08.hostsharing.net> (raw)
In-Reply-To: <870d9497-2b8f-92bb-c763-1198208d3931@nvidia.com>

Hi Nikhil,

On Tue, Apr 11, 2017 at 09:44:35AM +0530, Nikhil Mahale wrote:
> There is not interest in relaxing the export of refcount_inc, and 
> changing the license of nvidia-drm.ko isn't viable right now.

Why not dual-license as MIT+GPL?


> * Make these static inline DRM functions EXPORT_SYMBOL instead of 
> inline.

Intuitively, I'd say wrapping a function declared EXPORT_SYMBOL_GPL
in another function declared EXPORT_SYMBOL doesn't seem like a legal
way to solve this issue.


> My name is Nikhil Mahale, and I work at NVIDIA in the Linux drivers 
> team.
> 
> I have been working on adding DRM KMS support to our driver. The NVIDIA 
> GPU driver package (364.12 and higher) provides a kernel module, 
> nvidia-drm.ko, which is licensed as "MIT". This module registers a DRM 
> driver with the DRM subsystem of the Linux kernel and advertises KMS 
> capability on Linux kernel v4.1 or higher, with CONFIG_DRM and 
> CONFIG_DRM_KMS_HELPER enabled.

Sorry to hijack this thread, but there's an egregious, long-standing bug
in your driver with regards to vgaarb usage:  nvidia/nv.c calls
vga_tryget() but never calls vga_put(), in other words your driver locks
legacy VGA I/O but never unlocks it.  This is in the proprietary, non-MIT
licensed portion of your driver.

The bug was already reported to Nvidia four years ago:
https://devtalk.nvidia.com/default/topic/545560

It causes issues such as deadlocks or inability to control backlight
on MacBook Pros, commit 4eebd5a4e726 tried to work around it but
introduced more problems.

Could you please look into fixing that bug? Thanks!

Lukas
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-04-11  7:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11  4:14 Static inline DRM functions calling into GPL-only code Nikhil Mahale
2017-04-11  5:52 ` Daniel Vetter
2017-04-11  6:20   ` Daniel Vetter
2017-04-11 15:15     ` James Jones
2017-04-11 16:09       ` Harry Wentland
2017-04-11 16:37         ` James Jones
2017-04-11 17:33           ` Harry Wentland
2017-04-11  7:24 ` Lukas Wunner [this message]
2017-04-12 22:46   ` nvidia vgaarb bug (was: Re: Static inline DRM functions calling into GPL-only code) Andy Ritger
2017-12-06 11:24     ` Lukas Wunner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170411072433.GA31809@h08.hostsharing.net \
    --to=lukas@wunner.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=nmahale@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.