From: mark.yao@rock-chips.com (Mark yao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 7/8] drm: bridge/dw_hdmi: add atomic API support
Date: Thu, 17 Dec 2015 11:15:52 +0800 [thread overview]
Message-ID: <567228E8.4010904@rock-chips.com> (raw)
In-Reply-To: <1450321718-31389-2-git-send-email-mark.yao@rock-chips.com>
Sorry, Ops, fat finger, discard this lost thread mail.
On 2015?12?17? 11:08, Mark Yao wrote:
> Fill atomic needed funcs with default atomic helper library.
>
> Rockchip use dw_hdmi, and drm/rockchip will covert to atomic api,
> we need dw_hdmi support atomic funcs.
>
> Now another drm driver use dw_hdmi is imx, not yet atomic, so
> check DRIVER_ATOMIC at runtime to spilt atomic and not atomic.
>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Andy Yan <andy.yan@rock-chips.com>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Thierry Reding <treding@nvidia.com>
>
> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
> ---
> Changes in v3: None
> Changes in v2:
> Adviced by Daniel Vetter
> - check DRIVER_ATOMIC at runtime to spilt atomic and not atomic.
>
> drivers/gpu/drm/bridge/dw_hdmi.c | 23 +++++++++++++++++++++--
> 1 file changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c
> index 56de9f1..dc0bdd4 100644
> --- a/drivers/gpu/drm/bridge/dw_hdmi.c
> +++ b/drivers/gpu/drm/bridge/dw_hdmi.c
> @@ -22,6 +22,7 @@
>
> #include <drm/drm_of.h>
> #include <drm/drmP.h>
> +#include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc_helper.h>
> #include <drm/drm_edid.h>
> #include <drm/drm_encoder_slave.h>
> @@ -1522,6 +1523,17 @@ static struct drm_connector_funcs dw_hdmi_connector_funcs = {
> .force = dw_hdmi_connector_force,
> };
>
> +static struct drm_connector_funcs dw_hdmi_atomic_connector_funcs = {
> + .dpms = drm_atomic_helper_connector_dpms,
> + .fill_modes = drm_helper_probe_single_connector_modes,
> + .detect = dw_hdmi_connector_detect,
> + .destroy = dw_hdmi_connector_destroy,
> + .force = dw_hdmi_connector_force,
> + .reset = drm_atomic_helper_connector_reset,
> + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
> + .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
> +};
> +
> static struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = {
> .get_modes = dw_hdmi_connector_get_modes,
> .mode_valid = dw_hdmi_connector_mode_valid,
> @@ -1645,8 +1657,15 @@ static int dw_hdmi_register(struct drm_device *drm, struct dw_hdmi *hdmi)
>
> drm_connector_helper_add(&hdmi->connector,
> &dw_hdmi_connector_helper_funcs);
> - drm_connector_init(drm, &hdmi->connector, &dw_hdmi_connector_funcs,
> - DRM_MODE_CONNECTOR_HDMIA);
> +
> + if (drm_core_check_feature(drm, DRIVER_ATOMIC))
> + drm_connector_init(drm, &hdmi->connector,
> + &dw_hdmi_atomic_connector_funcs,
> + DRM_MODE_CONNECTOR_HDMIA);
> + else
> + drm_connector_init(drm, &hdmi->connector,
> + &dw_hdmi_connector_funcs,
> + DRM_MODE_CONNECTOR_HDMIA);
>
> hdmi->connector.encoder = encoder;
>
--
?ark Yao
next prev parent reply other threads:[~2015-12-17 3:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 3:01 [PATCH v3 0/8] drm/rockchip: covert to support atomic API Mark Yao
2015-12-17 3:01 ` [PATCH v3 1/8] drm/rockchip: Use new vblank api drm_crtc_vblank_* Mark Yao
2015-12-17 3:01 ` [PATCH v3 2/8] drm/rockchip: vop: replace dpms with enable/disable Mark Yao
2015-12-17 3:01 ` [PATCH v3 3/8] drm/rockchip: Convert to support atomic API Mark Yao
2015-12-17 3:01 ` [PATCH v3 4/8] drm/rockchip: Optimization vop mode set Mark Yao
2015-12-17 3:06 ` [PATCH v3 5/8] drm/rockchip: support atomic asynchronous commit Mark Yao
2015-12-17 3:08 ` [PATCH v3 6/8] drm/rockchip: direct config connecter gate and out_mode Mark Yao
2015-12-17 3:08 ` [PATCH v3 7/8] drm: bridge/dw_hdmi: add atomic API support Mark Yao
2015-12-17 3:15 ` Mark yao [this message]
2015-12-17 3:08 ` [PATCH 8/8] drm/rockchip: dw_hdmi: use encoder enable function Mark Yao
2015-12-17 3:16 ` Mark yao
2015-12-17 3:11 ` [PATCH v3 7/8] drm: bridge/dw_hdmi: add atomic API support Mark Yao
2015-12-17 3:13 ` [PATCH v3 8/8] drm/rockchip: dw_hdmi: use encoder enable function Mark Yao
2015-12-17 10:00 ` [PATCH v3 0/8] drm/rockchip: covert to support atomic API Heiko Stübner
2015-12-17 10:32 ` Mark yao
2015-12-17 12:03 ` Heiko Stübner
2015-12-17 14:27 ` Daniel Vetter
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=567228E8.4010904@rock-chips.com \
--to=mark.yao@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).