[PATCH 09/12] drm/i915: Enable NV12 primary plane via crtc set config

Chandra Konduru
2015-05-18T05:12:36Z

Setup a scaler for primary plane if its FB is in NV12 format
in legacy crtc set config path.

Signed-off-by: Chandra Konduru <chandra.konduru@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 41cd26f..b31f0fe 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12292,6 +12292,16 @@ intel_modeset_compute_config(struct drm_crtc *crtc,
if (ret)
return ERR_PTR(ret);

+ /*
+ * FIXME: Until full atomic_crtc is available and hooked up for
+ * legacy APIs, setup scaler for primary plane with NV12 fb coming
+ * in those paths (e.g., crtc_setconfig).
+ */
+ ret = intel_atomic_setup_scalers(state->dev, to_intel_crtc(crtc),
+ pipe_config);
+ if (ret)
+ return ERR_PTR(ret);
+
return pipe_config;
}