Re: [PATCH v2 3/4] drm/i915/icl: Preparations for enabling Y210, Y212, Y216 formats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Swati Sharma kirjoitti 12.9.2018 klo 13.32:
From: Vidya Srinivas <vidya.srinivas@xxxxxxxxx>

Signed-off-by: Swati Sharma <swati2.sharma@xxxxxxxxx>
Signed-off-by: Vidya Srinivas <vidya.srinivas@xxxxxxxxx>
---
  drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++
  drivers/gpu/drm/i915/intel_sprite.c  |  3 +++
  2 files changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2b77d93..7c68a0d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3512,6 +3512,12 @@ static u32 skl_plane_ctl_format(uint32_t pixel_format)
  		return PLANE_CTL_FORMAT_YUV422 | PLANE_CTL_YUV422_VYUY;
  	case DRM_FORMAT_NV12:
  		return PLANE_CTL_FORMAT_NV12;
+	case DRM_FORMAT_Y210:
+		return PLANE_CTL_FORMAT_Y210;
+	case DRM_FORMAT_Y212:
+		return PLANE_CTL_FORMAT_Y212;
+	case DRM_FORMAT_Y216:
+		return PLANE_CTL_FORMAT_Y216;
  	default:
  		MISSING_CASE(pixel_format);
  	}
@@ -4960,6 +4966,9 @@ static int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,
  	case DRM_FORMAT_UYVY:
  	case DRM_FORMAT_VYUY:
  	case DRM_FORMAT_NV12:
+	case DRM_FORMAT_Y210:
+	case DRM_FORMAT_Y212:
+	case DRM_FORMAT_Y216:
  		break;
  	default:
  		DRM_DEBUG_KMS("[PLANE:%d:%s] FB:%d unsupported scaling format 0x%x\n",
@@ -13422,6 +13431,9 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
  	case DRM_FORMAT_YVYU:
  	case DRM_FORMAT_UYVY:
  	case DRM_FORMAT_VYUY:
+	case DRM_FORMAT_Y210:
+	case DRM_FORMAT_Y212:
+	case DRM_FORMAT_Y216:
  	case DRM_FORMAT_NV12:
  		if (modifier == I915_FORMAT_MOD_Yf_TILED)
  			return true;
@@ -14551,6 +14563,9 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
  	case DRM_FORMAT_UYVY:
  	case DRM_FORMAT_YVYU:
  	case DRM_FORMAT_VYUY:
+	case DRM_FORMAT_Y210:
+	case DRM_FORMAT_Y212:
+	case DRM_FORMAT_Y216:
  		if (INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv)) {
  			DRM_DEBUG_KMS("unsupported pixel format: %s\n",
  				      drm_get_format_name(mode_cmd->pixel_format, &format_name));

This is wrong place for these cases. These three new YUV formats are available on ICL+. You'll need case handling which checks if INTEL_GEN(dev_priv) < 11.

/Juha-Pekka

diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 9600ccf..f7e2768 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1419,6 +1419,9 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
  	case DRM_FORMAT_YVYU:
  	case DRM_FORMAT_UYVY:
  	case DRM_FORMAT_VYUY:
+	case DRM_FORMAT_Y210:
+	case DRM_FORMAT_Y212:
+	case DRM_FORMAT_Y216:
  	case DRM_FORMAT_NV12:
  		if (modifier == I915_FORMAT_MOD_Yf_TILED)
  			return true;

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux