Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1584163 > unrolled thread

Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes

Started byThomas Hellstrom <thomas@shipmail.org>
First post2017-02-19 16:40 +0100
Last post2017-02-21 12:20 +0100
Articles 6 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes Thomas Hellstrom <thomas@shipmail.org> - 2017-02-19 16:40 +0100
    Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes Daniel Vetter <daniel.vetter@ffwll.ch> - 2017-02-20 23:30 +0100
      Re: DRM_CONTROL node breakage (Re: [PATCH] [RFC] drm: Nerf  DRM_CONTROL nodes) David Airlie <airlied@redhat.com> - 2017-02-21 06:40 +0100
        Re: DRM_CONTROL node breakage (Re: [PATCH] [RFC] drm: Nerf  DRM_CONTROL nodes) Thomas Hellstrom <thomas@shipmail.org> - 2017-02-21 12:00 +0100
      DRM_CONTROL node breakage (Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL  nodes) Thomas Hellstrom <thomas@shipmail.org> - 2017-02-21 06:40 +0100
      Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes Thomas Hellstrom <thomas@shipmail.org> - 2017-02-21 12:20 +0100

#1584163 — Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes

FromThomas Hellstrom <thomas@shipmail.org>
Date2017-02-19 16:40 +0100
SubjectRe: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes
Message-ID<tcBKG-Dv-19@gated-at.bofh.it>
So I think we need a quick revert of this commit or a quick stable
follow-up to unbreak things on our side.

/Thomas


