[1/4] drm/i915: Adding intel_panel_scale_none() helper function
diff mbox

Message ID 1439191571-25847-1-git-send-email-xiong.y.zhang@intel.com
State New
Headers show

Commit Message

Xiong Zhang Aug. 10, 2015, 7:26 a.m. UTC
From: dell <dell@localhost.localdomain>

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
---
 drivers/gpu/drm/i915/intel_drv.h   |  1 +
 drivers/gpu/drm/i915/intel_panel.c | 10 ++++++++++
 2 files changed, 11 insertions(+)

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 47cef0e..f57a0b4 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1287,6 +1287,7 @@  int intel_panel_init(struct intel_panel *panel,
 void intel_panel_fini(struct intel_panel *panel);
 void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
 			    struct drm_display_mode *adjusted_mode);
+bool intel_panel_scale_none(struct intel_panel *panel);
 void intel_pch_panel_fitting(struct intel_crtc *crtc,
 			     struct intel_crtc_state *pipe_config,
 			     int fitting_mode);
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index e2ab3f6..4a573ac 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -46,6 +46,16 @@  intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
 	drm_mode_set_crtcinfo(adjusted_mode, 0);
 }
 
+bool
+intel_panel_scale_none(struct intel_panel *panel)
+{
+	if (panel->fitting_mode == DRM_MODE_SCALE_NONE ||
+	    panel->fixed_mode == NULL)
+		return true;
+	else
+		return false;
+}
+
 /**
  * intel_find_panel_downclock - find the reduced downclock for LVDS in EDID
  * @dev: drm device