Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1293572 > unrolled thread
| Started by | Mark Yao <mark.yao@rock-chips.com> |
|---|---|
| First post | 2015-12-17 04:10 +0100 |
| Last post | 2015-12-17 04:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 7/8] drm: bridge/dw_hdmi: add atomic API support Mark Yao <mark.yao@rock-chips.com> - 2015-12-17 04:10 +0100
Re: [PATCH v3 7/8] drm: bridge/dw_hdmi: add atomic API support Mark yao <mark.yao@rock-chips.com> - 2015-12-17 04:20 +0100
| From | Mark Yao <mark.yao@rock-chips.com> |
|---|---|
| Date | 2015-12-17 04:10 +0100 |
| Subject | [PATCH v3 7/8] drm: bridge/dw_hdmi: add atomic API support |
| Message-ID | <qGx73-25W-1@gated-at.bofh.it> |
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;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Mark yao <mark.yao@rock-chips.com> |
|---|---|
| Date | 2015-12-17 04:20 +0100 |
| Message-ID | <qGxgJ-2dj-3@gated-at.bofh.it> |
| In reply to | #1293572 |
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;
>
--
Mark Yao
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web