<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">There isn't any dark plot behind it.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">For instance, in our use case, a DPU (Display Process Unit) which has a </div><div class="gmail_default" style="font-family:monospace,monospace">blit feature (using DRM_RENDER_ALLOW) can be implemented cleanly</div><div class="gmail_default" style="font-family:monospace,monospace">in a separate driver and not being dependent on the DRM core driver. If the blit</div><div class="gmail_default" style="font-family:monospace,monospace">feature is present/enabled, we can dynamically register the ioctls at run-time.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">There are other means to mitigate this, but we thought this would beneficial </div><div class="gmail_default" style="font-family:monospace,monospace">to other drivers as well.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Other SoC drivers like Exynos (G2D) provide this feature by inventing it's own sub-driver</div><div class="gmail_default" style="font-family:monospace,monospace">system/layer and have all the sub-drivers built-in.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 4, 2017 at 6:25 PM, Daniel Vetter <span dir="ltr"><<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Sep 04, 2017 at 06:16:41PM +0300, Marius Vlad wrote:<br>
> From: Marius Vlad <<a href="mailto:marius.vlad0@gmail.com">marius.vlad0@gmail.com</a>><br>
><br>
> Currently driver-specific ioctls have to be declared static and are confined to<br>
> DRM core driver. This patch series provides the means to remove those constrains<br>
> and allow to register driver-specific ioctls dynamically by keeping a list of<br>
> registered ioctls in struct drm_driver, then each component of the driver can<br>
> then register its own specific ioctls using this interface.<br>
><br>
> The driver must assign ioctl_register/ioctl_<wbr>deregister in<br>
> its drm_driver structure in order to make use of it.<br>
><br>
> While SoC drivers benefit the most from this approach (by not polluting DRM core<br>
> driver and allowing sub drivers to implement and register driver-specific<br>
> ioctls dynamically), further patches shows how easy is to convert drm/i915 to<br>
> this approach by registering GEM and perf ioctls separately.<br>
<br>
</span>What exactly is the problem you're trying to solve?<br>
<br>
This awefully smells like some neat way to make loading driver modules for<br>
blob userspace easy ... And I can't think of any other thing you could use<br>
this for.<br>
<br>
And even for the blob userspace use case: Create a separate drm driver<br>
instance, share buffers and fences with dma_buf and dma_fence, and you're<br>
all good. I really have no idea what this is good for, but maybe I'm<br>
missing something?<br>
-Daniel<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Marius Vlad (4):<br>
> drm/gpu: Support registering driver-specific ioctls dynamically<br>
> drm/i915: Convert i915 to use ioctl_register/ioctl_<wbr>deregister.<br>
> drm/i915: Register perf_ ioctls directly in i915_perf file.<br>
> drm/i915: Register GEM ioctls directly in i915_gem file.<br>
><br>
> drivers/gpu/drm/drm_drv.c | 1 +<br>
> drivers/gpu/drm/drm_ioctl.c | 99 ++++++++++++++++++++++++++++++<wbr>++++--<br>
> drivers/gpu/drm/i915/i915_drv.<wbr>c | 107 +++++++++++++++---------------<wbr>---------<br>
> drivers/gpu/drm/i915/i915_gem.<wbr>c | 52 +++++++++++++++++++<br>
> drivers/gpu/drm/i915/i915_<wbr>perf.c | 21 ++++++++<br>
> include/drm/drm_drv.h | 34 +++++++++++++<br>
> include/drm/drm_ioctl.h | 6 +++<br>
> 7 files changed, 249 insertions(+), 71 deletions(-)<br>
><br>
> --<br>
> 2.9.3<br>
><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Daniel Vetter<br>
Software Engineer, Intel Corporation<br>
<a href="http://blog.ffwll.ch" rel="noreferrer" target="_blank">http://blog.ffwll.ch</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font face="monospace, monospace">Marius Vlad</font></div></div>
</div>