[PATCH 3/4] drm/hibmc: Implement struct drm_mode_config_funcs.mode_valid

Daniel Vetter daniel at ffwll.ch
Mon Feb 3 09:50:48 UTC 2020


On Sat, Feb 01, 2020 at 01:27:43PM +0100, Thomas Zimmermann wrote:
> The implementation of struct drm_mode_config_funcs.mode_valid verifies
> that enough video memory is available for a given display mode.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>

lgtm, Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>

While browsing I realized that hibmc has a bunch of dummy mode_valid
functions that we could garbage collect. And the kirin driver has a
hand-rolled version of "must call crtc validation funcs for
connector->mode_valid" (because that driver predates the addition of that
support in the probe helpers). In case you're bored :-)

Cheers, Daniel

> ---
>  drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c
> index 50b988fdd5cc..99397ac3b363 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c
> @@ -54,6 +54,7 @@ int hibmc_dumb_create(struct drm_file *file, struct drm_device *dev,
>  }
>  
>  const struct drm_mode_config_funcs hibmc_mode_funcs = {
> +	.mode_valid = drm_vram_helper_mode_valid,
>  	.atomic_check = drm_atomic_helper_check,
>  	.atomic_commit = drm_atomic_helper_commit,
>  	.fb_create = drm_gem_fb_create,
> -- 
> 2.25.0
> 

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


More information about the dri-devel mailing list