Browse Source

Merge tag 'imx-drm-fixes-2017-08-18' of git://git.pengutronix.de/git/pza/linux into drm-fixes

drm/imx: fix YUV primary plane and IPUv3 build corner case

- Enable color space conversion on the primary plane when the framebuffer
  format is a YUV format.
- The IPUv3 base driver now uses drm_format_info in the PRE/PRG code. The
  PRE/PRG parts are already disabled if DRM is not available. Enforce that
  if DRM is built as a module, IPUv3 must be built as a module, too.

* tag 'imx-drm-fixes-2017-08-18' of git://git.pengutronix.de/git/pza/linux:
  drm/imx: ipuv3-plane: fix YUV framebuffer scanout on the base plane
  gpu: ipu-v3: add DRM dependency
Dave Airlie 8 years ago
parent
commit
4a9f153dbd
2 changed files with 3 additions and 4 deletions
  1. 2 4
      drivers/gpu/drm/imx/ipuv3-plane.c
  2. 1 0
      drivers/gpu/ipu-v3/Kconfig

+ 2 - 4
drivers/gpu/drm/imx/ipuv3-plane.c

@@ -545,15 +545,13 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
 		return;
 		return;
 	}
 	}
 
 
+	ics = ipu_drm_fourcc_to_colorspace(fb->format->format);
 	switch (ipu_plane->dp_flow) {
 	switch (ipu_plane->dp_flow) {
 	case IPU_DP_FLOW_SYNC_BG:
 	case IPU_DP_FLOW_SYNC_BG:
-		ipu_dp_setup_channel(ipu_plane->dp,
-					IPUV3_COLORSPACE_RGB,
-					IPUV3_COLORSPACE_RGB);
+		ipu_dp_setup_channel(ipu_plane->dp, ics, IPUV3_COLORSPACE_RGB);
 		ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true);
 		ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true);
 		break;
 		break;
 	case IPU_DP_FLOW_SYNC_FG:
 	case IPU_DP_FLOW_SYNC_FG:
-		ics = ipu_drm_fourcc_to_colorspace(state->fb->format->format);
 		ipu_dp_setup_channel(ipu_plane->dp, ics,
 		ipu_dp_setup_channel(ipu_plane->dp, ics,
 					IPUV3_COLORSPACE_UNKNOWN);
 					IPUV3_COLORSPACE_UNKNOWN);
 		/* Enable local alpha on partial plane */
 		/* Enable local alpha on partial plane */

+ 1 - 0
drivers/gpu/ipu-v3/Kconfig

@@ -1,6 +1,7 @@
 config IMX_IPUV3_CORE
 config IMX_IPUV3_CORE
 	tristate "IPUv3 core support"
 	tristate "IPUv3 core support"
 	depends on SOC_IMX5 || SOC_IMX6Q || ARCH_MULTIPLATFORM
 	depends on SOC_IMX5 || SOC_IMX6Q || ARCH_MULTIPLATFORM
+	depends on DRM || !DRM # if DRM=m, this can't be 'y'
 	select GENERIC_IRQ_CHIP
 	select GENERIC_IRQ_CHIP
 	help
 	help
 	  Choose this if you have a i.MX5/6 system and want to use the Image
 	  Choose this if you have a i.MX5/6 system and want to use the Image