drm/i915: Revert "drm/i915: Reject the pin ioctl on gen6+"
Subsystems (2)
PATCH 1/1 drm/i915: Revert "drm/i915: Reject the pin ioctl on gen6+"
This reverts commit 02f6bcccf7c324115747aae2f0addd6af5d321cd.
The OA buffer can contain global data (in particular, not linked to a context or a single batch execution) about GPU events (eg. hw context switches, rc6 transitions, frequency changes, ...) and needs to be mapped to GGTT. The pin ioctl provided a way to do that.
Admittedly, this change broke what seems to be a valid use case of pinning a buffer in GGTT, even when PPGTT is used (which is the reason invoked in the commit message).
--- drivers/gpu/drm/i915/i915_gem.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +0 -3
@@ -4143,9 +4143,6 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data,struct drm_i915_gem_object *obj;int ret; -if (INTEL_INFO (dev)->gen >=6 ) -return -ENODEV ; - ret =i915_mutex_lock_interruptible (dev);if (ret)return ret;
Signature · 1 line
1.8.3.1
Quoted 11 lines · Damien Lespiau
This reverts commit
02f6bcccf7c324115747aae2f0addd6af5d321cd.The OA buffer can contain global data (in particular, not linked to a context or a single batch execution) about GPU events (eg. hw context switches, rc6 transitions, frequency changes, ...) and needs to be mapped to GGTT. The pin ioctl provided a way to do that.
Admittedly, this change broke what seems to be a valid use case of pinning a buffer in GGTT, even when PPGTT is used (which is the reason invoked in the commit message).
Quoted 5 lines
Cc Daniel Vetter <[email protected]>Cc Tomasz Madajczak <[email protected]>Cc Adam Rutkowski <[email protected]>Signed-off-by Damien Lespiau <[email protected]>
being confiscated
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 10 lines · Damien Lespiau
This reverts commit
02f6bcccf7c324115747aae2f0addd6af5d321cd.The OA buffer can contain global data (in particular, not linked to a context or a single batch execution) about GPU events (eg. hw context switches, rc6 transitions, frequency changes, ...) and needs to be mapped to GGTT. The pin ioctl provided a way to do that.
Admittedly, this change broke what seems to be a valid use case of pinning a buffer in GGTT, even when PPGTT is used (which is the reason invoked in the commit message).
Global OA buffers should be handled by the kernel and exposed through perf, imo. I think I'll go lalala on this a bit longer ... -Daniel
Quoted 27 lines
Cc Daniel Vetter <[email protected]>Cc Tomasz Madajczak <[email protected]>Cc Adam Rutkowski <[email protected]>Signed-off-by Damien Lespiau <[email protected]>--- drivers/gpu/drm/i915/i915_gem.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpu/drm/i915/i915_gem.c +0
-3@@ -4143,9 +4143,6 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data,struct drm_i915_gem_object *obj;int ret; -if (INTEL_INFO (dev)->gen >=6 ) -return -ENODEV ; - ret =i915_mutex_lock_interruptible (dev);if (ret)return ret;Signature · 1 line
1.8.3.1
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 8 lines · On Mon, 7 Jul 2014 23:04:55 +0200 Daniel Vetter <[email protected]> wrote:
Quoted 7 lines · Damien Lespiau
This reverts commit
02f6bcccf7c324115747aae2f0addd6af5d321cd.The OA buffer can contain global data (in particular, not linked to a context or a single batch execution) about GPU events (eg. hw context switches, rc6 transitions, frequency changes, ...) and needs to be mapped to GGTT. The pin ioctl provided a way to do that.
Quoted 6 lines
Quoted 3 lines
Admittedly, this change broke what seems to be a valid use case of pinning a buffer in GGTT, even when PPGTT is used (which is the reason invoked in the commit message).
Global OA buffers should be handled by the kernel and exposed through perf, imo. I think I'll go lalala on this a bit longer ...
Why? Because allowing the pin ioctl as root is such a problem? You need to come up with an alternative proposal and we need to get it implemented in some reasonable amount of time if we're not going to just do the simple thing that's already been shown to work...
IOW don't plug your ears and say "lalala" for too long.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Hi Daniel,
Quoted 8 lines · Daniel Vetter
Quoted 7 lines · Damien Lespiau
This reverts commit
02f6bcccf7c324115747aae2f0addd6af5d321cd.The OA buffer can contain global data (in particular, not linked to a context or a single batch execution) about GPU events (eg. hw context switches, rc6 transitions, frequency changes, ...) and needs to be mapped to GGTT. The pin ioctl provided a way to do that.
Quoted 6 lines
Quoted 3 lines
Admittedly, this change broke what seems to be a valid use case of pinning a buffer in GGTT, even when PPGTT is used (which is the reason invoked in the commit message).
Global OA buffers should be handled by the kernel and exposed through perf, imo. I think I'll go lalala on this a bit longer ...
Do you think that we can unblock this now that we have somewhat of path forward with Rob Bragg's work? I'm still uneasy with a precedent where we break working applications and it takes a long time for us to revert the offending change?
Thanks!
Signature · 1 line
Damien
Quoted 15 lines · Damien Lespiau
Hi Daniel,
Quoted 12 lines · Daniel Vetter
Quoted 10 lines · Damien Lespiau
This reverts commit
02f6bcccf7c324115747aae2f0addd6af5d321cd.The OA buffer can contain global data (in particular, not linked to a context or a single batch execution) about GPU events (eg. hw context switches, rc6 transitions, frequency changes, ...) and needs to be mapped to GGTT. The pin ioctl provided a way to do that.
Admittedly, this change broke what seems to be a valid use case of pinning a buffer in GGTT, even when PPGTT is used (which is the reason invoked in the commit message).
Quoted 7 lines
Quoted 2 lines
Global OA buffers should be handled by the kernel and exposed through perf, imo. I think I'll go lalala on this a bit longer ...
Do you think that we can unblock this now that we have somewhat of path forward with Rob Bragg's work? I'm still uneasy with a precedent where we break working applications and it takes a long time for us to revert the offending change?
I still consider pinning stuff behind the kernels back too evil. So if people want that I'd like to see the use-case and why we can't do this differently.
And I've never approved of the pin ioctl but really loudly complained about each occasion I've spotted, so I think the internal users just have to keep the pieces for a bit longer.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 7 lines · On Fri, Sep 19, 2014 Daniel Vetter wrote:
I still consider pinning stuff behind the kernels back too evil. So if people want that I'd like to see the use-case and why we can't do this differently.
And I've never approved of the pin ioctl but really loudly complained about each occasion I've spotted, so I think the internal users just have to keep the pieces for a bit longer.
-Daniel
Daniel. All that's being asked for is a re-instatement of the old mechanism until a better solution can be designed and implemented.
It may well be evil, but the mechanism was there, and was the only known way to handle the OA buffer, so why wouldn't someone use it ? You've broken userspace before you provided any alternative solution.
Please, let's revert this while a more elegant solution is designed, implemented, reviewed, re-implemented, reviewed again, and maybe one day merged.
Remember that it will take a while to filter down to people even after you merge any new solution to nightly, or even drm-next. If we have to wait for the new design, it's not likely to reach us until next year.
Can't we just agree that we're evil, but turn a blind eye while we're coaxed slowly back towards the light ?
Jon
Dave Airlie
maintainerQuoted 19 lines · Jon
Quoted 7 lines · On Fri, Sep 19, 2014 Daniel Vetter wrote:
I still consider pinning stuff behind the kernels back too evil. So if people want that I'd like to see the use-case and why we can't do this differently.
And I've never approved of the pin ioctl but really loudly complained about each occasion I've spotted, so I think the internal users just have to keep the pieces for a bit longer.
-DanielDaniel. All that's being asked for is a re-instatement of the old mechanism until a better solution can be designed and implemented.
It may well be evil, but the mechanism was there, and was the only known way to handle the OA buffer, so why wouldn't someone use it ? You've broken userspace before you provided any alternative solution.
Please, let's revert this while a more elegant solution is designed, implemented, reviewed, re-implemented, reviewed again, and maybe one day merged.
Quoted 6 lines
Remember that it will take a while to filter down to people even after you merge any new solution to nightly, or even drm-next. If we have to wait for the new design, it's not likely to reach us until next year.
Can't we just agree that we're evil, but turn a blind eye while we're coaxed slowly back towards the light ?
I thought we had an agreement that no features that were specific to the non-open source userspace drivers would be merged to the kernel, due to security and maintenance concerns, i.e. exactly this concern, we now have to maintain an interface that we can't regression test in public.
Maybe next time who ever made the decision to force merge code will learn why its a bad idea.
Personally I don't think this interface should be put back in, unless Mesa/Beigenet/libva uses it, does it even have igt tests?
Dave.
Hi Dave,
Quoted 5 lines · Dave Airlie
I thought we had an agreement that no features that were specific to the non-open source userspace drivers would be merged to the kernel, due to security and maintenance concerns, i.e. exactly this concern, we now have to maintain an interface that we can't regression test in public.
Actually, the pin ioctl() has been here for quite some time, since the introduction of GEM, see:
http://lwn.net/Articles/283798/ section 8.2
That's why one side is arguing that it's not acceptable to break user-space (open or closed , it doesn't matter at this point).
Daniel is saying that's a legacy artefact and it shouldn't be used anymore, but breaking a user-space application is enough for me to at least suggest a revert.
HTH,
Signature · 1 line
Damien