All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] drm/i915: Reinstate the mmap ioctl for some platforms
@ 2021-06-28  9:21 ` Thomas Hellström
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Hellström @ 2021-06-28  9:21 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld, Daniel Vetter

Reinstate the mmap ioctl for all current integrated platforms.
The intention was really to have it disabled for discrete graphics
where we enforce a single mmap mode.

This fixes media on rkl/adl.

v2:
- Added a R-B.
- Fixed up the code comment a bit.
v3:
- Added an A-B.
- Point out in the commit message that there was an issue with media on
  rkl/adl.

Fixes: 35cbd91eb541 ("drm/i915: Disable mmap ioctl for gen12+")
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index 6497a2dbdab9..a90f796e85c0 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -62,10 +62,11 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
 	struct drm_i915_gem_object *obj;
 	unsigned long addr;
 
-	/* mmap ioctl is disallowed for all platforms after TGL-LP.  This also
-	 * covers all platforms with local memory.
+	/*
+	 * mmap ioctl is disallowed for all discrete platforms,
+	 * and for all platforms with GRAPHICS_VER > 12.
 	 */
-	if (GRAPHICS_VER(i915) >= 12 && !IS_TIGERLAKE(i915))
+	if (IS_DGFX(i915) || GRAPHICS_VER(i915) > 12)
 		return -EOPNOTSUPP;
 
 	if (args->flags & ~(I915_MMAP_WC))
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Intel-gfx] [PATCH v3] drm/i915: Reinstate the mmap ioctl for some platforms
@ 2021-06-28  9:21 ` Thomas Hellström
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Hellström @ 2021-06-28  9:21 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld, Daniel Vetter

Reinstate the mmap ioctl for all current integrated platforms.
The intention was really to have it disabled for discrete graphics
where we enforce a single mmap mode.

This fixes media on rkl/adl.

v2:
- Added a R-B.
- Fixed up the code comment a bit.
v3:
- Added an A-B.
- Point out in the commit message that there was an issue with media on
  rkl/adl.

Fixes: 35cbd91eb541 ("drm/i915: Disable mmap ioctl for gen12+")
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index 6497a2dbdab9..a90f796e85c0 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -62,10 +62,11 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
 	struct drm_i915_gem_object *obj;
 	unsigned long addr;
 
-	/* mmap ioctl is disallowed for all platforms after TGL-LP.  This also
-	 * covers all platforms with local memory.
+	/*
+	 * mmap ioctl is disallowed for all discrete platforms,
+	 * and for all platforms with GRAPHICS_VER > 12.
 	 */
-	if (GRAPHICS_VER(i915) >= 12 && !IS_TIGERLAKE(i915))
+	if (IS_DGFX(i915) || GRAPHICS_VER(i915) > 12)
 		return -EOPNOTSUPP;
 
 	if (args->flags & ~(I915_MMAP_WC))
-- 
2.31.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3] drm/i915: Reinstate the mmap ioctl for some platforms
  2021-06-28  9:21 ` [Intel-gfx] " Thomas Hellström
@ 2021-06-28 10:59   ` Matthew Auld
  -1 siblings, 0 replies; 7+ messages in thread
From: Matthew Auld @ 2021-06-28 10:59 UTC (permalink / raw)
  To: Thomas Hellström, intel-gfx, dri-devel; +Cc: Daniel Vetter

On 28/06/2021 10:21, Thomas Hellström wrote:
> Reinstate the mmap ioctl for all current integrated platforms.
> The intention was really to have it disabled for discrete graphics
> where we enforce a single mmap mode.
> 
> This fixes media on rkl/adl.
> 
> v2:
> - Added a R-B.
> - Fixed up the code comment a bit.
> v3:
> - Added an A-B.
> - Point out in the commit message that there was an issue with media on
>    rkl/adl.
> 
> Fixes: 35cbd91eb541 ("drm/i915: Disable mmap ioctl for gen12+")
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I already pushed v2 of this last week with the following amended:

"This was reported to break ADL-P with the media stack, which was not 
the intention. Although longer term we do still plan to sunset this 
ioctl even for integrated, in favour of using mmap_offset instead."

