[Intel-gfx] [PATCH 1/4] drm/i915: Adding intel_panel_scale_none() helper function

Xiong Zhang xiong.y.zhang at intel.com
Mon Aug 10 00:45:16 PDT 2015


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

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
-- 
1.8.2.1



More information about the Intel-gfx mailing list