diff mbox

[1/4] imx-drm: ipuv3-plane: allow local alpha in ipu_plane_mode_set()

Message ID 1406627829-29596-1-git-send-email-p.zabel@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Philipp Zabel July 29, 2014, 9:57 a.m. UTC
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(-)

Comments

Greg KH Sept. 8, 2014, 7:50 p.m. UTC | #1
On Tue, Jul 29, 2014 at 11:57:06AM +0200, Philipp Zabel wrote:
> 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(-)

Russell, are these ok to take?

thanks,

greg k-h
Philipp Zabel Sept. 9, 2014, 11:36 a.m. UTC | #2
Am Montag, den 08.09.2014, 12:50 -0700 schrieb Greg Kroah-Hartman:
> On Tue, Jul 29, 2014 at 11:57:06AM +0200, Philipp Zabel wrote:
> > 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(-)
> 
> Russell, are these ok to take?

Actually, no. Thanks for the reminder.
There's an error in the double buffering patch. I'll send a v2.

regards
Philipp
diff mbox

Patch

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);