Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1605731
| From | Neil Armstrong <narmstrong@baylibre.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 01/13] drm/meson: Use crtc_state for hdisplay and fix atomic flush/enable sync for vsync commit |
| Date | 2017-03-21 16:30 +0100 |
| Message-ID | <tntTt-5b0-67@gated-at.bofh.it> (permalink) |
| References | <tntTr-5b0-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Clean the crtc_enable by using the proper crtc_state instead of the state
of the primary plane state data.
Also fix the dependency to commit the plane changes even if enable is called
after the flush.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/gpu/drm/meson/meson_crtc.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/meson/meson_crtc.c b/drivers/gpu/drm/meson/meson_crtc.c
index 0fe49ec..c986eb0 100644
--- a/drivers/gpu/drm/meson/meson_crtc.c
+++ b/drivers/gpu/drm/meson/meson_crtc.c
@@ -82,11 +82,18 @@ static void meson_crtc_disable_vblank(struct drm_crtc *crtc)
static void meson_crtc_enable(struct drm_crtc *crtc)
{
struct meson_crtc *meson_crtc = to_meson_crtc(crtc);
- struct drm_plane *plane = meson_crtc->priv->primary_plane;
+ struct drm_crtc_state *crtc_state = crtc->state;
struct meson_drm *priv = meson_crtc->priv;
+ DRM_DEBUG_DRIVER("\n");
+
+ if (!crtc_state) {
+ DRM_ERROR("Invalid crtc_state\n");
+ return;
+ }
+
/* Enable VPP Postblend */
- writel(plane->state->crtc_w,
+ writel(crtc_state->mode.hdisplay,
priv->io_base + _REG(VPP_POSTBLEND_H_SIZE));
writel_bits_relaxed(VPP_POSTBLEND_ENABLE, VPP_POSTBLEND_ENABLE,
@@ -101,6 +108,7 @@ static void meson_crtc_disable(struct drm_crtc *crtc)
struct meson_drm *priv = meson_crtc->priv;
priv->viu.osd1_enabled = false;
+ priv->viu.osd1_commit = false;
/* Disable VPP Postblend */
writel_bits_relaxed(VPP_POSTBLEND_ENABLE, 0,
@@ -137,8 +145,7 @@ static void meson_crtc_atomic_flush(struct drm_crtc *crtc,
struct meson_crtc *meson_crtc = to_meson_crtc(crtc);
struct meson_drm *priv = meson_crtc->priv;
- if (priv->viu.osd1_enabled)
- priv->viu.osd1_commit = true;
+ priv->viu.osd1_commit = true;
}
static const struct drm_crtc_helper_funcs meson_crtc_helper_funcs = {
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/13] drm/meson: Initial support for HDMI Output Neil Armstrong <narmstrong@baylibre.com> - 2017-03-21 16:30 +0100 [PATCH v2 11/13] drm/meson: Convert existing documentation to actual kerneldoc Neil Armstrong <narmstrong@baylibre.com> - 2017-03-21 16:30 +0100 [PATCH v2 08/13] ARM64: dts: meson-gx: Add shared CMA dma memory pool Neil Armstrong <narmstrong@baylibre.com> - 2017-03-21 16:30 +0100 [PATCH v2 07/13] drm/meson: Add support for HDMI encoder and DW-HDMI bridge + PHY Neil Armstrong <narmstrong@baylibre.com> - 2017-03-21 16:30 +0100 [PATCH v2 09/13] ARM64: dts: meson-gx: Add support for HDMI output Neil Armstrong <narmstrong@baylibre.com> - 2017-03-21 16:30 +0100 [PATCH v2 05/13] drm/meson: add support for HDMI clock support Neil Armstrong <narmstrong@baylibre.com> - 2017-03-21 16:30 +0100 [PATCH v2 03/13] drm/meson: Add support for components Neil Armstrong <narmstrong@baylibre.com> - 2017-03-21 16:30 +0100 [PATCH v2 01/13] drm/meson: Use crtc_state for hdisplay and fix atomic flush/enable sync for vsync commit Neil Armstrong <narmstrong@baylibre.com> - 2017-03-21 16:30 +0100 [PATCH v2 04/13] drm/meson: venc_cvbs: no more return -ENODEV if CVBS is not available Neil Armstrong <narmstrong@baylibre.com> - 2017-03-21 16:30 +0100 [PATCH v2 10/13] dt-bindings: Add bindings for the Amlogic Meson dw-hdmi extension Neil Armstrong <narmstrong@baylibre.com> - 2017-03-21 16:30 +0100
csiph-web