Gfx-Display: fixed the issue that HDMI can't show video playback with HW Composer.
authorAustin Hu <austin.hu@intel.com>
Mon, 5 Dec 2011 10:04:13 +0000 (18:04 +0800)
committerbuildbot <buildbot@intel.com>
Mon, 12 Dec 2011 07:05:32 +0000 (23:05 -0800)
BZ: 16345

When play video with HDMI by Gallery, overlay crashes because overlay plane size
(= HDMI sink device mode) exceeds DC source image size in aspect ratio mode.

Fixed the issue by setting HDMI default scaling mode to center. And Resoure Manager
can decide to set HDMI scaling to center before playing video via HDMI, to avoid
such issue.

Change-Id: I8cf42740962377125ac9ed631cd1fa828b57555f
Signed-off-by: Austin Hu <austin.hu@intel.com>
Reviewed-on: http://android.intel.com:8080/26915
Reviewed-by: Xu, Randy <randy.xu@intel.com>
Tested-by: Xu, Randy <randy.xu@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/psb_intel_display2.c
drivers/staging/mrst/drv/psb_intel_hdmi.c

index 22f87ca..dcaadd0 100755 (executable)
@@ -1423,9 +1423,6 @@ static int mdfld_crtc_mode_set(struct drm_crtc *crtc,
        struct drm_encoder *encoder;
        struct drm_connector * connector;
        int timeout = 0;
-       int sprite_pos_x = 0, sprite_pos_y = 0;
-       int sprite_width = 0, sprite_height = 0;
-       int src_image_hor = 0, src_image_vert = 0;
 
        PSB_DEBUG_ENTRY("pipe = 0x%x\n", pipe);
 
index b33ecd4..63891fe 100644 (file)
@@ -1767,7 +1767,7 @@ void mdfld_hdmi_init(struct drm_device *dev,
        connector->interlace_allowed = false;
        connector->doublescan_allowed = false;
 
-       drm_connector_attach_property(connector, dev->mode_config.scaling_mode_property, DRM_MODE_SCALE_ASPECT);
+       drm_connector_attach_property(connector, dev->mode_config.scaling_mode_property, DRM_MODE_SCALE_CENTER);
 
        /* hard-coded the HDMI_I2C_ADAPTER_ID to be 3, Should get from GCT*/
        psb_intel_output->hdmi_i2c_adapter = i2c_get_adapter(3);