From: Boris Brezillon <boris.brezillon@collabora.com>
To: dri-devel@lists.freedesktop.org
Cc: Lucas Stach <l.stach@pengutronix.de>,
Chris Healy <cphealy@gmail.com>,
Andrey Smirnov <andrew.smirnov@gmail.com>,
Nikita Yushchenko <nikita.yoush@cogentembedded.com>,
kernel@collabora.com, Daniel Vetter <daniel@ffwll.ch>,
Thierry Reding <thierry.reding@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Andrzej Hajda <a.hajda@samsung.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@siol.net>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v7 01/12] drm/bridge: Add a drm_bridge_state object
Date: Thu, 23 Jan 2020 08:37:17 +0100 [thread overview]
Message-ID: <20200123083717.1264d9b4@collabora.com> (raw)
In-Reply-To: <20200122111700.1924960-2-boris.brezillon@collabora.com>
On Wed, 22 Jan 2020 12:16:49 +0100
Boris Brezillon <boris.brezillon@collabora.com> wrote:
> +
> +/**
> + * drm_atomic_get_bridge_state - get bridge state
> + * @state: global atomic state object
> + * @bridge: bridge to get state object for
> + *
> + * This function returns the bridge state for the given bridge, allocating it
> + * if needed. It will also grab the relevant bridge lock to make sure that the
> + * state is consistent.
> + *
> + * Returns:
> + *
> + * Either the allocated state or the error code encoded into the pointer. When
> + * the error is EDEADLK then the w/w mutex code has detected a deadlock and the
> + * entire atomic sequence must be restarted.
> + */
> +struct drm_bridge_state *
> +drm_atomic_get_bridge_state(struct drm_atomic_state *state,
> + struct drm_bridge *bridge)
> +{
> + struct drm_private_state *obj_state;
> +
> + obj_state = drm_atomic_get_private_obj_state(state, &bridge->base);
> + if (IS_ERR(obj_state))
> + return ERR_CAST(obj_state);
> +
> + return drm_priv_to_bridge_state(obj_state);
> +}
> +EXPORT_SYMBOL(drm_atomic_get_bridge_state);
> +
> +/**
> + * drm_atomic_get_old_bridge_state - get old bridge state, if it exists
> + * @state: global atomic state object
> + * @bridge: bridge to grab
> + *
> + * This function returns the old bridge state for the given bridge, or NULL if
> + * the bridge is not part of the global atomic state.
> + */
> +struct drm_bridge_state *
> +drm_atomic_get_old_bridge_state(struct drm_atomic_state *state,
> + struct drm_bridge *bridge)
> +{
> + struct drm_private_state *obj_state;
> +
> + obj_state = drm_atomic_get_old_private_obj_state(state, &bridge->base);
> + if (!obj_state)
> + return NULL;
> +
> + return drm_priv_to_bridge_state(obj_state);
> +}
> +EXPORT_SYMBOL(drm_atomic_get_old_bridge_state);
> +
> +/**
> + * drm_atomic_get_new_bridge_state - get new bridge state, if it exists
> + * @state: global atomic state object
> + * @bridge: bridge to grab
> + *
> + * This function returns the new bridge state for the given bridge, or NULL if
> + * the bridge is not part of the global atomic state.
> + */
> +struct drm_bridge_state *
> +drm_atomic_get_new_bridge_state(struct drm_atomic_state *state,
> + struct drm_bridge *bridge)
> +{
> + struct drm_private_state *obj_state;
> +
> + obj_state = drm_atomic_get_new_private_obj_state(state, &bridge->base);
> + if (!obj_state)
> + return NULL;
> +
> + return drm_priv_to_bridge_state(obj_state);
> +}
> +EXPORT_SYMBOL(drm_atomic_get_new_bridge_state);
> +
Oops, I placed those helpers in the #ifdef CONFIG_DEBUG_FS section.
> #endif
next prev parent reply other threads:[~2020-01-23 7:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 11:16 [PATCH v7 00/12] drm: Add support for bus-format negotiation Boris Brezillon
2020-01-22 11:16 ` [PATCH v7 01/12] drm/bridge: Add a drm_bridge_state object Boris Brezillon
2020-01-23 7:37 ` Boris Brezillon [this message]
2020-01-22 11:16 ` [PATCH v7 02/12] drm/bridge: Patch atomic hooks to take a drm_bridge_state Boris Brezillon
2020-01-22 11:16 ` [PATCH v7 03/12] drm/rcar-du: Plug atomic state hooks to the default implementation Boris Brezillon
2020-01-22 11:16 ` [PATCH v7 04/12] drm/bridge: analogix: " Boris Brezillon
2020-01-22 11:16 ` [PATCH v7 05/12] drm/bridge: Add an ->atomic_check() hook Boris Brezillon
2020-01-22 11:16 ` [PATCH v7 06/12] drm/bridge: Add the necessary bits to support bus format negotiation Boris Brezillon
2020-01-22 23:44 ` Jonas Karlman
2020-01-23 7:39 ` Boris Brezillon
2020-01-23 7:52 ` Jonas Karlman
2020-01-23 8:07 ` Boris Brezillon
2020-01-23 8:50 ` Neil Armstrong
2020-01-22 11:16 ` [PATCH v7 07/12] drm/imx: pd: Use bus format/flags provided by the bridge when available Boris Brezillon
2020-01-22 11:16 ` [PATCH v7 08/12] drm/bridge: lvds-codec: Implement basic bus format negotiation Boris Brezillon
2020-01-22 11:16 ` [PATCH v7 09/12] dt-bindings: display: bridge: lvds-codec: Add new bus-width prop Boris Brezillon
2020-01-22 11:16 ` [PATCH v7 10/12] drm/bridge: panel: Propage bus format/flags Boris Brezillon
2020-01-22 11:16 ` [PATCH v7 11/12] drm/panel: simple: Fix the lt089ac29000 bus_format Boris Brezillon
2020-01-22 11:17 ` [PATCH v7 12/12] ARM: dts: imx: imx51-zii-rdu1: Fix the display pipeline definition Boris Brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200123083717.1264d9b4@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a.hajda@samsung.com \
--cc=andrew.smirnov@gmail.com \
--cc=cphealy@gmail.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@siol.net \
--cc=jonas@kwiboo.se \
--cc=kernel@collabora.com \
--cc=l.stach@pengutronix.de \
--cc=mark.rutland@arm.com \
--cc=narmstrong@baylibre.com \
--cc=nikita.yoush@cogentembedded.com \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).