Commit 2ec04b33 authored by Daniel Vetter's avatar Daniel Vetter

drm: Update todo.rst

- drmP.h is now fully split up.
- vkms is happening (and will gain its own todo and docs under a new
  vkms.rst file real soon)
- legacy cruft is completely hidden now, drm_vblank.c is split out
  from drm_irq.c now. I've decided to drop the task to split out
  drm_legacy.ko, partially because Dave already rejected a patch to
  hide the old dri1 drivers better. Current state feels good enough to
  me.
- best_encoder atomic cleanup is done (it's now the default, not even
  exported anymore)
- bunch of smaller things

v2:
- Explain why the drm_legacy.ko task is dropped (Emil).
- typos (Sam).

v3: Fix typo (Ilia)
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: David Airlie <airlied@linux.ie>
Link: https://patchwork.freedesktop.org/patch/msgid/20180905181509.19530-1-daniel.vetter@ffwll.ch
parent d86552ef
...@@ -127,7 +127,8 @@ interfaces to fix these issues: ...@@ -127,7 +127,8 @@ interfaces to fix these issues:
the acquire context explicitly on stack and then also pass it down into the acquire context explicitly on stack and then also pass it down into
drivers explicitly so that the legacy-on-atomic functions can use them. drivers explicitly so that the legacy-on-atomic functions can use them.
Except for some driver code this is done. Except for some driver code this is done. This task should be finished by
adding WARN_ON(!drm_drv_uses_atomic_modeset) in drm_modeset_lock_all().
* A bunch of the vtable hooks are now in the wrong place: DRM has a split * A bunch of the vtable hooks are now in the wrong place: DRM has a split
between core vfunc tables (named ``drm_foo_funcs``), which are used to between core vfunc tables (named ``drm_foo_funcs``), which are used to
...@@ -137,13 +138,6 @@ interfaces to fix these issues: ...@@ -137,13 +138,6 @@ interfaces to fix these issues:
``_helper_funcs`` since they are not part of the core ABI. There's a ``_helper_funcs`` since they are not part of the core ABI. There's a
``FIXME`` comment in the kerneldoc for each such case in ``drm_crtc.h``. ``FIXME`` comment in the kerneldoc for each such case in ``drm_crtc.h``.
* There's a new helper ``drm_atomic_helper_best_encoder()`` which could be
used by all atomic drivers which don't select the encoder for a given
connector at runtime. That's almost all of them, and would allow us to get
rid of a lot of ``best_encoder`` boilerplate in drivers.
This was almost done, but new drivers added a few more cases again.
Contact: Daniel Vetter Contact: Daniel Vetter
Get rid of dev->struct_mutex from GEM drivers Get rid of dev->struct_mutex from GEM drivers
...@@ -164,9 +158,8 @@ private lock. The tricky part is the BO free functions, since those can't ...@@ -164,9 +158,8 @@ private lock. The tricky part is the BO free functions, since those can't
reliably take that lock any more. Instead state needs to be protected with reliably take that lock any more. Instead state needs to be protected with
suitable subordinate locks or some cleanup work pushed to a worker thread. For suitable subordinate locks or some cleanup work pushed to a worker thread. For
performance-critical drivers it might also be better to go with a more performance-critical drivers it might also be better to go with a more
fine-grained per-buffer object and per-context lockings scheme. Currently the fine-grained per-buffer object and per-context lockings scheme. Currently only the
following drivers still use ``struct_mutex``: ``msm``, ``omapdrm`` and ``msm`` driver still use ``struct_mutex``.
``udl``.
Contact: Daniel Vetter, respective driver maintainers Contact: Daniel Vetter, respective driver maintainers
...@@ -190,7 +183,8 @@ Convert drivers to use simple modeset suspend/resume ...@@ -190,7 +183,8 @@ Convert drivers to use simple modeset suspend/resume
Most drivers (except i915 and nouveau) that use Most drivers (except i915 and nouveau) that use
drm_atomic_helper_suspend/resume() can probably be converted to use drm_atomic_helper_suspend/resume() can probably be converted to use
drm_mode_config_helper_suspend/resume(). drm_mode_config_helper_suspend/resume(). Also there's still open-coded version
of the atomic suspend/resume code in older atomic modeset drivers.
Contact: Maintainer of the driver you plan to convert Contact: Maintainer of the driver you plan to convert
...@@ -246,20 +240,10 @@ Core refactorings ...@@ -246,20 +240,10 @@ Core refactorings
Clean up the DRM header mess Clean up the DRM header mess
---------------------------- ----------------------------
Currently the DRM subsystem has only one global header, ``drmP.h``. This is The DRM subsystem originally had only one huge global header, ``drmP.h``. This
used both for functions exported to helper libraries and drivers and functions is now split up, but many source files still include it. The remaining part of
only used internally in the ``drm.ko`` module. The goal would be to move all the cleanup work here is to replace any ``#include <drm/drmP.h>`` by only the
header declarations not needed outside of ``drm.ko`` into headers needed (and fixing up any missing pre-declarations in the headers).
``drivers/gpu/drm/drm_*_internal.h`` header files. ``EXPORT_SYMBOL`` also
needs to be dropped for these functions.
This would nicely tie in with the below task to create kerneldoc after the API
is cleaned up. Or with the "hide legacy cruft better" task.
Note that this is well in progress, but ``drmP.h`` is still huge. The updated
plan is to switch to per-file driver API headers, which will also structure
the kerneldoc better. This should also allow more fine-grained ``#include``
directives.
In the end no .c file should need to include ``drmP.h`` anymore. In the end no .c file should need to include ``drmP.h`` anymore.
...@@ -278,26 +262,6 @@ See https://dri.freedesktop.org/docs/drm/ for what's there already. ...@@ -278,26 +262,6 @@ See https://dri.freedesktop.org/docs/drm/ for what's there already.
Contact: Daniel Vetter Contact: Daniel Vetter
Hide legacy cruft better
------------------------
Way back DRM supported only drivers which shadow-attached to PCI devices with
userspace or fbdev drivers setting up outputs. Modern DRM drivers take charge
of the entire device, you can spot them with the DRIVER_MODESET flag.
Unfortunately there's still large piles of legacy code around which needs to
be hidden so that driver writers don't accidentally end up using it. And to
prevent security issues in those legacy IOCTLs from being exploited on modern
drivers. This has multiple possible subtasks:
* Extract support code for legacy features into a ``drm-legacy.ko`` kernel
module and compile it only when one of the legacy drivers is enabled.
This is mostly done, the only thing left is to split up ``drm_irq.c`` into
legacy cruft and the parts needed by modern KMS drivers.
Contact: Daniel Vetter
Make panic handling work Make panic handling work
------------------------ ------------------------
...@@ -398,18 +362,6 @@ the non-i915 specific modeset tests. ...@@ -398,18 +362,6 @@ the non-i915 specific modeset tests.
Contact: Daniel Vetter Contact: Daniel Vetter
Create a virtual KMS driver for testing (vkms)
----------------------------------------------
With all the latest helpers it should be fairly simple to create a virtual KMS
driver useful for testing, or for running X or similar on headless machines
(to be able to still use the GPU). This would be similar to vgem, but aimed at
the modeset side.
Once the basics are there there's tons of possibilities to extend it.
Contact: Daniel Vetter
Driver Specific Driver Specific
=============== ===============
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment