提交 b60bfb65 编写于 作者: A Alan Cox 提交者: Dave Airlie

gma500: Clean up weirdness in the cdv mode test code

Signed-off-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 3aad16d2
...@@ -67,7 +67,6 @@ static void cdv_intel_crt_dpms(struct drm_encoder *encoder, int mode) ...@@ -67,7 +67,6 @@ static void cdv_intel_crt_dpms(struct drm_encoder *encoder, int mode)
static int cdv_intel_crt_mode_valid(struct drm_connector *connector, static int cdv_intel_crt_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
int max_clock = 0;
if (mode->flags & DRM_MODE_FLAG_DBLSCAN) if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
return MODE_NO_DBLESCAN; return MODE_NO_DBLESCAN;
...@@ -76,8 +75,7 @@ static int cdv_intel_crt_mode_valid(struct drm_connector *connector, ...@@ -76,8 +75,7 @@ static int cdv_intel_crt_mode_valid(struct drm_connector *connector,
return MODE_CLOCK_LOW; return MODE_CLOCK_LOW;
/* The max clock for CDV is 355 instead of 400 */ /* The max clock for CDV is 355 instead of 400 */
max_clock = 355000; if (mode->clock > 355000)
if (mode->clock > max_clock)
return MODE_CLOCK_HIGH; return MODE_CLOCK_HIGH;
if (mode->hdisplay > 1680 || mode->vdisplay > 1050) if (mode->hdisplay > 1680 || mode->vdisplay > 1050)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册