[PATCH v6 1/4] drm/bridge: Add a drm_bridge_state object

Imre Deak imre.deak at intel.com
Tue Jan 7 14:46:05 UTC 2020


Hi,

On Mon, Jan 06, 2020 at 03:34:06PM +0100, Neil Armstrong wrote:
> From: Boris Brezillon <boris.brezillon at collabora.com>
> 
> One of the last remaining objects to not have its atomic state.
> 
> This is being motivated by our attempt to support runtime bus-format
> negotiation between elements of the bridge chain.
> This patch just paves the road for such a feature by adding a new
> drm_bridge_state object inheriting from drm_private_obj so we can
> re-use some of the existing state initialization/tracking logic.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
> Reviewed-by: Neil Armstrong <narmstrong at baylibre.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Neil Armstrong <narmstrong at baylibre.com>
> ---
> [...]
> +
> +/**
> + * __drm_atomic_helper_bridge_duplicate_state() - Copy atomic bridge state
> + * @bridge: bridge object
> + * @state: atomic bridge state
> + *
> + * Copies atomic state from a bridge's current state and resets inferred values.
> + * This is useful for drivers that subclass the bridge state.
> + */
> +void __drm_atomic_helper_bridge_duplicate_state(struct drm_bridge *bridge,
> +						struct drm_bridge_state *state)
> +{
> +	__drm_atomic_helper_private_obj_duplicate_state(&bridge->base,
> +							&state->base);

When DRM and DRM_KMS_HELPER are built as modules the above will cause the
following build error:

depmod: ERROR: Cycle detected: drm_kms_helper -> drm -> drm_kms_helper
depmod: ERROR: Found 2 modules in dependency cycles!

Using __drm_atomic_helper_private_obj_duplicate_state will add the
drm.ko->drm_kms_helper.ko dependency but drm_kms_helper.ko already
depends on drm.ko

--Imre


More information about the dri-devel mailing list