From: Maxime Ripard <mripard@kernel.org>
To: dri-devel@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
Maxime Ripard <mripard@kernel.org>,
Javier Martinez Canillas <javierm@redhat.com>
Subject: [PATCH 3/3] drm/todo: Add TODO entry for "lints"
Date: Wed, 12 Jun 2024 16:35:53 +0200 [thread overview]
Message-ID: <20240612143553.915966-3-mripard@kernel.org> (raw)
In-Reply-To: <20240612143553.915966-1-mripard@kernel.org>
Having lints would prove beneficial to prevent the same dark patterns
from reoccuring over and over again in drivers.
Add a TODO entry for that.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Documentation/gpu/todo.rst | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 94139c652663..16a9a24b33a6 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -717,10 +717,38 @@ doesn't or document it if it does would be of great help.
Contact: Maxime Ripard <mripard@kernel.org>
Level: Intermediate
+Create lints for KMS drivers
+----------------------------
+
+Over time, we've accumulated a list of dark patterns in KMS drivers that
+should be avoided. However, none of them are published anywhere, and not
+all reviewers are aware of them. It creates a situation where we have
+more drivers with problematic / deprecated code, even though we know
+that they shouldn't.
+
+We should create a set of coccinelle scripts that match these patterns,
+and make new drivers run that list. And possibly integrate them in CI.
+
+These patterns include:
+
+ - Drivers using kzalloc() or devm_kzalloc() to allocate their memory,
+ instead of drmm_kzalloc().
+
+ - Drivers not protecting their device resources (MMIO, clocks,
+ regulators, etc.) by drm_dev_enter() and drm_dev_exit().
+
+ - Drivers using drm_dev_unregister() instead of drm_dev_unplug().
+
+ - Drivers not calling drm_atomic_helper_shutdown() at shutdown
+
+Contact: Maxime Ripard <mripard@kernel.org>
+
+Level: Intermediate
+
Enable trinity for DRM
----------------------
And fix up the fallout. Should be really interesting ...
--
2.45.2
next prev parent reply other threads:[~2024-06-12 14:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-12 14:35 [PATCH 1/3] drm/todo: Create a TODO item for additional HDMI work Maxime Ripard
2024-06-12 14:35 ` [PATCH 2/3] drm/todo: Create a TODO item for MIPI-DSI rework Maxime Ripard
2024-06-12 14:35 ` Maxime Ripard [this message]
2024-06-12 18:49 ` [PATCH 3/3] drm/todo: Add TODO entry for "lints" Dmitry Baryshkov
2024-06-12 16:11 ` [PATCH 1/3] drm/todo: Create a TODO item for additional HDMI work Dmitry Baryshkov
2024-06-13 7:44 ` Jani Nikula
2024-06-20 13:33 ` Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240612143553.915966-3-mripard@kernel.org \
--to=mripard@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.