[PATCH v6 2/8] drm/fb-helper: Remove drm_fb_helper_crtc

Noralf Trønnes noralf at tronnes.org
Thu May 23 18:58:51 UTC 2019



Den 23.05.2019 15.44, skrev Noralf Trønnes:
> struct drm_fb_helper_crtc is now just a wrapper around drm_mode_set so
> use that directly instead and attach it as a modeset array onto
> drm_client_dev. drm_fb_helper will use this array to store its modesets
> which means it will always initialize a drm_client, but it will not
> register the client (callbacks) unless it's the generic fbdev emulation.
> 
> Code will later be moved to drm_client, so add code there in a new file
> drm_client_modeset.c with MIT license to match drm_fb_helper.c.
> 
> The modeset connector array size is hardcoded for the cloned case to avoid
> having to pass in a value from the driver. A value of 8 is chosen to err
> on the safe side. This means that the max connector argument for
> drm_fb_helper_init() and drm_fb_helper_fbdev_setup() isn't used anymore,
> a todo entry for this is added.
> 
> In pan_display_atomic() restore_fbdev_mode_force() is used instead of
> restore_fbdev_mode_atomic() because that one will later become internal
> to drm_client_modeset.
> 
> Locking order:
> 1. drm_fb_helper->lock
> 2. drm_master_internal_acquire
> 3. drm_client_dev->modeset_mutex
> 
> v6: Improve commit message (Sam Ravnborg)
> 
> v3:
> - Use full drm_client_init/release for the modesets (Daniel Vetter)
> - drm_client_for_each_modeset: use lockdep_assert_held (Daniel Vetter)
> - Hook up to Documentation/gpu/drm-client.rst (Daniel Vetter)
> 
> v2:
> - Add modesets array to drm_client (Daniel Vetter)
> - Use a new file for the modeset code (Daniel Vetter)
> - File has to be MIT licensed (Emmanuel Vadot)
> - Add copyrights from drm_fb_helper.c
> 
> Signed-off-by: Noralf Trønnes <noralf at tronnes.org>
> Reviewed-by: Sam Ravnborg <sam at ravnborg.org>
> ---

> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index 4c3dc4268b65..9ead6436fb87 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -17,7 +17,7 @@ drm-y       :=	drm_auth.o drm_cache.o \
>  		drm_plane.o drm_color_mgmt.o drm_print.o \
>  		drm_dumb_buffers.o drm_mode_config.o drm_vblank.o \
>  		drm_syncobj.o drm_lease.o drm_writeback.o drm_client.o \
> -		drm_atomic_uapi.o
> +		drm_client_modeset.o drm_atomic_uapi.o

The Intel CI informed me that this didn't apply on drm-tip.
There's commit 6498bf5800a3 ("drm: revocation check at drm subsystem")
coming in from drm-intel-next that conflicts. It's not in drm-next yet.
I won't be able to respin this for a week or so, so maybe by that time
it has even been backmerged into drm-misc-next.

Noralf.

>  
>  drm-$(CONFIG_DRM_LEGACY) += drm_legacy_misc.o drm_bufs.o drm_context.o drm_dma.o drm_scatter.o drm_lock.o
>  drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o


More information about the dri-devel mailing list