On Wed, Feb 10, 2016 at 02:02:46PM -0800, Stéphane Marchesin wrote:
> On Wed, Feb 10, 2016 at 1:54 PM, David Herrmann
> wrote:
> > Hi
> >
> > On Wed, Feb 10, 2016 at 10:46 PM, Stéphane Marchesin
> > wrote:
> >> On Wed, Feb 10, 2016 at 1:38 PM, David Herrmann
> >> wrote:
> >>> Hi
> >>>
> >>>
Hi
On Wed, Feb 10, 2016 at 11:02 PM, Stéphane Marchesin
wrote:
> On Wed, Feb 10, 2016 at 1:54 PM, David Herrmann
> wrote:
If a device is unplugged, you should consider all your resources to be
destroyed. There is no reason to release them manually. User-space
*must* be able to
Hi
On Wed, Feb 10, 2016 at 10:46 PM, Stéphane Marchesin
wrote:
> On Wed, Feb 10, 2016 at 1:38 PM, David Herrmann
> wrote:
>> Hi
>>
>> On Wed, Feb 10, 2016 at 9:39 PM, Haixia Shi wrote:
>>>
+ if (udl_device_is_unplugged(dev) &&
+ nr !=
Hi
On Wed, Feb 10, 2016 at 10:38 PM, Haixia Shi wrote:
> David
>
> I am having trouble getting the reference to "drm_global_mutex" to link
> correctly in drm/udl. The error is
>
> ERROR: "drm_global_mutex" [drivers/gpu/drm/udl/udl.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: ***
Hi
On Wed, Feb 10, 2016 at 9:39 PM, Haixia Shi wrote:
>
>> + if (udl_device_is_unplugged(dev) &&
>> + nr != DRM_IOCTL_NR(DRM_IOCTL_MODE_SETCRTC) &&
>> + nr != DRM_IOCTL_NR(DRM_IOCTL_MODE_RMFB) &&
>> + nr !=
Hi
On Wed, Feb 10, 2016 at 9:51 PM, Haixia Shi wrote:
>> This should rather be:
>>
>> drm_release(inode, filp);
>> mutex_lock(_global_mutex);
>> if (!dev->open_count && udl_device_is_unplugged(dev))
>> drm_put_dev(dev);
>>
Hi
On Wed, Feb 10, 2016 at 10:00 PM, Haixia Shi wrote:
> Also note that it is not currently feasible for UDL code to access
> drm_global_mutex.
Then change this.
> Please also refer to the similar comments ("FIXME: open_count is protected
> by drm_global_mutex but that would lead to locking
On Wed, Feb 10, 2016 at 1:54 PM, David Herrmann
wrote:
> Hi
>
> On Wed, Feb 10, 2016 at 10:46 PM, Stéphane Marchesin
> wrote:
>> On Wed, Feb 10, 2016 at 1:38 PM, David Herrmann
>> wrote:
>>> Hi
>>>
>>> On Wed, Feb 10, 2016 at 9:39 PM, Haixia Shi wrote:
> + if
On Wed, Feb 10, 2016 at 1:38 PM, David Herrmann
wrote:
> Hi
>
> On Wed, Feb 10, 2016 at 9:39 PM, Haixia Shi wrote:
>>
>>> + if (udl_device_is_unplugged(dev) &&
>>> + nr != DRM_IOCTL_NR(DRM_IOCTL_MODE_SETCRTC) &&
>>> + nr != DRM_IOCTL_NR(DRM_IOCTL_MODE_RMFB) &&
David
I am having trouble getting the reference to "drm_global_mutex" to link
correctly in drm/udl. The error is
ERROR: "drm_global_mutex" [drivers/gpu/drm/udl/udl.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
This seems to be only accessed in the common drm code.
Hi
On Tue, Feb 9, 2016 at 10:05 PM, Haixia Shi wrote:
> Remove the general drm_device_is_unplugged() checks, and move the unplugged
> flag handling logic into drm/udl. In general we want to keep driver-specific
> logic out of common drm code.
>
> Signed-off-by: Haixia Shi
> Reviewed-by:
Also note that it is not currently feasible for UDL code to access
drm_global_mutex.
Please also refer to the similar comments ("FIXME: open_count is protected
by drm_global_mutex but that would lead to locking inversion with the
driver load path.") in nouveau, i915 and amdgpu.
On Wed, Feb 10,
> This should rather be:
>
> drm_release(inode, filp);
> mutex_lock(_global_mutex);
> if (!dev->open_count && udl_device_is_unplugged(dev))
> drm_put_dev(dev);
> mutex_unlock(_global_mutex);
>
> return 0;
>
> There is no reason to look at the
> + if (udl_device_is_unplugged(dev) &&
> + nr != DRM_IOCTL_NR(DRM_IOCTL_MODE_SETCRTC) &&
> + nr != DRM_IOCTL_NR(DRM_IOCTL_MODE_RMFB) &&
> + nr != DRM_IOCTL_NR(DRM_IOCTL_MODE_DESTROY_DUMB))
> + return -ENODEV;
>
>Why?
>
>Just do:
>
>
On Tue, Feb 09, 2016 at 01:05:43PM -0800, Haixia Shi wrote:
> Remove the general drm_device_is_unplugged() checks, and move the unplugged
> flag handling logic into drm/udl. In general we want to keep driver-specific
> logic out of common drm code.
>
> Signed-off-by: Haixia Shi
> Reviewed-by:
Hi
On Tue, Feb 9, 2016 at 9:45 PM, Haixia Shi wrote:
> Regarding the following comment:
>
>> diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
>> index 1ea8790..b4332d4 100644
>> --- a/drivers/gpu/drm/drm_fops.c
>> +++ b/drivers/gpu/drm/drm_fops.c
>> @@ -497,8 +497,6 @@ int
Hi
On Fri, Feb 5, 2016 at 10:57 PM, Haixia Shi wrote:
> Remove the general drm_device_is_unplugged() checks, and move the unplugged
> flag handling logic into drm/udl. In general we want to keep driver-specific
> logic out of common drm code.
I like the idea of moving this hack into udl.
Remove the general drm_device_is_unplugged() checks, and move the unplugged
flag handling logic into drm/udl. In general we want to keep driver-specific
logic out of common drm code.
Signed-off-by: Haixia Shi
Reviewed-by: Stéphane Marchesin
---
drivers/gpu/drm/drm_drv.c | 6
Regarding the following comment:
> diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
> index 1ea8790..b4332d4 100644
> --- a/drivers/gpu/drm/drm_fops.c
> +++ b/drivers/gpu/drm/drm_fops.c
> @@ -497,8 +497,6 @@ int drm_release(struct inode *inode, struct file
*filp)
>
>
Remove the general drm_device_is_unplugged() checks, and move the unplugged
flag handling logic into drm/udl. In general we want to keep driver-specific
logic out of common drm code.
Signed-off-by: Haixia Shi
Reviewed-by: Stéphane Marchesin
---
drivers/gpu/drm/drm_drv.c | 6 --
20 matches
Mail list logo