All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] imx-drm: ipuv3-plane: allow local alpha in ipu_plane_mode_set()
@ 2014-07-29  9:57 Philipp Zabel
  2014-07-29  9:57 ` [PATCH 2/4] imx-drm: ipuv3-plane: move stride setting out of base setup Philipp Zabel
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Philipp Zabel @ 2014-07-29  9:57 UTC (permalink / raw)
  To: Russell King; +Cc: Fabio Estevam, devel, kernel, Greg Kroah-Hartman, dri-devel

For the overlay plane scanning out a framebuffer with an alpha component,
enable the DP local alpha feature on the partial plane.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/staging/imx-drm/ipuv3-plane.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/imx-drm/ipuv3-plane.c b/drivers/staging/imx-drm/ipuv3-plane.c
index 50de10a..43e36ea 100644
--- a/drivers/staging/imx-drm/ipuv3-plane.c
+++ b/drivers/staging/imx-drm/ipuv3-plane.c
@@ -151,14 +151,22 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc,
 				ret);
 			return ret;
 		}
-		ipu_dp_set_global_alpha(ipu_plane->dp, 1, 0, 1);
+		ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true);
 		break;
 	case IPU_DP_FLOW_SYNC_FG:
 		ipu_dp_setup_channel(ipu_plane->dp,
 				ipu_drm_fourcc_to_colorspace(fb->pixel_format),
 				IPUV3_COLORSPACE_UNKNOWN);
 		ipu_dp_set_window_pos(ipu_plane->dp, crtc_x, crtc_y);
-		break;
+		/* Enable local alpha on partial plane */
+		switch (fb->pixel_format) {
+		case DRM_FORMAT_ARGB8888:
+		case DRM_FORMAT_ABGR8888:
+			ipu_dp_set_global_alpha(ipu_plane->dp, false, 0, false);
+			break;
+		default:
+			break;
+		}
 	}
 
 	ret = ipu_dmfc_init_channel(ipu_plane->dmfc, crtc_w);
-- 
2.0.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-09 11:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-29  9:57 [PATCH 1/4] imx-drm: ipuv3-plane: allow local alpha in ipu_plane_mode_set() Philipp Zabel
2014-07-29  9:57 ` [PATCH 2/4] imx-drm: ipuv3-plane: move stride setting out of base setup Philipp Zabel
2014-07-29  9:57 ` [PATCH 3/4] imx-drm: ipuv3-plane: enable double buffering Philipp Zabel
2014-07-29  9:57 ` [PATCH 4/4] imx-drm: ipuv3-plane: fix plane updates for active planes Philipp Zabel
2014-09-08 19:50 ` [PATCH 1/4] imx-drm: ipuv3-plane: allow local alpha in ipu_plane_mode_set() Greg Kroah-Hartman
2014-09-09 11:36   ` Philipp Zabel

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.