Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293775
b: refs/heads/master
c: 4cbb0f8
h: refs/heads/master
i:
  293773: 78d9a3a
  293771: 180cdc7
  293767: 0e58709
  293759: fd942a9
v: v3
  • Loading branch information
Ben Skeggs committed Mar 13, 2012
1 parent 2f7ef21 commit 4def6ff
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 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: 3488c57b983546e6bf4c9e0bfd0f7f2a1292267a
refs/heads/master: 4cbb0f8d2b06c72aae3552ff1a0a57814c6ce7d2
66 changes: 33 additions & 33 deletions trunk/drivers/gpu/drm/nouveau/nvd0_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ nvd0_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb,
u32 *push;
int ret;

evo_sync(crtc->dev, EVO_MASTER);

swap_interval <<= 4;
if (swap_interval == 0)
swap_interval |= 0x100;
Expand Down Expand Up @@ -593,7 +595,7 @@ nvd0_crtc_commit(struct drm_crtc *crtc)
evo_kick(push, crtc->dev, EVO_MASTER);
}

nvd0_crtc_cursor_show(nv_crtc, nv_crtc->cursor.visible, false);
nvd0_crtc_cursor_show(nv_crtc, nv_crtc->cursor.visible, true);
nvd0_display_flip_next(crtc, crtc->fb, NULL, 1);
}

Expand Down Expand Up @@ -947,11 +949,6 @@ nvd0_dac_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
return true;
}

static void
nvd0_dac_prepare(struct drm_encoder *encoder)
{
}

static void
nvd0_dac_commit(struct drm_encoder *encoder)
{
Expand Down Expand Up @@ -1045,7 +1042,7 @@ nvd0_dac_destroy(struct drm_encoder *encoder)
static const struct drm_encoder_helper_funcs nvd0_dac_hfunc = {
.dpms = nvd0_dac_dpms,
.mode_fixup = nvd0_dac_mode_fixup,
.prepare = nvd0_dac_prepare,
.prepare = nvd0_dac_disconnect,
.commit = nvd0_dac_commit,
.mode_set = nvd0_dac_mode_set,
.disable = nvd0_dac_disconnect,
Expand Down Expand Up @@ -1385,9 +1382,38 @@ nvd0_sor_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
return true;
}

static void
nvd0_sor_disconnect(struct drm_encoder *encoder)
{
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
struct drm_device *dev = encoder->dev;
u32 *push;

if (nv_encoder->crtc) {
nvd0_crtc_prepare(nv_encoder->crtc);

push = evo_wait(dev, EVO_MASTER, 4);
if (push) {
evo_mthd(push, 0x0200 + (nv_encoder->or * 0x20), 1);
evo_data(push, 0x00000000);
evo_mthd(push, 0x0080, 1);
evo_data(push, 0x00000000);
evo_kick(push, dev, EVO_MASTER);
}

nvd0_hdmi_disconnect(encoder);

nv_encoder->crtc = NULL;
nv_encoder->last_dpms = DRM_MODE_DPMS_OFF;
}
}

static void
nvd0_sor_prepare(struct drm_encoder *encoder)
{
nvd0_sor_disconnect(encoder);
if (nouveau_encoder(encoder)->dcb->type == OUTPUT_DP)
evo_sync(encoder->dev, EVO_MASTER);
}

static void
Expand Down Expand Up @@ -1508,32 +1534,6 @@ nvd0_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *umode,
nv_encoder->crtc = encoder->crtc;
}

static void
nvd0_sor_disconnect(struct drm_encoder *encoder)
{
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
struct drm_device *dev = encoder->dev;
u32 *push;

if (nv_encoder->crtc) {
nvd0_crtc_prepare(nv_encoder->crtc);

push = evo_wait(dev, EVO_MASTER, 4);
if (push) {
evo_mthd(push, 0x0200 + (nv_encoder->or * 0x20), 1);
evo_data(push, 0x00000000);
evo_mthd(push, 0x0080, 1);
evo_data(push, 0x00000000);
evo_kick(push, dev, EVO_MASTER);
}

nvd0_hdmi_disconnect(encoder);

nv_encoder->crtc = NULL;
nv_encoder->last_dpms = DRM_MODE_DPMS_OFF;
}
}

static void
nvd0_sor_destroy(struct drm_encoder *encoder)
{
Expand Down

0 comments on commit 4def6ff

Please sign in to comment.