<div dir="ltr">I believe this function could be added along with the next patch that is the first to use it...<div>Or it would be good to have a good commit message explaining why this function is needed and what is be used for... </div><div><br></div><div>more bikeshedings inline:</div><div><br></div><div><div class="gmail_quote"><div dir="ltr">On Mon, Aug 10, 2015 at 12:39 AM Xiong Zhang <<a href="mailto:xiong.y.zhang@intel.com">xiong.y.zhang@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Xiong Zhang <<a href="mailto:xiong.y.zhang@intel.com" target="_blank">xiong.y.zhang@intel.com</a>><br>
---<br>
drivers/gpu/drm/i915/intel_drv.h | 1 +<br>
drivers/gpu/drm/i915/intel_panel.c | 10 ++++++++++<br>
2 files changed, 11 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h<br>
index 47cef0e..f57a0b4 100644<br>
--- a/drivers/gpu/drm/i915/intel_drv.h<br>
+++ b/drivers/gpu/drm/i915/intel_drv.h<br>
@@ -1287,6 +1287,7 @@ int intel_panel_init(struct intel_panel *panel,<br>
void intel_panel_fini(struct intel_panel *panel);<br>
void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,<br>
struct drm_display_mode *adjusted_mode);<br>
+bool intel_panel_scale_none(struct intel_panel *panel);<br>
void intel_pch_panel_fitting(struct intel_crtc *crtc,<br>
struct intel_crtc_state *pipe_config,<br>
int fitting_mode);<br>
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c<br>
index e2ab3f6..4a573ac 100644<br>
--- a/drivers/gpu/drm/i915/intel_panel.c<br>
+++ b/drivers/gpu/drm/i915/intel_panel.c<br>
@@ -46,6 +46,16 @@ intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,<br>
drm_mode_set_crtcinfo(adjusted_mode, 0);<br>
}<br>
<br>
+bool<br>
+intel_panel_scale_none(struct intel_panel *panel)<br></blockquote><div><br></div><div>double negations always confuses me, when reading next patches it took few seconds to realize on next patch that !scale_none was == fixed_mode... </div><div>but meh, I never have good suggestions to avoid double negations... so up to you...</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+{<br>
+ if (panel->fitting_mode == DRM_MODE_SCALE_NONE ||<br>
+ panel->fixed_mode == NULL)<br>
+ return true;<br>
+ else<br>
+ return false;<br></blockquote><div><br></div><div>this could be just return (panel->fitting_mode == DRM_MODE_SCALE_NONE || panel->fixed_mode == NULL)</div><div>or !<statement> if you remove the double negation...<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+}<br>
+<br>
/**<br>
* intel_find_panel_downclock - find the reduced downclock for LVDS in EDID<br>
* @dev: drm device<br>
--<br>
1.8.2.1<br>
<br>
_______________________________________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org" target="_blank">Intel-gfx@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br>
</blockquote></div></div></div>