Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135977
b: refs/heads/master
c: 6bcdcd9
h: refs/heads/master
i:
  135975: ef3b279
v: v3
  • Loading branch information
Zhao Yakui authored and Eric Anholt committed Mar 27, 2009
1 parent c282d49 commit 718b785
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba01079c71559304771f9d741c9bbe8b2eac22a2
refs/heads/master: 6bcdcd9e3c09d133e3278edabebc314a2451b74a
21 changes: 17 additions & 4 deletions trunk/drivers/gpu/drm/i915/intel_crt.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,21 @@ static void intel_crt_dpms(struct drm_encoder *encoder, int mode)
static int intel_crt_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
struct drm_device *dev = connector->dev;

int max_clock = 0;
if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
return MODE_NO_DBLESCAN;

if (mode->clock > 400000 || mode->clock < 25000)
return MODE_CLOCK_RANGE;
if (mode->clock < 25000)
return MODE_CLOCK_LOW;

if (!IS_I9XX(dev))
max_clock = 350000;
else
max_clock = 400000;
if (mode->clock > max_clock)
return MODE_CLOCK_HIGH;

return MODE_OK;
}
Expand Down Expand Up @@ -113,10 +123,13 @@ static void intel_crt_mode_set(struct drm_encoder *encoder,
if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
adpa |= ADPA_VSYNC_ACTIVE_HIGH;

if (intel_crtc->pipe == 0)
if (intel_crtc->pipe == 0) {
adpa |= ADPA_PIPE_A_SELECT;
else
I915_WRITE(BCLRPAT_A, 0);
} else {
adpa |= ADPA_PIPE_B_SELECT;
I915_WRITE(BCLRPAT_B, 0);
}

I915_WRITE(ADPA, adpa);
}
Expand Down

0 comments on commit 718b785

Please sign in to comment.