On Tue, Feb 07, 2017 at 06:51:13PM +0100, Thierry Reding wrote:
> From: Thierry Reding
>
> This commit adds a TODO list to the GPU driver developer's guide. The
> content was taken from the DRMJanitors page on the X.Org wiki:
>
> https://www.x.org/wiki/DRMJanitors/
>
> The goal is to track a list of refactorings that would be nice to see
> merged eventually. Sometimes these would be encountered during patch
> review on the mailing list, and at other times one can come across
> these while working in a specific area of code.
>
> Signed-off-by: Thierry Reding
Sean also acked this on irc, merged to drm-misc-next. I'll update the wiki
with the link. And I assume you'll follow up with a patch, cc: Noralf,
with the tinydrm cleanups once that landed?
Thanks, Daniel
> ---
> Documentation/gpu/index.rst| 1 +
> Documentation/gpu/introduction.rst | 10 ++
> Documentation/gpu/todo.rst | 298
> +
> 3 files changed, 309 insertions(+)
> create mode 100644 Documentation/gpu/todo.rst
>
> diff --git a/Documentation/gpu/index.rst b/Documentation/gpu/index.rst
> index 367d7c36b8e9..c9b08b02f57c 100644
> --- a/Documentation/gpu/index.rst
> +++ b/Documentation/gpu/index.rst
> @@ -13,6 +13,7 @@ Linux GPU Driver Developer's Guide
> i915
> vga-switcheroo
> vgaarbiter
> + todo
>
> .. only:: subproject and html
>
> diff --git a/Documentation/gpu/introduction.rst
> b/Documentation/gpu/introduction.rst
> index eb284eb748ba..1f8bd5ef5f9d 100644
> --- a/Documentation/gpu/introduction.rst
> +++ b/Documentation/gpu/introduction.rst
> @@ -50,3 +50,13 @@ names are "Notes" with information for dangerous or tricky
> corner cases,
> and "FIXME" where the interface could be cleaned up.
>
> Also read the :ref:`guidelines for the kernel documentation at large
> `.
> +
> +Getting Started
> +===
> +
> +Developers interested in helping out with the DRM subsystem are very welcome.
> +Often people will resort to sending in patches for various issues reported by
> +checkpatch or sparse. We welcome such contributions.
> +
> +Anyone looking to kick it up a notch can find a list of janitorial tasks on
> +the :ref:`TODO list `.
> diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
> new file mode 100644
> index ..3813a2525ada
> --- /dev/null
> +++ b/Documentation/gpu/todo.rst
> @@ -0,0 +1,298 @@
> +.. _todo:
> +
> +=
> +TODO list
> +=
> +
> +This section contains a list of smaller janitorial tasks in the kernel DRM
> +graphics subsystem useful as newbie projects. Or for slow rainy days.
> +
> +Subsystem-wide refactorings
> +===
> +
> +De-midlayer drivers
> +---
> +
> +With the recent ``drm_bus`` cleanup patches for 3.17 it is no longer required
> +to have a ``drm_bus`` structure set up. Drivers can directly set up the
> +``drm_device`` structure instead of relying on bus methods in ``drm_usb.c``
> +and ``drm_platform.c``. The goal is to get rid of the driver's ``->load`` /
> +``->unload`` callbacks and open-code the load/unload sequence properly, using
> +the new two-stage ``drm_device`` setup/teardown.
> +
> +Once all existing drivers are converted we can also remove those bus support
> +files for USB and platform devices.
> +
> +All you need is a GPU for a non-converted driver (currently almost all of
> +them, but also all the virtual ones used by KVM, so everyone qualifies).
> +
> +Contact: Daniel Vetter, Thierry Reding, respective driver maintainers
> +
> +Switch from reference/unreference to get/put
> +
> +
> +For some reason DRM core uses ``reference``/``unreference`` suffixes for
> +refcounting functions, but kernel uses ``get``/``put`` (e.g.
> +``kref_get``/``put()``). It would be good to switch over for consistency, and
> +it's shorter. Needs to be done in 3 steps for each pair of functions:
> +
> +* Create new ``get``/``put`` functions, define the old names as compatibility
> + wrappers
> +* Switch over each file/driver using a cocci-generated spatch.
> +* Once all users of the old names are gone, remove them.
> +
> +This way drivers/patches in the progress of getting merged won't break.
> +
> +Contact: Daniel Vetter
> +
> +Convert existing KMS drivers to atomic modesetting
> +--
> +
> +3.19 has the atomic modeset interfaces and helpers, so drivers can now be
> +converted over. Modern compositors like Wayland or Surfaceflinger on Android
> +really want an atomic modeset interface, so this is all about the bright
> +future.
> +
> +There is a conversion guide for atomic and all you need is a GPU for a
> +non-converted driver (again virtual HW drivers for KVM are still all
> +suitable).
> +
> +As part of this drivers also need to convert to universal plane (which means
> +exposing primary & cursor as proper plane objects). But that's much easier to
> +do by direct