All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-sh@vger.kernel.org
Subject: [PATCH 10/10] drm: rcar-du: Split planes pre-association 4/4 between CRTCs
Date: Wed, 29 Apr 2015 00:38:04 +0000	[thread overview]
Message-ID: <1430267884-20560-11-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (raw)
In-Reply-To: <1430267884-20560-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

If we have more than one CRTCs in a group pre-associate planes 0-3 with
CRTC 0 and planes 4-7 with CRTC 1 to minimize flicker occurring when the
association is changed. The pre-association could be controlled by a
module parameter if needed.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 3 ---
 drivers/gpu/drm/rcar-du/rcar_du_kms.c  | 7 ++++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index 620a2c51185c..e6a32c4e4040 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -257,9 +257,6 @@ static void rcar_du_crtc_update_planes(struct rcar_du_crtc *rcrtc)
 	 * resulting in visible flicker. To mitigate the issue only update the
 	 * association if needed by enabled planes. Planes being disabled will
 	 * keep their current association.
-	 *
-	 * To mitigate the issue further we could pre-associate planes with
-	 * CRTCs, either with a fixed 4/4 split, or through a module parameter.
 	 */
 	mutex_lock(&rcrtc->group->lock);
 
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
index fec5f4d794da..20859aae882e 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
@@ -765,10 +765,11 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
 		rgrp->index = i;
 		rgrp->num_crtcs = min(rcdu->num_crtcs - 2 * i, 2U);
 
-		/* Pre-associate all hardware planes with the first CRTC in the
-		 * group.
+		/* If we have more than one CRTCs in this group pre-associate
+		 * planes 0-3 with CRTC 0 and planes 4-7 with CRTC 1 to minimize
+		 * flicker occurring when the association is changed.
 		 */
-		rgrp->dptsr_planes = 0;
+		rgrp->dptsr_planes = rgrp->num_crtcs > 1 ? 0xf0 : 0;
 
 		ret = rcar_du_planes_init(rgrp);
 		if (ret < 0)
-- 
2.0.5


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-sh@vger.kernel.org
Subject: [PATCH 10/10] drm: rcar-du: Split planes pre-association 4/4 between CRTCs
Date: Wed, 29 Apr 2015 03:38:04 +0300	[thread overview]
Message-ID: <1430267884-20560-11-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (raw)
In-Reply-To: <1430267884-20560-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

If we have more than one CRTCs in a group pre-associate planes 0-3 with
CRTC 0 and planes 4-7 with CRTC 1 to minimize flicker occurring when the
association is changed. The pre-association could be controlled by a
module parameter if needed.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 3 ---
 drivers/gpu/drm/rcar-du/rcar_du_kms.c  | 7 ++++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index 620a2c51185c..e6a32c4e4040 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -257,9 +257,6 @@ static void rcar_du_crtc_update_planes(struct rcar_du_crtc *rcrtc)
 	 * resulting in visible flicker. To mitigate the issue only update the
 	 * association if needed by enabled planes. Planes being disabled will
 	 * keep their current association.
-	 *
-	 * To mitigate the issue further we could pre-associate planes with
-	 * CRTCs, either with a fixed 4/4 split, or through a module parameter.
 	 */
 	mutex_lock(&rcrtc->group->lock);
 
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
index fec5f4d794da..20859aae882e 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
@@ -765,10 +765,11 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
 		rgrp->index = i;
 		rgrp->num_crtcs = min(rcdu->num_crtcs - 2 * i, 2U);
 
-		/* Pre-associate all hardware planes with the first CRTC in the
-		 * group.
+		/* If we have more than one CRTCs in this group pre-associate
+		 * planes 0-3 with CRTC 0 and planes 4-7 with CRTC 1 to minimize
+		 * flicker occurring when the association is changed.
 		 */
-		rgrp->dptsr_planes = 0;
+		rgrp->dptsr_planes = rgrp->num_crtcs > 1 ? 0xf0 : 0;
 
 		ret = rcar_du_planes_init(rgrp);
 		if (ret < 0)
-- 
2.0.5

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-04-29  0:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29  0:37 [PATCH 00/10] R-Car DU: Fix flicker due to hardware plane reassociations Laurent Pinchart
2015-04-29  0:37 ` Laurent Pinchart
2015-04-29  0:37 ` [PATCH 01/10] drm: rcar-du: Document the rcar_du_crtc structure Laurent Pinchart
2015-04-29  0:37   ` Laurent Pinchart
2015-04-29 11:33   ` Sergei Shtylyov
2015-04-29 11:33     ` Sergei Shtylyov
2015-04-29 11:37     ` Laurent Pinchart
2015-04-29 11:37       ` Laurent Pinchart
2015-04-29  0:37 ` [PATCH 02/10] drm: rcar-du: Document the rcar_du_plane_state structure Laurent Pinchart
2015-04-29  0:37   ` Laurent Pinchart
2015-04-29 11:34   ` Sergei Shtylyov
2015-04-29 11:34     ` Sergei Shtylyov
2015-04-29  0:37 ` [PATCH 03/10] drm: rcar-du: Move properties from rcar_du_planes to rcar_du_device Laurent Pinchart
2015-04-29  0:37   ` Laurent Pinchart
2015-04-29  0:37 ` [PATCH 04/10] drm: rcar-du: Embed rcar_du_planes structure into rcar_du_group Laurent Pinchart
2015-04-29  0:37   ` Laurent Pinchart
2015-04-29  0:37 ` [PATCH 05/10] drm: rcar-du: Rename to_rcar_du_plane_state to to_rcar_plane_state Laurent Pinchart
2015-04-29  0:37   ` Laurent Pinchart
2015-04-29  0:38 ` [PATCH 06/10] drm: rcar-du: Add plane allocation debugging Laurent Pinchart
2015-04-29  0:38   ` Laurent Pinchart
2015-04-29  0:38 ` [PATCH 07/10] drm: rcar-du: Keep plane to CRTC associations when disabling a plane Laurent Pinchart
2015-04-29  0:38   ` Laurent Pinchart
2015-04-29  0:38 ` [PATCH 08/10] drm: rcar-du: Consider plane to CRTC associations in the plane allocator Laurent Pinchart
2015-04-29  0:38   ` Laurent Pinchart
2015-04-29  0:38 ` [PATCH 09/10] drm: rcar-du: Store the number of CRTCs per group in the group structure Laurent Pinchart
2015-04-29  0:38   ` Laurent Pinchart
2015-04-29  0:38 ` Laurent Pinchart [this message]
2015-04-29  0:38   ` [PATCH 10/10] drm: rcar-du: Split planes pre-association 4/4 between CRTCs Laurent Pinchart

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=1430267884-20560-11-git-send-email-laurent.pinchart+renesas@ideasonboard.com \
    --to=laurent.pinchart+renesas@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-sh@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.