Skip to content

Commit d60ea31

Browse files
committed
drm/TODO: Add drm_display_mode.hsync/vrefresh removal
Drivers shouldn't be using these values, add a TODO so someone removes them. Changes in v2: - Add drm_display_mode.vrefresh removal (Ville) - Add Sam's R-b and bonus points Changes in v3: - Add hsync removal todo item (Daniel) - Change vrefresh wording to make removal less optional Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Suggested-by: Daniel Vetter <daniel@ffwll.ch> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Bonus-points-awarded-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190129192637.73296-1-sean@poorly.run
1 parent 3dadbd2 commit d60ea31

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Documentation/gpu/todo.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,34 @@ no one knows what that means) since underneath they just use dma_alloc_coherent.
272272

273273
Contact: Laurent Pinchart, Daniel Vetter
274274

275+
Convert direct mode.vrefresh accesses to use drm_mode_vrefresh()
276+
----------------------------------------------------------------
277+
278+
drm_display_mode.vrefresh isn't guaranteed to be populated. As such, using it
279+
is risky and has been known to cause div-by-zero bugs. Fortunately, drm core
280+
has helper which will use mode.vrefresh if it's !0 and will calculate it from
281+
the timings when it's 0.
282+
283+
Use simple search/replace, or (more fun) cocci to replace instances of direct
284+
vrefresh access with a call to the helper. Check out
285+
https://lists.freedesktop.org/archives/dri-devel/2019-January/205186.html for
286+
inspiration.
287+
288+
Once all instances of vrefresh have been converted, remove vrefresh from
289+
drm_display_mode to avoid future use.
290+
291+
Contact: Sean Paul
292+
293+
Remove drm_display_mode.hsync
294+
-----------------------------
295+
296+
We have drm_mode_hsync() to calculate this from hsync_start/end, since drivers
297+
shouldn't/don't use this, remove this member to avoid any temptations to use it
298+
in the future. If there is any debug code using drm_display_mode.hsync, convert
299+
it to use drm_mode_hsync() instead.
300+
301+
Contact: Sean Paul
302+
275303
Core refactorings
276304
=================
277305

0 commit comments

Comments
 (0)