> ---
>   drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index 6497a2dbdab9..a90f796e85c0 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -62,10 +62,11 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
>   	struct drm_i915_gem_object *obj;
>   	unsigned long addr;
>   
> -	/* mmap ioctl is disallowed for all platforms after TGL-LP.  This also
> -	 * covers all platforms with local memory.
> +	/*
> +	 * mmap ioctl is disallowed for all discrete platforms,
> +	 * and for all platforms with GRAPHICS_VER > 12.
>   	 */
> -	if (GRAPHICS_VER(i915) >= 12 && !IS_TIGERLAKE(i915))
> +	if (IS_DGFX(i915) || GRAPHICS_VER(i915) > 12)
>   		return -EOPNOTSUPP;
>   
>   	if (args->flags & ~(I915_MMAP_WC))
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915: Reinstate the mmap ioctl for some platforms
@ 2021-06-28 10:59   ` Matthew Auld
  0 siblings, 0 replies; 7+ messages in thread
From: Matthew Auld @ 2021-06-28 10:59 UTC (permalink / raw)
  To: Thomas Hellström, intel-gfx, dri-devel; +Cc: Daniel Vetter

On 28/06/2021 10:21, Thomas Hellström wrote:
> Reinstate the mmap ioctl for all current integrated platforms.
> The intention was really to have it disabled for discrete graphics
> where we enforce a single mmap mode.
> 
> This fixes media on rkl/adl.
> 
> v2:
> - Added a R-B.
> - Fixed up the code comment a bit.
> v3:
> - Added an A-B.
> - Point out in the commit message that there was an issue with media on
>    rkl/adl.
> 
> Fixes: 35cbd91eb541 ("drm/i915: Disable mmap ioctl for gen12+")
> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I already pushed v2 of this last week with the following amended:

"This was reported to break ADL-P with the media stack, which was not 
the intention. Although longer term we do still plan to sunset this 
ioctl even for integrated, in favour of using mmap_offset instead."

> ---
>   drivers/gpu/drm/i915/gem/i915_gem_mman.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index 6497a2dbdab9..a90f796e85c0 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -62,10 +62,11 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
>   	struct drm_i915_gem_object *obj;
>   	unsigned long addr;
>   
> -	/* mmap ioctl is disallowed for all platforms after TGL-LP.  This also
> -	 * covers all platforms with local memory.
> +	/*
> +	 * mmap ioctl is disallowed for all discrete platforms,
> +	 * and for all platforms with GRAPHICS_VER > 12.
>   	 */
> -	if (GRAPHICS_VER(i915) >= 12 && !IS_TIGERLAKE(i915))
> +	if (IS_DGFX(i915) || GRAPHICS_VER(i915) > 12)
>   		return -EOPNOTSUPP;
>   
>   	if (args->flags & ~(I915_MMAP_WC))
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3] drm/i915: Reinstate the mmap ioctl for some platforms
  2021-06-28 10:59   ` [Intel-gfx] " Matthew Auld
@ 2021-06-28 11:01     ` Thomas Hellström
  -1 siblings, 0 replies; 7+ messages in thread
From: Thomas Hellström @ 2021-06-28 11:01 UTC (permalink / raw)
  To: Matthew Auld, intel-gfx, dri-devel; +Cc: Daniel Vetter


On 6/28/21 12:59 PM, Matthew Auld wrote:
> On 28/06/2021 10:21, Thomas Hellström wrote:
>> Reinstate the mmap ioctl for all current integrated platforms.
>> The intention was really to have it disabled for discrete graphics
>> where we enforce a single mmap mode.
>>
>> This fixes media on rkl/adl.
>>
>> v2:
>> - Added a R-B.
>> - Fixed up the code comment a bit.
>> v3:
>> - Added an A-B.
>> - Point out in the commit message that there was an issue with media on
>>    rkl/adl.
>>
>> Fixes: 35cbd91eb541 ("drm/i915: Disable mmap ioctl for gen12+")
>> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
>> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> I already pushed v2 of this last week with the following amended:
>
> "This was reported to break ADL-P with the media stack, which was not 
> the intention. Although longer term we do still plan to sunset this 
> ioctl even for integrated, in favour of using mmap_offset instead."
>
Ah, OK.

Thanks.

Thomas



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915: Reinstate the mmap ioctl for some platforms
@ 2021-06-28 11:01     ` Thomas Hellström
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Hellström @ 2021-06-28 11:01 UTC (permalink / raw)
  To: Matthew Auld, intel-gfx, dri-devel; +Cc: Daniel Vetter


On 6/28/21 12:59 PM, Matthew Auld wrote:
> On 28/06/2021 10:21, Thomas Hellström wrote:
>> Reinstate the mmap ioctl for all current integrated platforms.
>> The intention was really to have it disabled for discrete graphics
>> where we enforce a single mmap mode.
>>
>> This fixes media on rkl/adl.
>>
>> v2:
>> - Added a R-B.
>> - Fixed up the code comment a bit.
>> v3:
>> - Added an A-B.
>> - Point out in the commit message that there was an issue with media on
>>    rkl/adl.
>>
>> Fixes: 35cbd91eb541 ("drm/i915: Disable mmap ioctl for gen12+")
>> Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
>> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
>> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> I already pushed v2 of this last week with the following amended:
>
> "This was reported to break ADL-P with the media stack, which was not 
> the intention. Although longer term we do still plan to sunset this 
> ioctl even for integrated, in favour of using mmap_offset instead."
>
Ah, OK.

Thanks.

Thomas


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Reinstate the mmap ioctl for some platforms (rev3)
  2021-06-28  9:21 ` [Intel-gfx] " Thomas Hellström
  (?)
  (?)
@ 2021-06-28 16:10 ` Patchwork
  -1 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2021-06-28 16:10 UTC (permalink / raw)
  To: Thomas Hellström; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 421 bytes --]

== Series Details ==

Series: drm/i915: Reinstate the mmap ioctl for some platforms (rev3)
URL   : https://patchwork.freedesktop.org/series/91865/
State : failure

== Summary ==

Applying: drm/i915: Reinstate the mmap ioctl for some platforms
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/i915/gem/i915_gem_mman.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.



[-- Attachment #1.2: Type: text/html, Size: 915 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-28 16:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28  9:21 [PATCH v3] drm/i915: Reinstate the mmap ioctl for some platforms Thomas Hellström
2021-06-28  9:21 ` [Intel-gfx] " Thomas Hellström
2021-06-28 10:59 ` Matthew Auld
2021-06-28 10:59   ` [Intel-gfx] " Matthew Auld
2021-06-28 11:01   ` Thomas Hellström
2021-06-28 11:01     ` [Intel-gfx] " Thomas Hellström
2021-06-28 16:10 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Reinstate the mmap ioctl for some platforms (rev3) Patchwork

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.