drm/nouveau/kms/gv100-: Add support for interlaced modes
authorLyude Paul <lyude@redhat.com>
Mon, 11 May 2020 22:41:25 +0000 (18:41 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 22 May 2020 01:13:52 +0000 (11:13 +1000)
We advertise being able to set interlaced modes, so let's actually make
sure to do that. Otherwise, we'll end up hanging the display engine due
to trying to set a mode with timings adjusted for interlacing without
telling the hardware it's actually an interlaced mode.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/headc37d.c
drivers/gpu/drm/nouveau/dispnv50/headc57d.c

index 00011ce109a629da6a1f5f47453e1ecc3f298aac..4a9a32b89f746f98a9970d26bf64906a27000fca 100644 (file)
@@ -168,14 +168,15 @@ headc37d_mode(struct nv50_head *head, struct nv50_head_atom *asyh)
        struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
        struct nv50_head_mode *m = &asyh->mode;
        u32 *push;
-       if ((push = evo_wait(core, 12))) {
+       if ((push = evo_wait(core, 13))) {
                evo_mthd(push, 0x2064 + (head->base.index * 0x400), 5);
                evo_data(push, (m->v.active  << 16) | m->h.active );
                evo_data(push, (m->v.synce   << 16) | m->h.synce  );
                evo_data(push, (m->v.blanke  << 16) | m->h.blanke );
                evo_data(push, (m->v.blanks  << 16) | m->h.blanks );
                evo_data(push, (m->v.blank2e << 16) | m->v.blank2s);
-               evo_mthd(push, 0x200c + (head->base.index * 0x400), 1);
+               evo_mthd(push, 0x2008 + (head->base.index * 0x400), 2);
+               evo_data(push, m->interlace);
                evo_data(push, m->clock * 1000);
                evo_mthd(push, 0x2028 + (head->base.index * 0x400), 1);
                evo_data(push, m->clock * 1000);
index 938d910a1b1e4acd1a65900415367141d056d0fd..859131a8bc3c89fa377ba6b40033203123d5d10c 100644 (file)
@@ -173,14 +173,15 @@ headc57d_mode(struct nv50_head *head, struct nv50_head_atom *asyh)
        struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
        struct nv50_head_mode *m = &asyh->mode;
        u32 *push;
-       if ((push = evo_wait(core, 12))) {
+       if ((push = evo_wait(core, 13))) {
                evo_mthd(push, 0x2064 + (head->base.index * 0x400), 5);
                evo_data(push, (m->v.active  << 16) | m->h.active );
                evo_data(push, (m->v.synce   << 16) | m->h.synce  );
                evo_data(push, (m->v.blanke  << 16) | m->h.blanke );
                evo_data(push, (m->v.blanks  << 16) | m->h.blanks );
                evo_data(push, (m->v.blank2e << 16) | m->v.blank2s);
-               evo_mthd(push, 0x200c + (head->base.index * 0x400), 1);
+               evo_mthd(push, 0x2008 + (head->base.index * 0x400), 2);
+               evo_data(push, m->interlace);
                evo_data(push, m->clock * 1000);
                evo_mthd(push, 0x2028 + (head->base.index * 0x400), 1);
                evo_data(push, m->clock * 1000);