Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-05-10 Thread Daniel Vetter
On Fri, May 07, 2021 at 02:00:14PM -0400, Andrey Grodzovsky wrote: > > > On 2021-05-07 12:24 p.m., Daniel Vetter wrote: > > On Fri, May 07, 2021 at 11:39:49AM -0400, Andrey Grodzovsky wrote: > > > > > > > > > On 2021-05-07 5:11 a.m., Daniel Vetter wrote: > > > > On Thu, May 06, 2021 at 12:25:06

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-05-07 Thread Andrey Grodzovsky
On 2021-05-07 12:24 p.m., Daniel Vetter wrote: On Fri, May 07, 2021 at 11:39:49AM -0400, Andrey Grodzovsky wrote: On 2021-05-07 5:11 a.m., Daniel Vetter wrote: On Thu, May 06, 2021 at 12:25:06PM -0400, Andrey Grodzovsky wrote: On 2021-05-06 5:40 a.m., Daniel Vetter wrote: On Fri, Apr 3

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-05-07 Thread Daniel Vetter
On Fri, May 07, 2021 at 11:39:49AM -0400, Andrey Grodzovsky wrote: > > > On 2021-05-07 5:11 a.m., Daniel Vetter wrote: > > On Thu, May 06, 2021 at 12:25:06PM -0400, Andrey Grodzovsky wrote: > > > > > > > > > On 2021-05-06 5:40 a.m., Daniel Vetter wrote: > > > > On Fri, Apr 30, 2021 at 01:27:37P

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-05-07 Thread Andrey Grodzovsky
On 2021-05-07 5:11 a.m., Daniel Vetter wrote: On Thu, May 06, 2021 at 12:25:06PM -0400, Andrey Grodzovsky wrote: On 2021-05-06 5:40 a.m., Daniel Vetter wrote: On Fri, Apr 30, 2021 at 01:27:37PM -0400, Andrey Grodzovsky wrote: On 2021-04-30 6:25 a.m., Daniel Vetter wrote: On Thu, Apr 29

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-05-07 Thread Daniel Vetter
On Thu, May 06, 2021 at 12:25:06PM -0400, Andrey Grodzovsky wrote: > > > On 2021-05-06 5:40 a.m., Daniel Vetter wrote: > > On Fri, Apr 30, 2021 at 01:27:37PM -0400, Andrey Grodzovsky wrote: > > > > > > > > > On 2021-04-30 6:25 a.m., Daniel Vetter wrote: > > > > On Thu, Apr 29, 2021 at 04:34:55P

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-05-06 Thread Andrey Grodzovsky
On 2021-05-06 5:40 a.m., Daniel Vetter wrote: On Fri, Apr 30, 2021 at 01:27:37PM -0400, Andrey Grodzovsky wrote: On 2021-04-30 6:25 a.m., Daniel Vetter wrote: On Thu, Apr 29, 2021 at 04:34:55PM -0400, Andrey Grodzovsky wrote: On 2021-04-29 3:05 p.m., Daniel Vetter wrote: On Thu, Apr 29

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-05-06 Thread Daniel Vetter
On Fri, Apr 30, 2021 at 01:27:37PM -0400, Andrey Grodzovsky wrote: > > > On 2021-04-30 6:25 a.m., Daniel Vetter wrote: > > On Thu, Apr 29, 2021 at 04:34:55PM -0400, Andrey Grodzovsky wrote: > > > > > > > > > On 2021-04-29 3:05 p.m., Daniel Vetter wrote: > > > > On Thu, Apr 29, 2021 at 12:04:33P

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-05-05 Thread Andrey Grodzovsky
Ping Andrey On 2021-04-30 1:27 p.m., Andrey Grodzovsky wrote: On 2021-04-30 6:25 a.m., Daniel Vetter wrote: On Thu, Apr 29, 2021 at 04:34:55PM -0400, Andrey Grodzovsky wrote: On 2021-04-29 3:05 p.m., Daniel Vetter wrote: On Thu, Apr 29, 2021 at 12:04:33PM -0400, Andrey Grodzovsky wrote:

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-30 Thread Andrey Grodzovsky
On 2021-04-30 6:25 a.m., Daniel Vetter wrote: On Thu, Apr 29, 2021 at 04:34:55PM -0400, Andrey Grodzovsky wrote: On 2021-04-29 3:05 p.m., Daniel Vetter wrote: On Thu, Apr 29, 2021 at 12:04:33PM -0400, Andrey Grodzovsky wrote: On 2021-04-29 7:32 a.m., Daniel Vetter wrote: On Thu, Apr 29

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-30 Thread Daniel Vetter
On Thu, Apr 29, 2021 at 04:34:55PM -0400, Andrey Grodzovsky wrote: > > > On 2021-04-29 3:05 p.m., Daniel Vetter wrote: > > On Thu, Apr 29, 2021 at 12:04:33PM -0400, Andrey Grodzovsky wrote: > > > > > > > > > On 2021-04-29 7:32 a.m., Daniel Vetter wrote: > > > > On Thu, Apr 29, 2021 at 01:23:19P

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-29 Thread Andrey Grodzovsky
On 2021-04-29 3:05 p.m., Daniel Vetter wrote: On Thu, Apr 29, 2021 at 12:04:33PM -0400, Andrey Grodzovsky wrote: On 2021-04-29 7:32 a.m., Daniel Vetter wrote: On Thu, Apr 29, 2021 at 01:23:19PM +0200, Daniel Vetter wrote: On Wed, Apr 28, 2021 at 11:12:00AM -0400, Andrey Grodzovsky wrote:

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-29 Thread Daniel Vetter
On Thu, Apr 29, 2021 at 12:04:33PM -0400, Andrey Grodzovsky wrote: > > > On 2021-04-29 7:32 a.m., Daniel Vetter wrote: > > On Thu, Apr 29, 2021 at 01:23:19PM +0200, Daniel Vetter wrote: > > > On Wed, Apr 28, 2021 at 11:12:00AM -0400, Andrey Grodzovsky wrote: > > > > With this calling drm_dev_unpl

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-29 Thread Andrey Grodzovsky
On 2021-04-29 12:29 p.m., Felix Kuehling wrote: Am 2021-04-29 um 12:21 p.m. schrieb Andrey Grodzovsky: On 2021-04-29 12:15 p.m., Felix Kuehling wrote: Am 2021-04-29 um 12:04 p.m. schrieb Andrey Grodzovsky: So as I understand your preferred approach is that I scope any back_end, HW specific

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-29 Thread Felix Kuehling
Am 2021-04-29 um 12:21 p.m. schrieb Andrey Grodzovsky: > > > On 2021-04-29 12:15 p.m., Felix Kuehling wrote: >> Am 2021-04-29 um 12:04 p.m. schrieb Andrey Grodzovsky: >>> So as I understand your preferred approach is that I scope any >>> back_end, HW specific function with drm_dev_enter/exit becaus

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-29 Thread Andrey Grodzovsky
On 2021-04-29 12:15 p.m., Felix Kuehling wrote: Am 2021-04-29 um 12:04 p.m. schrieb Andrey Grodzovsky: So as I understand your preferred approach is that I scope any back_end, HW specific function with drm_dev_enter/exit because that where MMIO access takes place. But besides explicit MMIO acc

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-29 Thread Felix Kuehling
Am 2021-04-29 um 12:04 p.m. schrieb Andrey Grodzovsky: > So as I understand your preferred approach is that I scope any > back_end, HW specific function with drm_dev_enter/exit because that > where MMIO > access takes place. But besides explicit MMIO access thorough > register accessors in the HW b

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-29 Thread Andrey Grodzovsky
On 2021-04-29 7:32 a.m., Daniel Vetter wrote: On Thu, Apr 29, 2021 at 01:23:19PM +0200, Daniel Vetter wrote: On Wed, Apr 28, 2021 at 11:12:00AM -0400, Andrey Grodzovsky wrote: With this calling drm_dev_unplug will flush and block all in flight IOCTLs Also, add feature such that if device su

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-29 Thread Daniel Vetter
On Thu, Apr 29, 2021 at 01:23:19PM +0200, Daniel Vetter wrote: > On Wed, Apr 28, 2021 at 11:12:00AM -0400, Andrey Grodzovsky wrote: > > With this calling drm_dev_unplug will flush and block > > all in flight IOCTLs > > > > Also, add feature such that if device supports graceful unplug > > we enclo

Re: [PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-29 Thread Daniel Vetter
On Wed, Apr 28, 2021 at 11:12:00AM -0400, Andrey Grodzovsky wrote: > With this calling drm_dev_unplug will flush and block > all in flight IOCTLs > > Also, add feature such that if device supports graceful unplug > we enclose entire IOCTL in SRCU critical section. > > Signed-off-by: Andrey Grodzo

[PATCH v5 20/27] drm: Scope all DRM IOCTLs with drm_dev_enter/exit

2021-04-28 Thread Andrey Grodzovsky
With this calling drm_dev_unplug will flush and block all in flight IOCTLs Also, add feature such that if device supports graceful unplug we enclose entire IOCTL in SRCU critical section. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/drm_ioctl.c | 15 +-- include/drm/drm_drv.