[PATCH v2] drm/TODO: Add vrefresh replacement to the todo

Daniel Vetter daniel at ffwll.ch
Tue Jan 29 17:24:41 UTC 2019


On Tue, Jan 29, 2019 at 11:45:10AM -0500, Sean Paul wrote:
> From: Sean Paul <seanpaul at chromium.org>
> 
> Changes in v2:
> - Add drm_display_mode.vrefresh removal (Ville)
> - Add Sam's R-b and bonus points

hsync has the same problem, maybe add that too. With that:

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>


> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Suggested-by: Daniel Vetter <daniel at ffwll.ch>
> Reviewed-by: Sam Ravnborg <sam at ravnborg.org>
> Bonus-points-awarded-by: Sam Ravnborg <sam at ravnborg.org>
> Signed-off-by: Sean Paul <seanpaul at chromium.org>
> ---
>  Documentation/gpu/todo.rst | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
> index 38360ede12215..1bbfc5e1b2a46 100644
> --- a/Documentation/gpu/todo.rst
> +++ b/Documentation/gpu/todo.rst
> @@ -262,6 +262,24 @@ As a reference, take a look at the conversions already completed in drm core.
>  
>  Contact: Sean Paul, respective driver maintainers
>  
> +Convert direct mode.vrefresh accesses to use drm_mode_vrefresh()
> +----------------------------------------------------------------
> +
> +drm_display_mode.vrefresh isn't guaranteed to be populated. As such, using it
> +is risky and has been known to cause div-by-zero bugs. Fortunately, drm core
> +has helper which will use mode.vrefresh if it's !0 and will calculate it from
> +the timings when it's 0.
> +
> +Use simple search/replace, or (more fun) cocci to replace instances of direct
> +vrefresh access with a call to the helper. Check out
> +https://lists.freedesktop.org/archives/dri-devel/2019-January/205186.html for
> +inspiration.
> +
> +Once all instances of vrefresh have been converted, consider removing vrefresh
> +from drm_display_mode to avoid future use.
> +
> +Contact: Sean Paul
> +
>  Core refactorings
>  =================
>  
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list