On 02/19/2017 03:54 PM, Thomas Hellstrom wrote:
> Hi!
>
> This patch breaks the vmwgfx resolutionKMS daemon which opens a control
> node to tell DRM about the monitor layout...
>
> /Thomas
>
>
> On 10/28/2016 10:10 AM, Daniel Vetter wrote:
>> Looking at the ioctl permission checks I noticed that it's impossible
>> to import gem buffers into a control nodes, and fd2handle/handle2fd
>> also don't work, so no joy with dma-bufs.
>>
>> The only way to do anything with a control node is by drawing stuff
>> into a dumb buffer and displaying that. I suspect control nodes are an
>> entirely unused thing, and a cursory check shows that there does not
>> seem to be any callers of drmOpenControl nor of the other drmOpen
>> functions using DRM_MODE_CONTROL.
>>
>> Since I don't like dead uabi, let's remove it. But since this would be
>> a really big change I think it's better to start out small by simply
>> not registering anything. We can garbage-collect the dead code later
>> on, once we're sure it's really not used anywhere.
>>
>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>> ---
>>  drivers/gpu/drm/drm_drv.c | 6 ------
>>  1 file changed, 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
>> index 6efdba4993fc..f085e28ffc6f 100644
>> --- a/drivers/gpu/drm/drm_drv.c
>> +++ b/drivers/gpu/drm/drm_drv.c
>> @@ -517,12 +517,6 @@ int drm_dev_init(struct drm_device *dev,
>>  		goto err_free;
>>  	}
>>  
>> -	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
>> -		ret = drm_minor_alloc(dev, DRM_MINOR_CONTROL);
>> -		if (ret)
>> -			goto err_minors;
>> -	}
>> -
>>  	if (drm_core_check_feature(dev, DRIVER_RENDER)) {
>>  		ret = drm_minor_alloc(dev, DRM_MINOR_RENDER);
>>  		if (ret)
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

[toc] | [next] | [standalone]


#1584937

FromDaniel Vetter <daniel.vetter@ffwll.ch>
Date2017-02-20 23:30 +0100
Message-ID<td4CZ-26B-1@gated-at.bofh.it>
In reply to#1584163
On Sun, Feb 19, 2017 at 4:21 PM, Thomas Hellstrom <thomas@shipmail.org> wrote:
> So I think we need a quick revert of this commit or a quick stable
> follow-up to unbreak things on our side.

I'd much prefer we just register control nodes for vmwgfx only, with a
commit message explaining in detail what exactly your control tool is
using (i.e. which ioctl), plus links to the source code for future
references. Also not sold on the immediate revert, this stuff has been
merged since months.
-Daniel

>
> /Thomas
>
>
> On 02/19/2017 03:54 PM, Thomas Hellstrom wrote:
>> Hi!
>>
>> This patch breaks the vmwgfx resolutionKMS daemon which opens a control
>> node to tell DRM about the monitor layout...
>>
>> /Thomas
>>
>>
>> On 10/28/2016 10:10 AM, Daniel Vetter wrote:
>>> Looking at the ioctl permission checks I noticed that it's impossible
>>> to import gem buffers into a control nodes, and fd2handle/handle2fd
>>> also don't work, so no joy with dma-bufs.
>>>
>>> The only way to do anything with a control node is by drawing stuff
>>> into a dumb buffer and displaying that. I suspect control nodes are an
>>> entirely unused thing, and a cursory check shows that there does not
>>> seem to be any callers of drmOpenControl nor of the other drmOpen
>>> functions using DRM_MODE_CONTROL.
>>>
>>> Since I don't like dead uabi, let's remove it. But since this would be
>>> a really big change I think it's better to start out small by simply
>>> not registering anything. We can garbage-collect the dead code later
>>> on, once we're sure it's really not used anywhere.
>>>
>>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>>> ---
>>>  drivers/gpu/drm/drm_drv.c | 6 ------
>>>  1 file changed, 6 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
>>> index 6efdba4993fc..f085e28ffc6f 100644
>>> --- a/drivers/gpu/drm/drm_drv.c
>>> +++ b/drivers/gpu/drm/drm_drv.c
>>> @@ -517,12 +517,6 @@ int drm_dev_init(struct drm_device *dev,
>>>              goto err_free;
>>>      }
>>>
>>> -    if (drm_core_check_feature(dev, DRIVER_MODESET)) {
>>> -            ret = drm_minor_alloc(dev, DRM_MINOR_CONTROL);
>>> -            if (ret)
>>> -                    goto err_minors;
>>> -    }
>>> -
>>>      if (drm_core_check_feature(dev, DRIVER_RENDER)) {
>>>              ret = drm_minor_alloc(dev, DRM_MINOR_RENDER);
>>>              if (ret)
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

[toc] | [prev] | [next] | [standalone]


#1585051 — Re: DRM_CONTROL node breakage (Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes)

FromDavid Airlie <airlied@redhat.com>
Date2017-02-21 06:40 +0100
SubjectRe: DRM_CONTROL node breakage (Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes)
Message-ID<tdbl7-6xF-1@gated-at.bofh.it>
In reply to#1584937
> 
> No.
> 
> IMO Not fixing this immediately through stable is out of the question.
> The deal is that we don't break userspace.
> Having said that, I'm not against a long term vmwgfx-only solution. But
> let's fix this now.
> 
> Admittedly we missed testing this but you got to understand that not all
> developer teams have a multitude of
> developers (we have on average one for the whole linux graphics driver
> stack except GL), and the bug
> doesn't show up for QE on regression testing unless they run
> gnome-sheel/Wayland which they currently don't, and I guess they've been
> focused on the fb2 regression.
> 
> It's no secret that we've been using the control nodes for some time.
> The CONTROL_ALLOW is present in the
> driver private ioctls and the commit has been there since 2016.
> 
> The user-space code has been present in vmware-tools also since that
> commit and due to the long release cycles of
> open-vm-tools the open-vm-tools version was just about to be released.
> It's necessary for non-xorg

can you send a revert against drm-next? I'm not sure how clean it will be.

there might be an intermediate step.

Then can we port vmtools of this behaviour, not even sure what it is doing.

Dave.

[toc] | [prev] | [next] | [standalone]


#1585212 — Re: DRM_CONTROL node breakage (Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes)

FromThomas Hellstrom <thomas@shipmail.org>
Date2017-02-21 12:00 +0100
SubjectRe: DRM_CONTROL node breakage (Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes)
Message-ID<tdgkO-1pa-29@gated-at.bofh.it>
In reply to#1585051
On 02/21/2017 06:34 AM, David Airlie wrote:
>> No.
>>
>> IMO Not fixing this immediately through stable is out of the question.
>> The deal is that we don't break userspace.
>> Having said that, I'm not against a long term vmwgfx-only solution. But
>> let's fix this now.
>>
>> Admittedly we missed testing this but you got to understand that not all
>> developer teams have a multitude of
>> developers (we have on average one for the whole linux graphics driver
>> stack except GL), and the bug
>> doesn't show up for QE on regression testing unless they run
>> gnome-sheel/Wayland which they currently don't, and I guess they've been
>> focused on the fb2 regression.
>>
>> It's no secret that we've been using the control nodes for some time.
>> The CONTROL_ALLOW is present in the
>> driver private ioctls and the commit has been there since 2016.
>>
>> The user-space code has been present in vmware-tools also since that
>> commit and due to the long release cycles of
>> open-vm-tools the open-vm-tools version was just about to be released.
>> It's necessary for non-xorg
> can you send a revert against drm-next? I'm not sure how clean it will be.
>
> there might be an intermediate step.
>
> Then can we port vmtools of this behaviour, not even sure what it is doing.
>
> Dave.

So after a quick investigation of the impact it looks like the daemon
patch was pulled out of the Fedora open-vm-tools update in time. This
limits the impact to within VMware where we can update the daemon code
and rerun the test cycle. I've posted a patch that makes it possible for
us to use render-nodes instead of control nodes.

/Thomas

[toc] | [prev] | [next] | [standalone]


#1585055 — DRM_CONTROL node breakage (Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes)

FromThomas Hellstrom <thomas@shipmail.org>
Date2017-02-21 06:40 +0100
SubjectDRM_CONTROL node breakage (Re: [PATCH] [RFC] drm: Nerf DRM_CONTROL nodes)
Message-ID<tdbl7-6xF-3@gated-at.bofh.it>
In reply to#1584937
No.

IMO Not fixing this immediately through stable is out of the question.
The deal is that we don't break userspace.
Having said that, I'm not against a long term vmwgfx-only solution. But
let's fix this now.

Admittedly we missed testing this but you got to understand that not all
developer teams have a multitude of
developers (we have on average one for the whole linux graphics driver
stack except GL), and the bug
doesn't show up for QE on regression testing unless they run
gnome-sheel/Wayland which they currently don't, and I guess they've been
focused on the fb2 regression.

It's no secret that we've been using the control nodes for some time.
The CONTROL_ALLOW is present in the
driver private ioctls and the commit has been there since 2016.

The user-space code has been present in vmware-tools also since that
commit and due to the long release cycles of
open-vm-tools the open-vm-tools version was just about to be released.
It's necessary for non-xorg

/Thomas


On 02/20/2017 11:22 PM, Daniel Vetter wrote:
> On Sun, Feb 19, 2017 at 4:21 PM, Thomas Hellstrom <thomas@shipmail.org> wrote:
>> So I think we need a quick revert of this commit or a quick stable
>> follow-up to unbreak things on our side.
> I'd much prefer we just register control nodes for vmwgfx only, with a
> commit message explaining in detail what exactly your control tool is
> using (i.e. which ioctl), plus links to the source code for future
> references. Also not sold on the immediate revert, this stuff has been
> merged since months.
> -Daniel
>
>> /Thomas
>>
>>
>> On 02/19/2017 03:54 PM, Thomas Hellstrom wrote:
>>> Hi!
>>>
>>> This patch breaks the vmwgfx resolutionKMS daemon which opens a control
>>> node to tell DRM about the monitor layout...
>>>
>>> /Thomas
>>>
>>>
>>> On 10/28/2016 10:10 AM, Daniel Vetter wrote:
>>>> Looking at the ioctl permission checks I noticed that it's impossible
>>>> to import gem buffers into a control nodes, and fd2handle/handle2fd
>>>> also don't work, so no joy with dma-bufs.
>>>>
>>>> The only way to do anything with a control node is by drawing stuff
>>>> into a dumb buffer and displaying that. I suspect control nodes are an
>>>> entirely unused thing, and a cursory check shows that there does not
>>>> seem to be any callers of drmOpenControl nor of the other drmOpen
>>>> functions using DRM_MODE_CONTROL.
>>>>
>>>> Since I don't like dead uabi, let's remove it. But since this would be
>>>> a really big change I think it's better to start out small by simply
>>>> not registering anything. We can garbage-collect the dead code later
>>>> on, once we're sure it's really not used anywhere.
>>>>
>>>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>>>> ---
>>>>  drivers/gpu/drm/drm_drv.c | 6 ------
>>>>  1 file changed, 6 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
>>>> index 6efdba4993fc..f085e28ffc6f 100644
>>>> --- a/drivers/gpu/drm/drm_drv.c
>>>> +++ b/drivers/gpu/drm/drm_drv.c
>>>> @@ -517,12 +517,6 @@ int drm_dev_init(struct drm_device *dev,
>>>>              goto err_free;
>>>>      }
>>>>
>>>> -    if (drm_core_check_feature(dev, DRIVER_MODESET)) {
>>>> -            ret = drm_minor_alloc(dev, DRM_MINOR_CONTROL);
>>>> -            if (ret)
>>>> -                    goto err_minors;
>>>> -    }
>>>> -
>>>>      if (drm_core_check_feature(dev, DRIVER_RENDER)) {
>>>>              ret = drm_minor_alloc(dev, DRM_MINOR_RENDER);
>>>>              if (ret)
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
>
>

[toc] | [prev] | [next] | [standalone]


#1585229

FromThomas Hellstrom <thomas@shipmail.org>
Date2017-02-21 12:20 +0100
Message-ID<tdgEa-1QZ-9@gated-at.bofh.it>
In reply to#1584937
On 02/20/2017 11:22 PM, Daniel Vetter wrote:
> On Sun, Feb 19, 2017 at 4:21 PM, Thomas Hellstrom <thomas@shipmail.org> wrote:
>> So I think we need a quick revert of this commit or a quick stable
>> follow-up to unbreak things on our side.
> I'd much prefer we just register control nodes for vmwgfx only, with a
> commit message explaining in detail what exactly your control tool is
> using (i.e. which ioctl), plus links to the source code for future
> references. Also not sold on the immediate revert, this stuff has been
> merged since months.
> -Daniel
>

https://cgit.freedesktop.org/~thomash/open-vm-tools/commit/?h=feature/thellstrom/resolutionKMS&id=9bf65a22d5a06d3a706bc14578619a56e06f8a24

/Thomas

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web